Fix bug where comms console sometimes took a second to update after a countdown has started
This commit is contained in:
@@ -5,6 +5,7 @@ using Robust.Client.UserInterface.Controls;
|
|||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Timer = Robust.Shared.Timers.Timer;
|
using Timer = Robust.Shared.Timers.Timer;
|
||||||
|
|
||||||
@@ -50,7 +51,7 @@ namespace Content.Client.Command
|
|||||||
Timer.SpawnRepeating(1000, UpdateCountdown, _timerCancelTokenSource.Token);
|
Timer.SpawnRepeating(1000, UpdateCountdown, _timerCancelTokenSource.Token);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateCountdown()
|
public void UpdateCountdown()
|
||||||
{
|
{
|
||||||
if (!Owner.CountdownStarted)
|
if (!Owner.CountdownStarted)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Content.Client.GameObjects.Components.Command
|
|||||||
|
|
||||||
_expectedCountdownTime = commsState.ExpectedCountdownEnd;
|
_expectedCountdownTime = commsState.ExpectedCountdownEnd;
|
||||||
CountdownStarted = commsState.CountdownStarted;
|
CountdownStarted = commsState.CountdownStarted;
|
||||||
|
_menu?.UpdateCountdown();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user