Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/reference/common/TemplateParser.js
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | class TemplateParser | ||||
* @return {Object} Sanitized object containing phase data | * @return {Object} Sanitized object containing phase data | ||||
*/ | */ | ||||
getPhase(phaseCode, civCode) | getPhase(phaseCode, civCode) | ||||
{ | { | ||||
return this.getTechnology(phaseCode, civCode); | return this.getTechnology(phaseCode, civCode); | ||||
} | } | ||||
/** | /** | ||||
* Load and parse the relevant player_{civ}.xml template. | * Load and parse the relevant {civ}.xml template. | ||||
*/ | */ | ||||
getPlayer(civCode) | getPlayer(civCode) | ||||
{ | { | ||||
if (civCode in this.players) | if (civCode in this.players) | ||||
return this.players[civCode]; | return this.players[civCode]; | ||||
let template = this.TemplateLoader.loadPlayerTemplate(civCode); | let template = this.TemplateLoader.loadPlayerTemplate(civCode); | ||||
let parsed = { | let parsed = { | ||||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator