Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 422 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?) | |||||
bbAuthorUnsubmitted 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": attackTypeTemplate.attackName.context ? | "attackType": attackTypeTemplate.attackName.context ? | ||||
translateWithContext(attackTypeTemplate.attackName.context || "Name of an attack, usually the weapon.", attackTypeTemplate.attackName.name) : | translateWithContext(attackTypeTemplate.attackName.context || "Name of an attack, usually the weapon.", attackTypeTemplate.attackName.name) : | ||||
translate(attackTypeTemplate.attackName.name) | translate(attackTypeTemplate.attackName.name) | ||||
}); | }); | ||||
let projectiles; | let projectiles; | ||||
▲ Show 20 Lines • Show All 628 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
(Maybe a tag in ResourceGatherer that allows slaughtering?)