Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/globalscripts/Templates.js
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | for (let auraID of template.Auras._string.split(/\s+/)) | ||||
ret.auras[auraID] = { | ret.auras[auraID] = { | ||||
"name": aura.auraName, | "name": aura.auraName, | ||||
"description": aura.auraDescription || null, | "description": aura.auraDescription || null, | ||||
"radius": aura.radius || null | "radius": aura.radius || null | ||||
}; | }; | ||||
} | } | ||||
} | } | ||||
if (template.BuildingAI) | if (template.ManpowerHolderBuilding) | ||||
ret.buildingAI = { | ret.manpowerHolder = { | ||||
"defaultArrowCount": Math.round(getEntityValue("BuildingAI/DefaultArrowCount")), | "defaultArrowCount": Math.round(getEntityValue("ManpowerHolderBuilding/DefaultArrowCount", "ManpowerHolder/DefaultArrowCount")), | ||||
"garrisonArrowMultiplier": getEntityValue("BuildingAI/GarrisonArrowMultiplier"), | "garrisonArrowMultiplier": getEntityValue("ManpowerHolderBuilding/GarrisonArrowMultiplier", "ManpowerHolder/DefaultArrowCount"), | ||||
"maxArrowCount": Math.round(getEntityValue("BuildingAI/MaxArrowCount")) | "maxArrowCount": Math.round(getEntityValue("ManpowerHolderBuilding/MaxArrowCount", "ManpowerHolder/DefaultArrowCount")) | ||||
}; | |||||
else if (template.ManpowerHolderUnit) | |||||
ret.manpowerHolder = { | |||||
"defaultArrowCount": Math.round(getEntityValue("ManpowerHolderUnit/DefaultArrowCount", "ManpowerHolder/DefaultArrowCount")), | |||||
"garrisonArrowMultiplier": getEntityValue("ManpowerHolderUnit/GarrisonArrowMultiplier", "ManpowerHolder/DefaultArrowCount"), | |||||
Grugnas: try again :P | |||||
Not Done Inline ActionsI you equate a typo and a misunderstanding, I can't help you anymore. fatherbushido: I you equate a typo and a misunderstanding, I can't help you anymore. | |||||
Not Done Inline ActionsThanks for catching it though fatherbushido: Thanks for catching it though | |||||
"maxArrowCount": Math.round(getEntityValue("ManpowerHolderUnit/MaxArrowCount", "ManpowerHolder/DefaultArrowCount")) | |||||
}; | }; | ||||
Not Done Inline ActionsThat's wrong: should use the second parameter of getEntityValue. fatherbushido: That's wrong: should use the second parameter of getEntityValue. | |||||
if (template.BuildRestrictions) | if (template.BuildRestrictions) | ||||
{ | { | ||||
// required properties | // required properties | ||||
ret.buildRestrictions = { | ret.buildRestrictions = { | ||||
"placementType": template.BuildRestrictions.PlacementType, | "placementType": template.BuildRestrictions.PlacementType, | ||||
"territory": template.BuildRestrictions.Territory, | "territory": template.BuildRestrictions.Territory, | ||||
"category": template.BuildRestrictions.Category, | "category": template.BuildRestrictions.Category, | ||||
▲ Show 20 Lines • Show All 268 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
try again :P