Make pow3r validation logic available on release (#36075)
I want to run this on live servers. It's behind a power_validate command, it still doesn't automatically get ran outside debug otherwise.
This commit is contained in:
committed by
GitHub
parent
9243d65e6f
commit
290bffceec
29
Content.Server/Power/Commands/PowerValidateCommand.cs
Normal file
29
Content.Server/Power/Commands/PowerValidateCommand.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
namespace Content.Server.Power.Commands;
|
||||
|
||||
[AdminCommand(AdminFlags.Debug)]
|
||||
public sealed class PowerValidateCommand : LocalizedEntityCommands
|
||||
{
|
||||
[Dependency] private readonly PowerNetSystem _powerNet = null!;
|
||||
|
||||
public override string Command => "power_validate";
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
_powerNet.Validate();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
shell.WriteLine(LocalizationManager.GetString("cmd-power_validate-error", ("err", e.ToString())));
|
||||
return;
|
||||
}
|
||||
|
||||
shell.WriteLine(LocalizationManager.GetString("cmd-power_validate-success"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user