Add fax admin panel (#15215)
This commit is contained in:
31
Content.Server/Administration/Commands/FaxUiCommand.cs
Normal file
31
Content.Server/Administration/Commands/FaxUiCommand.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Fax.AdminUI;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
namespace Content.Server.Administration.Commands;
|
||||
|
||||
[AdminCommand(AdminFlags.Admin)]
|
||||
public sealed class FaxUiCommand : IConsoleCommand
|
||||
{
|
||||
public string Command => "faxui";
|
||||
|
||||
public string Description => Loc.GetString("cmd-faxui-desc");
|
||||
public string Help => Loc.GetString("cmd-faxui-help");
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var player = shell.Player as IPlayerSession;
|
||||
if (player == null)
|
||||
{
|
||||
shell.WriteLine("shell-only-players-can-run-this-command");
|
||||
return;
|
||||
}
|
||||
|
||||
var eui = IoCManager.Resolve<EuiManager>();
|
||||
var ui = new AdminFaxEui();
|
||||
eui.OpenEui(ui, player);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user