diff --git a/Content.Server/Chat/ChatManager.cs b/Content.Server/Chat/ChatManager.cs index 7e291f5cef..0add7b9891 100644 --- a/Content.Server/Chat/ChatManager.cs +++ b/Content.Server/Chat/ChatManager.cs @@ -71,12 +71,12 @@ namespace Content.Server.Chat _netManager.ServerSendToAll(msg); } - public void DispatchStationAnnouncement(string message) + public void DispatchStationAnnouncement(string message, string sender = "CentComm") { var msg = _netManager.CreateNetMessage(); msg.Channel = ChatChannel.Radio; msg.Message = message; - msg.MessageWrap = "Centcom Announcement:\n{0}"; + msg.MessageWrap = $"{sender} Announcement:\n{{0}}"; _netManager.ServerSendToAll(msg); } diff --git a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs index 2e3f6f6f48..858a10d3e3 100644 --- a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs @@ -9,6 +9,7 @@ using Robust.Server.Interfaces.GameObjects; using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.ViewVariables; diff --git a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs index df1c5520db..69fecf41f2 100644 --- a/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/RoundEndSystem.cs @@ -3,6 +3,7 @@ using System.Threading; using Content.Server.Interfaces.Chat; using Content.Server.Interfaces.GameTicking; using Content.Shared.GameTicking; +using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; @@ -48,6 +49,10 @@ namespace Content.Server.GameObjects.EntitySystems IsRoundEndCountdownStarted = true; + _chatManager.DispatchStationAnnouncement(Loc.GetString("An emergency shuttle has been sent. ETA: {0} minutes.", RoundEndCountdownTime.Minutes), Loc.GetString("Station")); + + Get().PlayGlobal("/Audio/Announcements/shuttlecalled.ogg"); + ExpectedCountdownEnd = _gameTiming.CurTime + RoundEndCountdownTime; Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token); OnRoundEndCountdownStarted?.Invoke(); @@ -60,6 +65,10 @@ namespace Content.Server.GameObjects.EntitySystems IsRoundEndCountdownStarted = false; + _chatManager.DispatchStationAnnouncement(Loc.GetString("The emergency shuttle has been recalled."), Loc.GetString("Station")); + + Get().PlayGlobal("/Audio/Announcements/shuttlerecalled.ogg"); + _roundEndCancellationTokenSource.Cancel(); _roundEndCancellationTokenSource = new CancellationTokenSource(); diff --git a/Content.Server/Interfaces/Chat/IChatManager.cs b/Content.Server/Interfaces/Chat/IChatManager.cs index 5dfcdbc458..ce5304d5c6 100644 --- a/Content.Server/Interfaces/Chat/IChatManager.cs +++ b/Content.Server/Interfaces/Chat/IChatManager.cs @@ -16,7 +16,8 @@ namespace Content.Server.Interfaces.Chat /// Station announcement to every player /// /// - void DispatchStationAnnouncement(string message); + /// + void DispatchStationAnnouncement(string message, string sender = "CentComm"); void DispatchServerMessage(IPlayerSession player, string message); diff --git a/Resources/Audio/Announcements/shuttlecalled.ogg b/Resources/Audio/Announcements/shuttlecalled.ogg new file mode 100644 index 0000000000..716bf82465 Binary files /dev/null and b/Resources/Audio/Announcements/shuttlecalled.ogg differ diff --git a/Resources/Audio/Announcements/shuttledock.ogg b/Resources/Audio/Announcements/shuttledock.ogg new file mode 100644 index 0000000000..0f70bebc75 Binary files /dev/null and b/Resources/Audio/Announcements/shuttledock.ogg differ diff --git a/Resources/Audio/Announcements/shuttlerecalled.ogg b/Resources/Audio/Announcements/shuttlerecalled.ogg new file mode 100644 index 0000000000..5f6db404b8 Binary files /dev/null and b/Resources/Audio/Announcements/shuttlerecalled.ogg differ