Class: TechnologyManager

TechnologyManager()

new TechnologyManager()

Source:

Methods

CheckTechnologyRequirements(reqs, civonly)

Private function for checking a set of requirements is met
Parameters:
Name Type Description
reqs Object Technology requirements as derived from the technology template by globalscripts
civonly boolean True if only the civ requirement is to be checked
Source:
Returns:
true if the requirements pass, false otherwise

GetBasicInfo(tech) → {Object}

Parameters:
Name Type Description
tech string The technology name to retreive some basic information for.
Source:
Returns:
- Some basic information about the technology under research.
Type
Object

GetQueuedResearch()

Called by GUIInterface for PlayerData. AI use.
Source:

GetResearchedTechs()

Returns the names of technologies that have already been researched.
Source:

IsInProgress()

Checks whether a technology is set to be researched.
Source:

MarkTechnologyAsResearched(tech)

This does neither apply effects nor verify requirements.
Parameters:
Name Type Description
tech string The name of the technology to mark as researched.
Source:

Pause(tech)

Parameters:
Name Type Description
tech string -
Source:

Progress(tech, allocatedTime) → {number}

Parameters:
Name Type Description
tech string The technology to advance.
allocatedTime number The time allocated to the technology.
Source:
Returns:
- The time we've actually used.
Type
number

QueuedResearch(tech, researcher, techCostMultiplier) → {boolean}

Marks a technology as being queued for research at the given entityID.
Parameters:
Name Type Description
tech string The technology to queue.
researcher number The entity ID of the entity researching this technology.
techCostMultiplier Object The multipliers used when calculating the costs.
Source:
Returns:
- Whether we successfully have queued the technology.
Type
boolean

ResearchTechnology(tech, researcher)

Note that this does not verify whether the requirements are met.
Parameters:
Name Type Description
tech string The technology to research.
researcher number Optionally the entity to couple with the research.
Source:

StoppedResearch(tech, notification)

Marks a technology as not being currently researched and optionally sends a GUI notification.
Parameters:
Name Type Description
tech string The name of the technology to stop.
notification boolean Whether a GUI notification ought to be sent.
Source:

Technology(templateName, player, researcher)

This object represents a technology under research.
Parameters:
Name Type Description
templateName string The name of the template to research.
player number The player ID researching.
researcher number The entity ID researching.
Source: