Files
tbd-station-14/Content.Server/Power/Commands/PowerStatCommand.cs
Pieter-Jan Briers 103bc19508 Pow3r: stage 1 (#4208)
Co-authored-by: 20kdc <asdd2808@gmail.com>
2021-07-04 18:11:52 +02:00

27 lines
930 B
C#

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}");
}
}
}