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;
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;
Subs.CVar(_configManager, CCVars.EmergencyShuttleEnabled, SetEmergencyShuttleEnabled);
SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
+ SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundCleanup);
SubscribeLocalEvent<StationEmergencyShuttleComponent, ComponentStartup>(OnStationStartup);
SubscribeLocalEvent<StationCentcommComponent, ComponentShutdown>(OnCentcommShutdown);
SubscribeLocalEvent<StationCentcommComponent, ComponentInit>(OnCentcommInit);
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);