Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/globalscripts/Templates.js
Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | if (template.TrainingRestrictions) | ||||
ret.trainingRestrictions = { | ret.trainingRestrictions = { | ||||
"category": template.TrainingRestrictions.Category, | "category": template.TrainingRestrictions.Category, | ||||
}; | }; | ||||
if (template.Cost) | if (template.Cost) | ||||
{ | { | ||||
ret.cost = {}; | ret.cost = {}; | ||||
for (let resCode in template.Cost.Resources) | for (let resCode in template.Cost.Resources) | ||||
ret.cost[resCode] = getEntityValue("Cost/Resources/" + resCode); | ret.cost[resCode] = getEntityValue("Cost/Resources/" + resCode).toFixed(2); | ||||
if (template.Cost.Population) | if (template.Cost.Population) | ||||
ret.cost.population = getEntityValue("Cost/Population"); | ret.cost.population = getEntityValue("Cost/Population"); | ||||
if (template.Cost.PopulationBonus) | if (template.Cost.PopulationBonus) | ||||
ret.cost.populationBonus = getEntityValue("Cost/PopulationBonus"); | ret.cost.populationBonus = getEntityValue("Cost/PopulationBonus"); | ||||
if (template.Cost.BuildTime) | if (template.Cost.BuildTime) | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator