Fix bug where comms console sometimes took a second to update after a countdown has started

This commit is contained in:
zumorica
2020-04-10 13:36:30 +02:00
parent 47c3258861
commit 05e9d39e89
2 changed files with 3 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Timer = Robust.Shared.Timers.Timer;
@@ -50,7 +51,7 @@ namespace Content.Client.Command
Timer.SpawnRepeating(1000, UpdateCountdown, _timerCancelTokenSource.Token);
}
private void UpdateCountdown()
public void UpdateCountdown()
{
if (!Owner.CountdownStarted)
{

View File

@@ -69,7 +69,7 @@ namespace Content.Client.GameObjects.Components.Command
_expectedCountdownTime = commsState.ExpectedCountdownEnd;
CountdownStarted = commsState.CountdownStarted;
_menu?.UpdateCountdown();
}