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;
|
|
|
|
|
|
2024-06-01 04:14:43 -04:00
|
|
|
[AdminCommand(AdminFlags.Fun)]
|
2025-06-17 13:22:03 -04:00
|
|
|
public sealed class FaxUiCommand : LocalizedEntityCommands
|
2023-04-16 23:20:57 -07:00
|
|
|
{
|
2025-06-17 13:22:03 -04:00
|
|
|
[Dependency] private readonly EuiManager _euiManager = default!;
|
2023-04-16 23:20:57 -07:00
|
|
|
|
2025-06-17 13:22:03 -04:00
|
|
|
public override string Command => "faxui";
|
2023-04-16 23:20:57 -07:00
|
|
|
|
2025-06-17 13:22:03 -04:00
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
2023-04-16 23:20:57 -07:00
|
|
|
{
|
2024-08-11 09:46:57 +00:00
|
|
|
if (shell.Player is not { } player)
|
2023-04-16 23:20:57 -07:00
|
|
|
{
|
2024-08-11 09:46:57 +00:00
|
|
|
shell.WriteError(Loc.GetString("shell-cannot-run-command-from-server"));
|
2023-04-16 23:20:57 -07:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var ui = new AdminFaxEui();
|
2025-06-17 13:22:03 -04:00
|
|
|
_euiManager.OpenEui(ui, player);
|
2023-04-16 23:20:57 -07:00
|
|
|
}
|
|
|
|
|
}
|