Index: binaries/data/mods/public/gui/session/selection_details.js =================================================================== --- binaries/data/mods/public/gui/session/selection_details.js +++ binaries/data/mods/public/gui/session/selection_details.js @@ -112,18 +112,6 @@ healthSize.rright = 100*Math.max(0, Math.min(1, entState.hitpoints / entState.maxHitpoints)); unitHealthBar.size = healthSize; - if (entState.foundation && entState.visibility == "visible" && entState.foundation.numBuilders !== 0 && entState.buildTime) - Engine.GetGUIObjectByName("health").tooltip = sprintf( - translatePlural( - "This foundation will be completed in %(seconds)s second.", - "This foundation will be completed in %(seconds)s seconds.", - Math.ceil(entState.buildTime.timeRemaining)), - { - "seconds": Math.ceil(entState.buildTime.timeRemaining) - }); - else - Engine.GetGUIObjectByName("health").tooltip = ""; - Engine.GetGUIObjectByName("healthStats").caption = sprintf(translate("%(hitpoints)s / %(maxHitpoints)s"), { "hitpoints": Math.ceil(entState.hitpoints), "maxHitpoints": Math.ceil(entState.maxHitpoints) @@ -253,18 +241,20 @@ Engine.GetGUIObjectByName("resourceCarryingIcon").hidden = false; Engine.GetGUIObjectByName("resourceCarryingText").hidden = false; Engine.GetGUIObjectByName("resourceCarryingIcon").sprite = "stretched:session/icons/repair.png"; - Engine.GetGUIObjectByName("resourceCarryingText").caption = entState.foundation.numBuilders + " "; - if (entState.foundation.numBuilders !== 0 && entState.buildTime) - Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip = sprintf( - translatePlural( - "Number of builders.\nTasking another to this foundation would speed construction up by %(speedup)s second.", - "Number of builders.\nTasking another to this foundation would speed construction up by %(speedup)s seconds.", - Math.ceil(entState.buildTime.timeSpeedup)), + Engine.GetGUIObjectByName("resourceCarryingText").caption = ""; + Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip = headerFont(translate("Number of builders: ")) + entState.foundation.numBuilders; + + if (entState.foundation.numBuilders > 0 && entState.buildTime) + { + Engine.GetGUIObjectByName("resourceCarryingText").caption = Engine.FormatMillisecondsIntoDateStringGMT(entState.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")) + " "; + Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip += '\n' + sprintf(translatePlural( + "Adding another worker would speed up the construction by %(speedup)s second.", + "Adding another worker would speed up the construction by %(speedup)s seconds.", + Math.floor(entState.buildTime.timeSpeedup)), { - "speedup": Math.ceil(entState.buildTime.timeSpeedup) + "speedup": Math.floor(entState.buildTime.timeSpeedup) }); - else - Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip = translate("Number of builders."); + } } else if (entState.repairable && entState.repairable.numBuilders > 0 && entState.visibility == "visible") {