Announcements play the general announcement sound unless specifically inhibited (#5460)

This commit is contained in:
20kdc
2021-11-22 22:34:48 +00:00
committed by GitHub
parent a983ce3aeb
commit 1ba58456c4
9 changed files with 24 additions and 19 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.Chat.Managers;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.IoC;
using Robust.Shared.Audio;
namespace Content.Server.Announcements
{
@@ -26,14 +27,12 @@ namespace Content.Server.Announcements
if (args.Length == 1)
{
chat.DispatchStationAnnouncement(args[0]);
shell.WriteLine("Sent!");
return;
}
if (args.Length < 2) return;
var message = string.Join(' ', new ArraySegment<string>(args, 1, args.Length-1));
chat.DispatchStationAnnouncement(message, args[0]);
else
{
var message = string.Join(' ', new ArraySegment<string>(args, 1, args.Length-1));
chat.DispatchStationAnnouncement(message, args[0]);
}
shell.WriteLine("Sent!");
}
}