diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs index 6d2c28edcf..aeb2ebdbba 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs @@ -308,8 +308,9 @@ public sealed partial class EmergencyShuttleSystem private void CleanupEmergencyConsole() { + // Realistically most of this shit needs moving to a station component so each station has their own emergency shuttle + // and timer and all that jazz so I don't really care about debugging if it works on cleanup vs start. _announced = false; - _roundEndCancelToken = null; ShuttlesLeft = false; _launchedShuttles = false; _consoleAccumulator = float.MinValue; diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index a7df41d887..47aad6a603 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -19,6 +19,7 @@ using Content.Shared.Access.Systems; using Content.Shared.CCVar; using Content.Shared.Database; using Content.Shared.DeviceNetwork; +using Content.Shared.GameTicking; using Content.Shared.Shuttles.Components; using Content.Shared.Shuttles.Events; using Content.Shared.Tag; @@ -80,6 +81,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem Subs.CVar(_configManager, CCVars.EmergencyShuttleEnabled, SetEmergencyShuttleEnabled); SubscribeLocalEvent(OnRoundStart); + SubscribeLocalEvent(OnRoundCleanup); SubscribeLocalEvent(OnStationStartup); SubscribeLocalEvent(OnCentcommShutdown); SubscribeLocalEvent(OnCentcommInit); @@ -93,10 +95,15 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem private void OnRoundStart(RoundStartingEvent ev) { CleanupEmergencyConsole(); - _roundEndCancelToken?.Cancel(); _roundEndCancelToken = new CancellationTokenSource(); } + private void OnRoundCleanup(RoundRestartCleanupEvent ev) + { + _roundEndCancelToken?.Cancel(); + _roundEndCancelToken = null; + } + private void OnCentcommShutdown(EntityUid uid, StationCentcommComponent component, ComponentShutdown args) { ClearCentcomm(component);