CatStation/Content.Server/Power/Commands/PowerValidateCommand.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* 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
2026-05-09 03:29:58 +00:00

29 lines
848 B
C#

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 partial class PowerValidateCommand : LocalizedEntityCommands
{
[Dependency] private 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"));
}
}