Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 582 Lines • ▼ Show 20 Lines | if (template.garrisonable.size > 1 || extraSize) | ||||
translateWithContext("nested garrison", "+ ") + extraSize : "" | translateWithContext("nested garrison", "+ ") + extraSize : "" | ||||
}) | }) | ||||
); | ); | ||||
} | } | ||||
return tooltips.join("\n"); | return tooltips.join("\n"); | ||||
} | } | ||||
function getTurretsTooltip(template) | |||||
{ | |||||
if (!template.turretHolder) | |||||
return ""; | |||||
return sprintf(translate("%(label)s: %(turretsLimit)s"), { | |||||
"label": headerFont(translate("Turret Positions")), | |||||
"turretsLimit": Object.keys(template.turretHolder.turretPoints).length | |||||
}); | |||||
} | |||||
function getProjectilesTooltip(template) | function getProjectilesTooltip(template) | ||||
{ | { | ||||
if (!template.garrisonHolder || !template.buildingAI) | if (!template.garrisonHolder || !template.buildingAI) | ||||
return ""; | return ""; | ||||
let limit = Math.min( | let limit = Math.min( | ||||
template.buildingAI.maxArrowCount || Infinity, | template.buildingAI.maxArrowCount || Infinity, | ||||
template.buildingAI.defaultArrowCount + | template.buildingAI.defaultArrowCount + | ||||
▲ Show 20 Lines • Show All 582 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator