Files
crystall-punk-14/Content.Server/Administration/Commands/FaxUiCommand.cs

27 lines
733 B
C#
Raw Normal View History

2023-04-16 23:20:57 -07:00
using Content.Server.EUI;
using Content.Server.Fax.AdminUI;
using Content.Shared.Administration;
using Robust.Shared.Console;
namespace Content.Server.Administration.Commands;
[AdminCommand(AdminFlags.Fun)]
public sealed class FaxUiCommand : LocalizedEntityCommands
2023-04-16 23:20:57 -07:00
{
[Dependency] private readonly EuiManager _euiManager = default!;
2023-04-16 23:20:57 -07:00
public override string Command => "faxui";
2023-04-16 23:20:57 -07:00
public override void Execute(IConsoleShell shell, string argStr, string[] args)
2023-04-16 23:20:57 -07:00
{
if (shell.Player is not { } player)
2023-04-16 23:20:57 -07:00
{
shell.WriteError(Loc.GetString("shell-cannot-run-command-from-server"));
2023-04-16 23:20:57 -07:00
return;
}
var ui = new AdminFaxEui();
_euiManager.OpenEui(ui, player);
2023-04-16 23:20:57 -07:00
}
}