Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 433 Lines • ▼ Show 20 Lines | |||||
function getAttackTooltip(template) | function getAttackTooltip(template) | ||||
{ | { | ||||
if (!template.attack) | if (!template.attack) | ||||
return ""; | return ""; | ||||
let tooltips = []; | let tooltips = []; | ||||
for (let attackType in template.attack) | for (let attackType in template.attack) | ||||
{ | { | ||||
// Slaughter is used to kill animals, so do not show it. | |||||
Freagarach: (Maybe a tag in ResourceGatherer that allows slaughtering?) | |||||
Done Inline ActionsWe have the restricted classes right to choose the attacktype with (or better dissallow slaughter for anything but Domestics). For the GUI we eventually might want to show the restricted classes, but mehing that here bb: We have the restricted classes right to choose the attacktype with (or better dissallow… | |||||
if (attackType == "Slaughter") | |||||
continue; | |||||
let attackTypeTemplate = template.attack[attackType]; | let attackTypeTemplate = template.attack[attackType]; | ||||
let attackLabel = sprintf(headerFont(translate("%(attackType)s")), { | let attackLabel = sprintf(headerFont(translate("%(attackType)s")), { | ||||
"attackType": translateWithContext(attackTypeTemplate.attackName.context || "Name of an attack, usually the weapon.", attackTypeTemplate.attackName.name) | "attackType": translateWithContext(attackTypeTemplate.attackName.context || "Name of an attack, usually the weapon.", attackTypeTemplate.attackName.name) | ||||
}); | }); | ||||
let projectiles; | let projectiles; | ||||
// Use either current rate from simulation or default count if the sim is not running. | // Use either current rate from simulation or default count if the sim is not running. | ||||
// TODO: This ought to be extended to include units which fire multiple projectiles. | // TODO: This ought to be extended to include units which fire multiple projectiles. | ||||
▲ Show 20 Lines • Show All 782 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
(Maybe a tag in ResourceGatherer that allows slaughtering?)