Class: Researcher

Researcher()

new Researcher()

Source:

Methods

GetResearchingTechnology() → {Object}

Source:
Returns:
- Some basic information about the research.
Type
Object

GetTechCostMultiplier() → {Object}

Source:
Returns:
- The multipliers to change the costs of any research with.
Type
Object

HasItem(id) → {boolean}

Parameters:
Name Type Description
id number The ID of the item to check.
Source:
Returns:
- Whether we are currently training the item.
Type
boolean

IsTechnologyResearchedOrInProgress()

Checks whether we can research the given technology, minding paired techs.
Source:

Item(templateName, researcher, metadata)

This object represents a technology being researched.
Parameters:
Name Type Description
templateName string The name of the template we ought to research.
researcher number The entity ID of our researcher.
metadata string Optionally any metadata to attach to us.
Source:

PauseTechnology(id)

Parameters:
Name Type Description
id number The id of the technology.
Source:

Progress(id, allocatedTime) → {number}

Parameters:
Name Type Description
id number The ID of the item we spent time on.
allocatedTime number The time we spent on the given item.
Source:
Returns:
- The time we've actually used.
Type
number

QueueTechnology(templateName, metadata) → {number}

Parameters:
Name Type Description
templateName string The technology to queue.
metadata string Any metadata attached to the item.
Source:
Returns:
- The ID of the item. -1 if the item could not be researched.
Type
number

StopResearching(id)

Parameters:
Name Type Description
id number The id of the technology researched here we need to stop.
Source: