Communications Console: The ECSining (#8374)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Chat;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Content.Server.Announcements
|
||||
public string Help => $"{Command} <sender> <message> or {Command} <message> to send announcement as centcomm.";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var chat = IoCManager.Resolve<IChatManager>();
|
||||
var chat = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ChatSystem>();
|
||||
|
||||
if (args.Length == 0)
|
||||
{
|
||||
@@ -23,12 +23,12 @@ namespace Content.Server.Announcements
|
||||
|
||||
if (args.Length == 1)
|
||||
{
|
||||
chat.DispatchStationAnnouncement(args[0], colorOverride: Color.Gold);
|
||||
chat.DispatchGlobalStationAnnouncement(args[0], colorOverride: Color.Gold);
|
||||
}
|
||||
else
|
||||
{
|
||||
var message = string.Join(' ', new ArraySegment<string>(args, 1, args.Length-1));
|
||||
chat.DispatchStationAnnouncement(message, args[0], colorOverride: Color.Gold);
|
||||
chat.DispatchGlobalStationAnnouncement(message, args[0], colorOverride: Color.Gold);
|
||||
}
|
||||
shell.WriteLine("Sent!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user