Nuke ops war anounce sound (#9035)
This commit is contained in:
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Announce sound file path
|
||||
/// </summary>
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier AnnouncementSound = new SoundPathSpecifier("/Audio/Announcements/announce.ogg");
|
||||
|
||||
public BoundUserInterface? UserInterface => Owner.GetUIOrNull(CommunicationsConsoleUiKey.Key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user