committed by
GitHub
parent
ea60a81fdf
commit
103bc19508
26
Content.Server/Power/Commands/PowerStatCommand.cs
Normal file
26
Content.Server/Power/Commands/PowerStatCommand.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Power.Commands
|
||||
{
|
||||
[AdminCommand(AdminFlags.Debug)]
|
||||
public sealed class PowerStatCommand : IConsoleCommand
|
||||
{
|
||||
public string Command => "powerstat";
|
||||
public string Description => "Shows statistics for pow3r";
|
||||
public string Help => "Usage: powerstat";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var stats = EntitySystem.Get<PowerNetSystem>().GetStatistics();
|
||||
|
||||
shell.WriteLine($"networks: {stats.CountNetworks}");
|
||||
shell.WriteLine($"loads: {stats.CountLoads}");
|
||||
shell.WriteLine($"supplies: {stats.CountSupplies}");
|
||||
shell.WriteLine($"batteries: {stats.CountBatteries}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user