Do not update countdown label unless there is a timelimit

This commit is contained in:
Oliver Brakmann
2021-08-29 12:16:12 +02:00
committed by abcdefg30
parent 0c42f59656
commit be4466115d

View File

@@ -128,7 +128,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
countdown = new CachedTransform<int, string>(t => countdown = new CachedTransform<int, string>(t =>
info.CountdownText.F(WidgetUtils.FormatTime(t, true, w.Timestep))); info.CountdownText.F(WidgetUtils.FormatTime(t, true, w.Timestep)));
countdownLabel.GetText = () => countdown.Update(ticksRemaining); countdownLabel.GetText = () => TimeLimit > 0 ? countdown.Update(ticksRemaining) : "";
} }
} }