From 05e9d39e8928ecebdb5fdad19a049077cb19cd7f Mon Sep 17 00:00:00 2001 From: zumorica Date: Fri, 10 Apr 2020 13:36:30 +0200 Subject: [PATCH] Fix bug where comms console sometimes took a second to update after a countdown has started --- Content.Client/Command/CommunicationsConsoleMenu.cs | 3 ++- .../Command/CommunicationsConsoleBoundUserInterface.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Client/Command/CommunicationsConsoleMenu.cs b/Content.Client/Command/CommunicationsConsoleMenu.cs index 426ae84977..0a6804264c 100644 --- a/Content.Client/Command/CommunicationsConsoleMenu.cs +++ b/Content.Client/Command/CommunicationsConsoleMenu.cs @@ -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) { diff --git a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs index 9e90200515..c82ded4c7a 100644 --- a/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Command/CommunicationsConsoleBoundUserInterface.cs @@ -69,7 +69,7 @@ namespace Content.Client.GameObjects.Components.Command _expectedCountdownTime = commsState.ExpectedCountdownEnd; CountdownStarted = commsState.CountdownStarted; - + _menu?.UpdateCountdown(); }