Remove pointless content from counter tooltips

This removes the static text "Gatherers: current" from the
resource and population counter tooltips. This string was static and
only changed its color depending on whether units were assigned to
collect a certain resource. That information is however already
available in the counter display itself.
This commit is contained in:
Dunedan
2025-04-18 10:40:27 +02:00
parent 0bf3ff5ad6
commit dee2b73c7d
2 changed files with 2 additions and 7 deletions
@@ -29,7 +29,7 @@ class CounterPopulation
this.panel.tooltip =
setStringTags(translate(this.PopulationTooltip), CounterManager.ResourceTitleTags) +
getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + coloredText(this.CurrentGatherersTooltip, total ? this.DefaultTotalGatherersColor : this.DefaultTotalGatherersColorZero);
getAllyStatTooltip(this.getTooltipData.bind(this));
}
getTooltipData(playerState, playername)
@@ -64,11 +64,6 @@ CounterPopulation.prototype.PopulationTooltip = markForTranslation("Population:
CounterPopulation.prototype.AllyPopulationTooltip = markForTranslation("%(popCount)s/%(popLimit)s (%(popMax)s)");
/**
* Storing the translated and formatted gatherer string in the prototype.
*/
CounterPopulation.prototype.CurrentGatherersTooltip = setStringTags(translate("Gatherers: current"), {"font": "sans-bold-16"});
/**
* Color to highlight the total number of gatherers at zero.
*/
@@ -28,7 +28,7 @@ class CounterResource
this.panel.tooltip =
setStringTags(resourceNameFirstWord(this.resCode), CounterManager.ResourceTitleTags) +
description +
getAllyStatTooltip(this.getTooltipData.bind(this)) + "\n" + coloredText(CounterPopulation.prototype.CurrentGatherersTooltip, gatherers ? this.DefaultResourceGatherersColor : this.DefaultResourceGatherersColorZero);
getAllyStatTooltip(this.getTooltipData.bind(this));
}
getTooltipData(playerState, playername)