Implements panic bunkering. (#9315)
* Implements panic bunkering. Helps with raid management, esp with unknown accounts. * adds an enable/disable command.
This commit is contained in:
32
Content.Server/Administration/Commands/PanicBunkerCommand.cs
Normal file
32
Content.Server/Administration/Commands/PanicBunkerCommand.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
namespace Content.Server.Administration.Commands;
|
||||
|
||||
[AdminCommand(AdminFlags.Server)]
|
||||
public sealed class PanicBunkerCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
|
||||
public string Command => "panicbunker";
|
||||
public string Description => "Enables or disables the panic bunker functionality.";
|
||||
public string Help => "panicbunker <enabled>";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
shell.WriteError(Loc.GetString("shell-wrong-arguments-number"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bool.TryParse(args[0], out var enabled))
|
||||
{
|
||||
shell.WriteError(Loc.GetString("shell-invalid-bool"));
|
||||
return;
|
||||
}
|
||||
|
||||
_cfg.SetCVar(CCVars.PanicBunkerEnabled, enabled);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user