mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Have gather information take precedence over repair
Differential Revision: https://code.wildfiregames.com/D1374 Reviewed by: mimo This was SVN commit r21502.
This commit is contained in:
parent
8124a6c76b
commit
dad45b60cd
1 changed files with 10 additions and 10 deletions
|
|
@ -244,16 +244,7 @@ function displaySingle(entState)
|
|||
Engine.GetGUIObjectByName("resourceCarryingText").caption = entState.foundation.numBuilders ?
|
||||
Engine.FormatMillisecondsIntoDateStringGMT(entState.foundation.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")) + " " : "";
|
||||
}
|
||||
else if (entState.repairable && entState.needsRepair)
|
||||
{
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").hidden = false;
|
||||
Engine.GetGUIObjectByName("resourceCarryingText").hidden = false;
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").sprite = "stretched:session/icons/repair.png";
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip = getRepairTimeTooltip(entState);
|
||||
Engine.GetGUIObjectByName("resourceCarryingText").caption = entState.repairable.numBuilders ?
|
||||
Engine.FormatMillisecondsIntoDateStringGMT(entState.repairable.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")) + " " : "";
|
||||
}
|
||||
else if (entState.resourceSupply && (!entState.resourceSupply.killBeforeGather || !entState.hitpoints) && entState.visibility == "visible")
|
||||
else if (entState.resourceSupply && (!entState.resourceSupply.killBeforeGather || !entState.hitpoints))
|
||||
{
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").hidden = false;
|
||||
Engine.GetGUIObjectByName("resourceCarryingText").hidden = false;
|
||||
|
|
@ -264,6 +255,15 @@ function displaySingle(entState)
|
|||
}) + " ";
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip = translate("Current/max gatherers");
|
||||
}
|
||||
else if (entState.repairable && entState.needsRepair)
|
||||
{
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").hidden = false;
|
||||
Engine.GetGUIObjectByName("resourceCarryingText").hidden = false;
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").sprite = "stretched:session/icons/repair.png";
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").tooltip = getRepairTimeTooltip(entState);
|
||||
Engine.GetGUIObjectByName("resourceCarryingText").caption = entState.repairable.numBuilders ?
|
||||
Engine.FormatMillisecondsIntoDateStringGMT(entState.repairable.buildTime.timeRemaining * 1000, translateWithContext("countdown format", "m:ss")) + " " : "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Engine.GetGUIObjectByName("resourceCarryingIcon").hidden = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue