From 66205ad77205286761b234e1dabc44938792cbd8 Mon Sep 17 00:00:00 2001 From: pathetic meowmeow Date: Fri, 16 May 2025 15:27:37 -0400 Subject: [PATCH] Add the ability to call a GALPOL exfiltration shuttle (#3722) * Add the ability to call a GALPOL exfiltration shuttle * feetback * format --- ...CommunicationsConsoleBoundUserInterface.cs | 16 ++ .../UI/CommunicationsConsoleMenu.xaml | 9 + .../UI/CommunicationsConsoleMenu.xaml.cs | 31 +++ .../CommunicationsConsoleSystem.cs | 15 +- .../CommunicationsConsoleSystem.cs | 32 +++ .../StationExfiltrationComponent.cs | 116 +++++++++++ .../Systems/StationExfiltrationSystem.cs | 185 ++++++++++++++++++ .../SharedCommunicationsConsoleComponent.cs | 4 +- ...ationsConsoleExfiltrationShuttleMessage.cs | 9 + .../communications-console-component.ftl | 4 + .../en-US/_DV/shuttles/exfiltration.ftl | 8 + Resources/Maps/_DV/Shuttles/exfiltration.yml | 33 +++- .../Entities/Stations/nanotrasen.yml | 11 +- .../Prototypes/_DV/Entities/Stations/base.yml | 6 + 14 files changed, 469 insertions(+), 10 deletions(-) create mode 100644 Content.Server/_DV/Communications/CommunicationsConsoleSystem.cs create mode 100644 Content.Server/_DV/Station/Components/StationExfiltrationComponent.cs create mode 100644 Content.Server/_DV/Station/Systems/StationExfiltrationSystem.cs create mode 100644 Content.Shared/_DV/Communications/CommunicationsConsoleExfiltrationShuttleMessage.cs create mode 100644 Resources/Locale/en-US/_DV/shuttles/exfiltration.ftl diff --git a/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs index 0310e91eeb..1a372bdba1 100644 --- a/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs @@ -1,6 +1,7 @@ using Content.Shared.CCVar; using Content.Shared.Chat; using Content.Shared.Communications; +using Content.Shared._DV.Communications; // DeltaV - Exfiltration shuttle using Robust.Client.UserInterface; using Robust.Shared.Configuration; using Robust.Shared.Timing; @@ -27,6 +28,7 @@ namespace Content.Client.Communications.UI _menu.OnBroadcast += BroadcastButtonPressed; _menu.OnAlertLevel += AlertLevelSelected; _menu.OnEmergencyLevel += EmergencyShuttleButtonPressed; + _menu.OnExfiltrationLevel += ExfiltrationShuttleButtonPressed; // DeltaV - Exfiltration shuttle } public void AlertLevelSelected(string level) @@ -46,6 +48,13 @@ namespace Content.Client.Communications.UI CallShuttle(); } + // Begin DeltaV - Exfiltration Shuttle + public void ExfiltrationShuttleButtonPressed() + { + SendMessage(new CommunicationsConsoleExfiltrationShuttleMessage(!_menu!.CountdownStarted)); + } + // End DeltaV - Exfiltration Shuttle + public void AnnounceButtonPressed(string message) { var maxLength = _cfg.GetCVar(CCVars.ChatMaxAnnouncementLength); @@ -85,6 +94,13 @@ namespace Content.Client.Communications.UI _menu.CurrentLevel = commsState.CurrentAlert; _menu.CountdownEnd = commsState.ExpectedCountdownEnd; + + // Begin DeltaV - Exfiltration Shuttle + _menu.CanExfiltrate = commsState.CanCall; + _menu.ExfiltrationCountdownEnd = commsState.ExpectedExfiltrationCountdownEnd; + _menu.ExfiltrationShuttleButton.Disabled = !_menu.CanExfiltrate; + // End DeltaV - Exfiltration Shuttle + _menu.UpdateCountdown(); _menu.UpdateAlertLevels(commsState.AlertLevels, _menu.CurrentLevel); _menu.AlertLevelButton.Disabled = !_menu.AlertLevelSelectable; diff --git a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml index b74df979cf..9132f3f502 100644 --- a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml +++ b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml @@ -52,10 +52,19 @@ + + +