2021-10-09 03:54:27 -05:00
|
|
|
using Content.Server.Administration.UI;
|
|
|
|
|
using Content.Server.EUI;
|
|
|
|
|
using Content.Shared.Administration;
|
|
|
|
|
using Robust.Shared.Console;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Administration.Commands
|
|
|
|
|
{
|
2024-06-01 04:14:43 -04:00
|
|
|
[AdminCommand(AdminFlags.Moderator)]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class AnnounceUiCommand : IConsoleCommand
|
2021-10-09 03:54:27 -05:00
|
|
|
{
|
|
|
|
|
public string Command => "announceui";
|
|
|
|
|
|
|
|
|
|
public string Description => "Opens the announcement UI";
|
|
|
|
|
|
|
|
|
|
public string Help => $"{Command}";
|
|
|
|
|
|
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
|
|
|
{
|
2023-10-28 09:59:53 +11:00
|
|
|
var player = shell.Player;
|
2021-10-09 03:54:27 -05:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|