Station management commands (#5553)

This commit is contained in:
Moony
2021-11-27 00:43:43 -06:00
committed by GitHub
parent 7de62519e5
commit 7792c0b5f1
8 changed files with 203 additions and 10 deletions

View File

@@ -0,0 +1,24 @@
using Content.Server.Station;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
namespace Content.Server.Administration.Commands.Station;
[AdminCommand(AdminFlags.Admin)]
public class ListStationsCommand : IConsoleCommand
{
public string Command => "lsstations";
public string Description => "List all active stations";
public string Help => "lsstations";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
foreach (var (id, station) in EntitySystem.Get<StationSystem>().StationInfo)
{
shell.WriteLine($"{id.Id, -2} | {station.Name} | {station.MapPrototype.ID}");
}
}
}