Members
auras
Parsed Data Stores
Methods
getActualPhase(phaseName) → {string}
Returns the actual phase a certain phase tech represents or stands in for.
For example, passing `phase_city_athen` would result in `phase_city`.
Parameters:
Name | Type | Description |
---|---|---|
phaseName |
string |
Returns:
- Type
- string
getActualUpgradeData()
Provided with an array containing basic information about possible
upgrades, such as that generated by globalscript's GetTemplateDataHelper,
this function loads the actual template data of the upgrades, overwrites
certain values within, then passes an array containing the template data
back to caller.
getEntity(templateName, civCode) → {object|null}
Load and parse a structure, unit, resource, etc from its entity template file.
Parameters:
Name | Type | Description |
---|---|---|
templateName |
string | |
civCode |
string |
Returns:
Sanitized object about the requested template or null if entity template doesn't exist.
- Type
- object | null
getPhase(phaseCode, civCode) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
phaseCode |
string | |
civCode |
string |
Returns:
Sanitized object containing phase data
- Type
- Object
getPhaseOfTechnology(techName, civCode)
Determines and returns the phase in which a given technology can be
first researched. Works recursively through the given tech's
pre-requisite and superseded techs if necessary.
Parameters:
Name | Type | Description |
---|---|---|
techName |
string | The Technology's name |
civCode |
string |
Returns:
The name of the phase the technology belongs to, or false if
the current civ can't research this tech
getPlayer()
Load and parse the relevant player_{civ}.xml template.
getTechnology(technologyName, civCode) → {Object}
Load and parse technology from json template.
Parameters:
Name | Type | Description |
---|---|---|
technologyName |
string | |
civCode |
string |
Returns:
Sanitized data about the requested technology.
- Type
- Object