Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 722 Lines • ▼ Show 20 Lines | if (!Object.keys(rates).length) | ||||
return ""; | return ""; | ||||
return sprintf(translate("%(label)s %(details)s"), { | return sprintf(translate("%(label)s %(details)s"), { | ||||
"label": headerFont(translate("Gather Rates:")), | "label": headerFont(translate("Gather Rates:")), | ||||
"details": | "details": | ||||
Object.keys(rates).map( | Object.keys(rates).map( | ||||
type => sprintf(translate("%(resourceIcon)s %(rate)s"), { | type => sprintf(translate("%(resourceIcon)s %(rate)s"), { | ||||
"resourceIcon": resourceIcon(type), | "resourceIcon": resourceIcon(type), | ||||
"rate": rates[type] | "rate": rates[type].toFixed(2) | ||||
}) | }) | ||||
).join(" ") | ).join(" ") | ||||
}); | }); | ||||
} | } | ||||
/** | /** | ||||
* Returns the resources this entity supplies in the specified entity's tooltip | * Returns the resources this entity supplies in the specified entity's tooltip | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 359 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator