Differential D4093 Diff 18155 ps/trunk/binaries/data/mods/public/gui/reference/common/TemplateLoader.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/reference/common/TemplateLoader.js
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | for (let build of template.Builder.Entities._string.split(" ")) | ||||
build = build.replace(/\{(civ|native)\}/g, civCode); | build = build.replace(/\{(civ|native)\}/g, civCode); | ||||
if (Engine.TemplateExists(build)) | if (Engine.TemplateExists(build)) | ||||
buildQueue.push(build); | buildQueue.push(build); | ||||
} | } | ||||
return buildQueue; | return buildQueue; | ||||
} | } | ||||
deriveModifications(civCode) | deriveModifications(civCode, auraList) | ||||
{ | { | ||||
let techData = []; | const modificationData = []; | ||||
for (let techName of this.autoResearchTechList) | for (const techName of this.autoResearchTechList) | ||||
techData.push(GetTechnologyBasicDataHelper(this.loadTechnologyTemplate(techName), civCode)); | modificationData.push(GetTechnologyBasicDataHelper(this.loadTechnologyTemplate(techName), civCode)); | ||||
return DeriveModificationsFromTechnologies(techData); | for (const auraName of auraList) | ||||
modificationData.push(this.loadAuraTemplate(auraName)); | |||||
return DeriveModificationsFromTechnologies(modificationData); | |||||
} | } | ||||
/** | /** | ||||
* If a civ doesn't have its own civ-specific player template, | * If a civ doesn't have its own civ-specific player template, | ||||
* this returns the name of the generic player template. | * this returns the name of the generic player template. | ||||
* | * | ||||
* @see simulation/helpers/Player.js GetPlayerTemplateName() | * @see simulation/helpers/Player.js GetPlayerTemplateName() | ||||
* (Which can't be combined with this due to different Engine contexts) | * (Which can't be combined with this due to different Engine contexts) | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator