Admin announcement panel. (#4803)

This commit is contained in:
moonheart08
2021-10-09 03:54:27 -05:00
committed by GitHub
parent 2b9f3b2358
commit f635909d4e
8 changed files with 236 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using Content.Server.Administration.UI;
using Content.Server.EUI;
using Content.Shared.Administration;
using Robust.Server.Player;
using Robust.Shared.Console;
using Robust.Shared.IoC;
namespace Content.Server.Administration.Commands
{
[AdminCommand(AdminFlags.Fun)]
public class AnnounceUiCommand : IConsoleCommand
{
public string Command => "announceui";
public string Description => "Opens the announcement UI";
public string Help => $"{Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player as IPlayerSession;
if (player == null)
{
shell.WriteLine("This does not work from the server console.");
return;
}
var eui = IoCManager.Resolve<EuiManager>();
var ui = new AdminAnnounceEui();
eui.OpenEui(ui, player);
}
}
}