2021-07-17 02:37:09 +02:00
|
|
|
|
using Content.Server.Administration;
|
2021-06-19 13:25:05 +02:00
|
|
|
|
using Content.Server.Atmos.EntitySystems;
|
2020-12-03 03:40:47 +01:00
|
|
|
|
using Content.Shared.Administration;
|
2021-02-01 16:49:43 -08:00
|
|
|
|
using Robust.Shared.Console;
|
2020-12-03 03:40:47 +01:00
|
|
|
|
|
2021-07-25 09:04:58 +02:00
|
|
|
|
namespace Content.Server.Atmos.Commands
|
2020-12-03 03:40:47 +01:00
|
|
|
|
{
|
|
|
|
|
|
[AdminCommand(AdminFlags.Debug)]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ListGasesCommand : IConsoleCommand
|
2020-12-03 03:40:47 +01:00
|
|
|
|
{
|
2024-05-12 17:34:52 -07:00
|
|
|
|
[Dependency] private readonly IEntityManager _e = default!;
|
|
|
|
|
|
|
2020-12-03 03:40:47 +01:00
|
|
|
|
public string Command => "listgases";
|
|
|
|
|
|
public string Description => "Prints a list of gases and their indices.";
|
|
|
|
|
|
public string Help => "listgases";
|
|
|
|
|
|
|
2021-02-01 16:49:43 -08:00
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
2020-12-03 03:40:47 +01:00
|
|
|
|
{
|
2024-05-12 17:34:52 -07:00
|
|
|
|
var atmosSystem = _e.System<AtmosphereSystem>();
|
2020-12-03 03:40:47 +01:00
|
|
|
|
|
|
|
|
|
|
foreach (var gasPrototype in atmosSystem.Gases)
|
|
|
|
|
|
{
|
2022-12-20 23:25:34 +01:00
|
|
|
|
var gasName = Loc.GetString(gasPrototype.Name);
|
|
|
|
|
|
shell.WriteLine($"{gasName} ID: {gasPrototype.ID}");
|
2020-12-03 03:40:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|