mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
* feat: adminoverlay command * tweak: move adminoverlay perm under ADMIN
33 lines
935 B
C#
33 lines
935 B
C#
using Content.Client.Administration.Systems;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Client._DV.Administration.Commands;
|
|
|
|
public sealed class AdminOverlayCommand : LocalizedEntityCommands
|
|
{
|
|
[Dependency] private readonly AdminSystem _admin = default!;
|
|
public override string Command => "adminoverlay";
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (args.Length != 1 || !Boolean.TryParse(args[0], out var newValue))
|
|
{
|
|
shell.WriteLine(Help);
|
|
return;
|
|
}
|
|
|
|
if (newValue)
|
|
{
|
|
_admin.AdminOverlayOn();
|
|
}
|
|
else
|
|
{
|
|
_admin.AdminOverlayOff();
|
|
}
|
|
}
|
|
|
|
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
|
{
|
|
return args.Length == 1 ? CompletionResult.FromOptions(CompletionHelper.Booleans) : CompletionResult.Empty;
|
|
}
|
|
}
|