diff --git a/Content.Server/Administration/Commands/LoadGameMapCommand.cs b/Content.Server/Administration/Commands/LoadGameMapCommand.cs index d107a75cdd..156d8147f2 100644 --- a/Content.Server/Administration/Commands/LoadGameMapCommand.cs +++ b/Content.Server/Administration/Commands/LoadGameMapCommand.cs @@ -49,4 +49,31 @@ namespace Content.Server.Administration.Commands } } } + + [AdminCommand(AdminFlags.Round | AdminFlags.Spawn)] + public sealed class ListGameMaps : IConsoleCommand + { + public string Command => "listgamemaps"; + + public string Description => "Lists the game maps that can be used by loadgamemap"; + + public string Help => "listgamemaps"; + + public void Execute(IConsoleShell shell, string argStr, string[] args) + { + var prototypeManager = IoCManager.Resolve(); + var entityManager = IoCManager.Resolve(); + var gameTicker = entityManager.EntitySysManager.GetEntitySystem(); + + if (args.Length != 0) + { + shell.WriteError(Loc.GetString("shell-wrong-arguments-number")); + return; + } + foreach (var prototype in prototypeManager.EnumeratePrototypes()) + { + shell.WriteLine($"{prototype.ID} - {prototype.MapName}"); + } + } + } }