diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs
index f38e3ff7ab..07ba61edc0 100644
--- a/Content.Server/Chat/Systems/ChatSystem.cs
+++ b/Content.Server/Chat/Systems/ChatSystem.cs
@@ -16,6 +16,7 @@ using Content.Shared.Chat;
using Content.Shared.Database;
using Content.Shared.IdentityManagement;
using Content.Shared.Inventory;
+using Content.Shared.Sound;
using Robust.Server.Player;
using Robust.Shared.Audio;
using Robust.Shared.Configuration;
@@ -51,7 +52,7 @@ public sealed partial class ChatSystem : SharedChatSystem
private const int VoiceRange = 7; // how far voice goes in world units
private const int WhisperRange = 2; // how far whisper goes in world units
- private const string AnnouncementSound = "/Audio/Announcements/announce.ogg";
+ private const string DefaultAnnouncementSound = "/Audio/Announcements/announce.ogg";
private bool _loocEnabled = true;
private readonly bool _adminLoocEnabled = true;
@@ -170,16 +171,16 @@ public sealed partial class ChatSystem : SharedChatSystem
///
/// The contents of the message
/// The sender (Communications Console in Communications Console Announcement)
- /// Play the announcement sound
+ /// Play the announcement sound
/// Optional color for the announcement message
public void DispatchGlobalAnnouncement(string message, string sender = "Central Command",
- bool playDefaultSound = true, Color? colorOverride = null)
+ bool playSound = true, SoundSpecifier? announcementSound = null, Color? colorOverride = null)
{
var messageWrap = Loc.GetString("chat-manager-sender-announcement-wrap-message", ("sender", sender));
_chatManager.ChatMessageToAll(ChatChannel.Radio, message, messageWrap, colorOverride);
- if (playDefaultSound)
+ if (playSound)
{
- SoundSystem.Play(AnnouncementSound, Filter.Broadcast(), AudioParams.Default.WithVolume(-2f));
+ SoundSystem.Play(announcementSound?.GetSound() ?? DefaultAnnouncementSound, Filter.Broadcast(), AudioParams.Default.WithVolume(-2f));
}
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Global station announcement from {sender}: {message}");
}
@@ -192,7 +193,8 @@ public sealed partial class ChatSystem : SharedChatSystem
/// The sender (Communications Console in Communications Console Announcement)
/// Play the announcement sound
/// Optional color for the announcement message
- public void DispatchStationAnnouncement(EntityUid source, string message, string sender = "Central Command", bool playDefaultSound = true, Color? colorOverride = null)
+ public void DispatchStationAnnouncement(EntityUid source, string message, string sender = "Central Command",
+ bool playDefaultSound = true, SoundSpecifier? announcementSound = null, Color? colorOverride = null)
{
var messageWrap = Loc.GetString("chat-manager-sender-announcement-wrap-message", ("sender", sender));
var station = _stationSystem.GetOwningStation(source);
@@ -211,7 +213,7 @@ public sealed partial class ChatSystem : SharedChatSystem
if (playDefaultSound)
{
- SoundSystem.Play(AnnouncementSound, filter, AudioParams.Default.WithVolume(-2f));
+ SoundSystem.Play(announcementSound?.GetSound() ?? DefaultAnnouncementSound, filter, AudioParams.Default.WithVolume(-2f));
}
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Station Announcement on {station} from {sender}: {message}");
diff --git a/Content.Server/Communications/CommunicationsConsoleComponent.cs b/Content.Server/Communications/CommunicationsConsoleComponent.cs
index 4770f65f3e..7b35a25288 100644
--- a/Content.Server/Communications/CommunicationsConsoleComponent.cs
+++ b/Content.Server/Communications/CommunicationsConsoleComponent.cs
@@ -1,5 +1,6 @@
using Content.Server.UserInterface;
using Content.Shared.Communications;
+using Content.Shared.Sound;
using Robust.Server.GameObjects;
namespace Content.Server.Communications
@@ -50,6 +51,12 @@ namespace Content.Server.Communications
[DataField("global")]
public bool AnnounceGlobal = false;
+ ///
+ /// Announce sound file path
+ ///
+ [DataField("sound")]
+ public SoundSpecifier AnnouncementSound = new SoundPathSpecifier("/Audio/Announcements/announce.ogg");
+
public BoundUserInterface? UserInterface => Owner.GetUIOrNull(CommunicationsConsoleUiKey.Key);
}
}
diff --git a/Content.Server/Communications/CommunicationsConsoleSystem.cs b/Content.Server/Communications/CommunicationsConsoleSystem.cs
index b56c342f71..b5a2ffd84f 100644
--- a/Content.Server/Communications/CommunicationsConsoleSystem.cs
+++ b/Content.Server/Communications/CommunicationsConsoleSystem.cs
@@ -250,7 +250,7 @@ namespace Content.Server.Communications
msg += "\n" + Loc.GetString("comms-console-announcement-sent-by") + " " + author;
if (comp.AnnounceGlobal)
{
- _chatSystem.DispatchGlobalAnnouncement(msg, title, colorOverride: comp.AnnouncementColor);
+ _chatSystem.DispatchGlobalAnnouncement(msg, title, announcementSound: comp.AnnouncementSound, colorOverride: comp.AnnouncementColor);
return;
}
_chatSystem.DispatchStationAnnouncement(uid, msg, title, colorOverride: comp.AnnouncementColor);
diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs
index 63832b877f..14e44bcebc 100644
--- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs
+++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs
@@ -484,7 +484,7 @@ namespace Content.Server.GameTicking
if (!proto.GamePresets.Contains(Preset.ID)) continue;
if (proto.Message != null)
- _chatSystem.DispatchGlobalAnnouncement(Loc.GetString(proto.Message), playDefaultSound: true);
+ _chatSystem.DispatchGlobalAnnouncement(Loc.GetString(proto.Message), playSound: true);
if (proto.Sound != null)
SoundSystem.Play(proto.Sound.GetSound(), Filter.Broadcast());
diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs
index 0895359649..d41191c2b3 100644
--- a/Content.Server/Nuke/NukeSystem.cs
+++ b/Content.Server/Nuke/NukeSystem.cs
@@ -432,7 +432,7 @@ namespace Content.Server.Nuke
var announcement = Loc.GetString("nuke-component-announcement-armed",
("time", (int) component.RemainingTime), ("position", posText));
var sender = Loc.GetString("nuke-component-announcement-sender");
- _chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false, Color.Red);
+ _chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false, null, Color.Red);
NukeArmedAudio(component);
diff --git a/Content.Server/RoundEnd/RoundEndSystem.cs b/Content.Server/RoundEnd/RoundEndSystem.cs
index effbbdef9a..1be2fec643 100644
--- a/Content.Server/RoundEnd/RoundEndSystem.cs
+++ b/Content.Server/RoundEnd/RoundEndSystem.cs
@@ -133,6 +133,7 @@ namespace Content.Server.RoundEnd
("units", Loc.GetString(units))),
Loc.GetString("Station"),
false,
+ null,
Color.Gold);
SoundSystem.Play("/Audio/Announcements/shuttlecalled.ogg", Filter.Broadcast());
diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs
index cd50e21a74..8f9566930c 100644
--- a/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs
+++ b/Content.Server/Shuttles/Systems/ShuttleSystem.EmergencyConsole.cs
@@ -222,7 +222,7 @@ public sealed partial class ShuttleSystem
if (remaining > 0)
_chatSystem.DispatchGlobalAnnouncement(
Loc.GetString("emergency-shuttle-console-auth-left", ("remaining", remaining)),
- playDefaultSound: false, colorOverride: DangerColor);
+ playSound: false, colorOverride: DangerColor);
if (!CheckForLaunch(component))
SoundSystem.Play("/Audio/Misc/notice1.ogg", Filter.Broadcast());
@@ -297,7 +297,7 @@ public sealed partial class ShuttleSystem
_announced = true;
_chatSystem.DispatchGlobalAnnouncement(
Loc.GetString("emergency-shuttle-launch-time", ("consoleAccumulator", $"{_consoleAccumulator:0}")),
- playDefaultSound: false,
+ playSound: false,
colorOverride: DangerColor);
SoundSystem.Play("/Audio/Misc/notice1.ogg", Filter.Broadcast());
diff --git a/Content.Server/StationEvents/Events/BreakerFlip.cs b/Content.Server/StationEvents/Events/BreakerFlip.cs
index 50b3fe8588..3a14f5c3cc 100644
--- a/Content.Server/StationEvents/Events/BreakerFlip.cs
+++ b/Content.Server/StationEvents/Events/BreakerFlip.cs
@@ -18,7 +18,7 @@ public sealed class BreakerFlip : StationEventSystem
base.Added();
var str = Loc.GetString("station-event-breaker-flip-announcement", ("data", Loc.GetString(Loc.GetString($"random-sentience-event-data-{RobustRandom.Next(1, 6)}"))));
- ChatSystem.DispatchGlobalAnnouncement(str, playDefaultSound: false, colorOverride: Color.Gold);
+ ChatSystem.DispatchGlobalAnnouncement(str, playSound: false, colorOverride: Color.Gold);
}
public override void Started()
diff --git a/Content.Server/StationEvents/Events/FalseAlarm.cs b/Content.Server/StationEvents/Events/FalseAlarm.cs
index a42697a865..701f1c2d0d 100644
--- a/Content.Server/StationEvents/Events/FalseAlarm.cs
+++ b/Content.Server/StationEvents/Events/FalseAlarm.cs
@@ -21,7 +21,7 @@ namespace Content.Server.StationEvents.Events
if (cfg.StartAnnouncement != null)
{
- ChatSystem.DispatchGlobalAnnouncement(Loc.GetString(cfg.StartAnnouncement), playDefaultSound: false, colorOverride: Color.Gold);
+ ChatSystem.DispatchGlobalAnnouncement(Loc.GetString(cfg.StartAnnouncement), playSound: false, colorOverride: Color.Gold);
}
if (cfg.StartAudio != null)
diff --git a/Content.Server/StationEvents/Events/StationEventSystem.cs b/Content.Server/StationEvents/Events/StationEventSystem.cs
index 23926d6e93..7f8c5a3460 100644
--- a/Content.Server/StationEvents/Events/StationEventSystem.cs
+++ b/Content.Server/StationEvents/Events/StationEventSystem.cs
@@ -62,7 +62,7 @@ namespace Content.Server.StationEvents.Events
if (ev.StartAnnouncement != null)
{
- ChatSystem.DispatchGlobalAnnouncement(Loc.GetString(ev.StartAnnouncement), playDefaultSound: false, colorOverride: Color.Gold);
+ ChatSystem.DispatchGlobalAnnouncement(Loc.GetString(ev.StartAnnouncement), playSound: false, colorOverride: Color.Gold);
}
if (ev.StartAudio != null)
@@ -85,7 +85,7 @@ namespace Content.Server.StationEvents.Events
if (ev.EndAnnouncement != null)
{
- ChatSystem.DispatchGlobalAnnouncement(Loc.GetString(ev.EndAnnouncement), playDefaultSound: false, colorOverride: Color.Gold);
+ ChatSystem.DispatchGlobalAnnouncement(Loc.GetString(ev.EndAnnouncement), playSound: false, colorOverride: Color.Gold);
}
if (ev.EndAudio != null)
diff --git a/Resources/Audio/Announcements/license.txt b/Resources/Audio/Announcements/license.txt
index dd0409ca26..40efa6413f 100644
--- a/Resources/Audio/Announcements/license.txt
+++ b/Resources/Audio/Announcements/license.txt
@@ -5,4 +5,5 @@ outbreak7.ogg taken from /tg/station at commit https://github.com/tgstation/tgst
welcome.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0
announce.ogg taken from /tg/station https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a cut from the beginning of "shuttlerecalled.ogg" used under CC-BY-SA-3.0
-shuttle_dock.ogg taken from /tg/station at https://github.com/tgstation/tgstation/blob/b327cb667c1ca5d1aa14e6368e66cbfa7b343b9c/sound/ai/default/shuttledock.ogg used under CC-BY-SA-3.0
\ No newline at end of file
+shuttle_dock.ogg taken from /tg/station at https://github.com/tgstation/tgstation/blob/b327cb667c1ca5d1aa14e6368e66cbfa7b343b9c/sound/ai/default/shuttledock.ogg used under CC-BY-SA-3.0
+war.ogg taken from Paradise at https://github.com/ParadiseSS13/Paradise/blob/07b26ee6b4a11a0607986d322ee007020569feae/sound/effects/siren.ogg used under CC-BY-SA-3.0, volume increased
diff --git a/Resources/Audio/Announcements/war.ogg b/Resources/Audio/Announcements/war.ogg
new file mode 100644
index 0000000000..f1eb117380
Binary files /dev/null and b/Resources/Audio/Announcements/war.ogg differ
diff --git a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
index a488141322..aa67b2e36f 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml
@@ -371,6 +371,7 @@
color: "#ff0000"
canShuttle: false
global: true #announce to everyone they're about to fuck shit up
+ sound: /Audio/Announcements/war.ogg
- type: Computer
board: SyndicateCommsComputerCircuitboard
- type: PointLight