Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 638 Lines • ▼ Show 20 Lines | if (template.cost && template.cost.populationBonus) | ||||
popBonus = sprintf(translate("%(label)s %(populationBonus)s"), { | popBonus = sprintf(translate("%(label)s %(populationBonus)s"), { | ||||
"label": headerFont(translate("Population Bonus:")), | "label": headerFont(translate("Population Bonus:")), | ||||
"populationBonus": template.cost.populationBonus | "populationBonus": template.cost.populationBonus | ||||
}); | }); | ||||
return popBonus; | return popBonus; | ||||
} | } | ||||
/** | /** | ||||
* Returns the territory influence information to display in the specified entity's construction button tooltip. | |||||
*/ | |||||
function getTerritoryInfluenceTooltip(template) | |||||
{ | |||||
let text = ""; | |||||
if (template.territoryInfluence && template.territoryInfluence.root) { | |||||
text += sprintf(translate("%(label)s %(text)s"), { | |||||
"label": headerFont(translate("Territory Influence:")), | |||||
"text": translate("Other buildings in this building's do not decay.") | |||||
}); | |||||
} | |||||
return text | |||||
elexisUnsubmitted Done Inline Actions
elexis: * avoid the variable and return in both cases directly.
* That's not a building, that's a… | |||||
} | |||||
/** | |||||
* Returns a message with the amount of each resource needed to create an entity. | * Returns a message with the amount of each resource needed to create an entity. | ||||
*/ | */ | ||||
function getNeededResourcesTooltip(resources) | function getNeededResourcesTooltip(resources) | ||||
{ | { | ||||
if (!resources) | if (!resources) | ||||
return ""; | return ""; | ||||
let formatted = []; | let formatted = []; | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator