Class: TemplateLister

TemplateLister()

This class compiles and stores lists of which templates can be built/trained/researched by other templates.

Constructor

new TemplateLister()

Source:

Methods

compileTemplateLists(civCode, civData)

Compile lists of templates buildable/trainable/researchable of a given civ.
Parameters:
Name Type Description
civCode Object
civData Object Data defining every civ in the game.
Source:

deriveTemplateListsFromTemplate()

Compiles lists of buildable, trainable, or researchable entities from a named template.
Source:

getTemplateLists(civCode) → {Object}

Returns a civ's template list. Note: this civ must have gone through the compilation process above!
Parameters:
Name Type Description
civCode string
Source:
Returns:
containing lists of template names, grouped by type.
Type
Object

hasTemplateLists(civCode) → {boolean}

Returns whether the civ of the given civCode has been loaded into cache.
Parameters:
Name Type Description
civCode string
Source:
Returns:
Type
boolean