From 7e16ee0b55fdef2ce77b13cd72dbc00b63d776c4 Mon Sep 17 00:00:00 2001 From: avery <51971268+graevy@users.noreply.github.com> Date: Sat, 27 Jan 2024 05:51:24 -0800 Subject: [PATCH] Hallway textscreens (#24189) * hallway screen refactor pending comms console support * comms console broadcasts * screen and timer localization --- ...CommunicationsConsoleBoundUserInterface.cs | 9 ++ .../UI/CommunicationsConsoleMenu.xaml | 1 + .../UI/CommunicationsConsoleMenu.xaml.cs | 3 + Content.Client/TextScreen/TextScreenSystem.cs | 75 +++++++++--- .../TextScreen/TextScreenVisualsComponent.cs | 3 +- .../CommunicationsConsoleComponent.cs | 14 ++- .../CommunicationsConsoleSystem.cs | 26 ++++ Content.Server/RoundEnd/RoundEndSystem.cs | 16 +-- .../Screens/Components/ScreenComponent.cs | 35 ++++++ .../Screens/Systems/ScreenSystem.cs | 114 ++++++++++++++++++ .../Components/ShuttleTimerComponent.cs | 24 ---- .../Shuttles/Systems/ArrivalsSystem.cs | 1 + .../Systems/EmergencyShuttleSystem.Console.cs | 1 + .../Systems/EmergencyShuttleSystem.cs | 13 +- .../Shuttles/Systems/ShuttleTimerSystem.cs | 69 ----------- .../SharedCommunicationsConsoleComponent.cs | 14 ++- .../TextScreen/TextScreenVisuals.cs | 20 +-- .../communications-console-component.ftl | 1 + Resources/Locale/en-US/shuttles/screens.ftl | 2 + Resources/Locale/en-US/shuttles/timer.ftl | 9 ++ .../Machines/Computers/computers.yml | 2 + .../Entities/Structures/Wallmounts/screen.yml | 7 +- .../Entities/Structures/Wallmounts/timer.yml | 1 + 23 files changed, 318 insertions(+), 142 deletions(-) create mode 100644 Content.Server/Screens/Components/ScreenComponent.cs create mode 100644 Content.Server/Screens/Systems/ScreenSystem.cs delete mode 100644 Content.Server/Shuttles/Components/ShuttleTimerComponent.cs delete mode 100644 Content.Server/Shuttles/Systems/ShuttleTimerSystem.cs create mode 100644 Resources/Locale/en-US/shuttles/screens.ftl diff --git a/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs b/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs index 07492b310f..1c94d32bf8 100644 --- a/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs +++ b/Content.Client/Communications/UI/CommunicationsConsoleBoundUserInterface.cs @@ -16,6 +16,8 @@ namespace Content.Client.Communications.UI [ViewVariables] public bool CanAnnounce { get; private set; } + [ViewVariables] + public bool CanBroadcast { get; private set; } [ViewVariables] public bool CanCall { get; private set; } @@ -71,6 +73,11 @@ namespace Content.Client.Communications.UI SendMessage(new CommunicationsConsoleAnnounceMessage(msg)); } + public void BroadcastButtonPressed(string message) + { + SendMessage(new CommunicationsConsoleBroadcastMessage(message)); + } + public void CallShuttle() { SendMessage(new CommunicationsConsoleCallEmergencyShuttleMessage()); @@ -89,6 +96,7 @@ namespace Content.Client.Communications.UI return; CanAnnounce = commsState.CanAnnounce; + CanBroadcast = commsState.CanBroadcast; CanCall = commsState.CanCall; _expectedCountdownTime = commsState.ExpectedCountdownEnd; CountdownStarted = commsState.CountdownStarted; @@ -102,6 +110,7 @@ namespace Content.Client.Communications.UI _menu.AlertLevelButton.Disabled = !AlertLevelSelectable; _menu.EmergencyShuttleButton.Disabled = !CanCall; _menu.AnnounceButton.Disabled = !CanAnnounce; + _menu.BroadcastButton.Disabled = !CanBroadcast; } } diff --git a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml index 86c0b4e2d5..ea2f77d457 100644 --- a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml +++ b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml @@ -5,6 +5,7 @@