diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs index 5902a6b11b..f03a4ec2e9 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs @@ -59,6 +59,7 @@ public sealed partial class ShuttleSystem private CancellationTokenSource? _roundEndCancelToken; private const string EmergencyRepealAllAccess = "EmergencyShuttleRepealAll"; + private static readonly Color DangerColor = Color.Red; /// /// Have the emergency shuttles been authorised to launch at Centcomm? @@ -189,10 +190,13 @@ public sealed partial class ShuttleSystem var remaining = component.AuthorizationsRequired - component.AuthorizedEntities.Count; if (remaining > 0) - _chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString("emergency-shuttle-console-auth-left", ("remaining", remaining)), playDefaultSound: false); + _chatSystem.DispatchGlobalStationAnnouncement( + Loc.GetString("emergency-shuttle-console-auth-left", ("remaining", remaining)), + playDefaultSound: false, colorOverride: DangerColor); + + if (!CheckForLaunch(component)) + SoundSystem.Play("/Audio/Misc/notice1.ogg", Filter.Broadcast()); - SoundSystem.Play("/Audio/Misc/notice1.ogg", Filter.Broadcast()); - CheckForLaunch(component); UpdateAllEmergencyConsoles(); } @@ -230,27 +234,34 @@ public sealed partial class ShuttleSystem }); } - private void CheckForLaunch(EmergencyShuttleConsoleComponent component) + private bool CheckForLaunch(EmergencyShuttleConsoleComponent component) { if (component.AuthorizedEntities.Count < component.AuthorizationsRequired || EarlyLaunchAuthorized) - return; + return false; EarlyLaunch(); + return true; } /// /// Attempts to early launch the emergency shuttle if not already done. /// - public void EarlyLaunch() + public bool EarlyLaunch() { - if (EarlyLaunchAuthorized || !EmergencyShuttleArrived) return; + if (EarlyLaunchAuthorized || !EmergencyShuttleArrived) return false; _logger.Add(LogType.EmergencyShuttle, LogImpact.Extreme, $"Emergency shuttle launch authorized"); _consoleAccumulator = MathF.Max(1f, MathF.Min(_consoleAccumulator, _authorizeTime)); EarlyLaunchAuthorized = true; RaiseLocalEvent(new EmergencyShuttleAuthorizedEvent()); - _chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString("emergency-shuttle-launch-time", ("consoleAccumulator", $"{_consoleAccumulator:0}")), playDefaultSound: false); + _chatSystem.DispatchGlobalStationAnnouncement( + Loc.GetString("emergency-shuttle-launch-time", ("consoleAccumulator", $"{_consoleAccumulator:0}")), + playDefaultSound: false, + colorOverride: DangerColor); + + SoundSystem.Play("/Audio/Misc/notice1.ogg", Filter.Broadcast()); UpdateAllEmergencyConsoles(); + return true; } public bool DelayEmergencyRoundEnd() diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs index d34af15dc3..0d02309dd9 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyShuttle.cs @@ -235,6 +235,9 @@ public sealed partial class ShuttleSystem _chatSystem.DispatchStationAnnouncement(stationUid.Value, Loc.GetString("emergency-shuttle-docked", ("time", $"{_consoleAccumulator:0}")), playDefaultSound: false); // TODO: Need filter extensions or something don't blame me. SoundSystem.Play("/Audio/Announcements/shuttle_dock.ogg", Filter.Broadcast()); + + // Bolt all the airlocks so they don't stuff around with them. + SetDockBolts(stationData.EmergencyShuttle.Value, true); } else { diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs index 081a093cc7..08f244a3f3 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs @@ -1,5 +1,6 @@ using Content.Server.Buckle.Components; using Content.Server.Doors.Components; +using Content.Server.Doors.Systems; using Content.Server.Shuttles.Components; using Content.Server.Stunnable; using Content.Shared.Sound; @@ -18,6 +19,7 @@ public sealed partial class ShuttleSystem * This is a way to move a shuttle from one location to another, via an intermediate map for fanciness. */ + [Dependency] private readonly DoorSystem _doors = default!; [Dependency] private readonly StunSystem _stuns = default!; private MapId? _hyperSpaceMap; @@ -141,9 +143,9 @@ public sealed partial class ShuttleSystem { foreach (var (dock, door, xform) in EntityQuery(true)) { - if (xform.ParentUid != uid || - dock.Enabled == enabled) continue; + if (xform.ParentUid != uid) continue; + _doors.TryClose(dock.Owner); door.SetBoltsWithAudio(enabled); } } diff --git a/Content.Server/StationEvents/Events/ZombieOutbreak.cs b/Content.Server/StationEvents/Events/ZombieOutbreak.cs index b05d6c0c81..c25a45ea78 100644 --- a/Content.Server/StationEvents/Events/ZombieOutbreak.cs +++ b/Content.Server/StationEvents/Events/ZombieOutbreak.cs @@ -42,19 +42,19 @@ namespace Content.Server.StationEvents.Events _random.Shuffle(deadList); var toInfect = _random.Next(1, 3); - + var zombifysys = _entityManager.EntitySysManager.GetEntitySystem(); - + // Now we give it to people in the list of dead entities earlier. var entSysMgr = IoCManager.Resolve(); var stationSystem = entSysMgr.GetEntitySystem(); var chatSystem = entSysMgr.GetEntitySystem(); - + foreach (var target in deadList) { if (toInfect-- == 0) break; - + zombifysys.ZombifyEntity(target.Owner); var station = stationSystem.GetOwningStation(target.Owner); @@ -66,7 +66,7 @@ namespace Content.Server.StationEvents.Events return; foreach (var station in stationsToNotify) { - chatSystem.DispatchStationAnnouncement((EntityUid) station, Loc.GetString("station-event-zombie-outbreak-announcement"), + chatSystem.DispatchStationAnnouncement(station, Loc.GetString("station-event-zombie-outbreak-announcement"), playDefaultSound: false, colorOverride: Color.DarkMagenta); } }