Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | |||||
function getAttackTooltip(template) | function getAttackTooltip(template) | ||||
{ | { | ||||
if (!template.attack) | if (!template.attack) | ||||
return ""; | return ""; | ||||
let tooltips = []; | let tooltips = []; | ||||
for (let type in template.attack) | for (let type in template.attack) | ||||
{ | { | ||||
if (type == "attackGround") | |||||
continue; // Because the ability to attack ground is not per se set per type... | |||||
if (type == "Slaughter") | if (type == "Slaughter") | ||||
continue; // Slaughter is used to kill animals, so do not show it. | continue; // Slaughter is used to kill animals, so do not show it. | ||||
let rate = sprintf(translate("%(label)s %(details)s"), { | let rate = sprintf(translate("%(label)s %(details)s"), { | ||||
"label": | "label": | ||||
headerFont( | headerFont( | ||||
template.buildingAI && type == "Ranged" ? | template.buildingAI && type == "Ranged" ? | ||||
translate("Interval:") : | translate("Interval:") : | ||||
▲ Show 20 Lines • Show All 571 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator