mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
28 lines
854 B
C#
28 lines
854 B
C#
using Content.Server.Administration.UI;
|
|
using Content.Server.EUI;
|
|
using Content.Shared.Administration;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Server.Administration.Commands
|
|
{
|
|
[AdminCommand(AdminFlags.Permissions)]
|
|
public sealed partial class OpenPermissionsCommand : LocalizedEntityCommands
|
|
{
|
|
[Dependency] private EuiManager _euiManager = default!;
|
|
|
|
public override string Command => "permissions";
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
var player = shell.Player;
|
|
if (player == null)
|
|
{
|
|
shell.WriteLine(Loc.GetString($"shell-cannot-run-command-from-server"));
|
|
return;
|
|
}
|
|
|
|
var ui = new PermissionsEui();
|
|
_euiManager.OpenEui(ui, player);
|
|
}
|
|
}
|
|
}
|