diff options
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 1844c552e..7bc723ec6 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -37,6 +37,7 @@ #include "newgrf.h" #include "console_func.h" #include "engine_base.h" +#include "game/game.hpp" #ifdef ENABLE_NETWORK #include "table/strings.h" @@ -1105,6 +1106,16 @@ DEF_CONSOLE_CMD(ConListAI) return true; } +DEF_CONSOLE_CMD(ConListGame) +{ + char buf[4096]; + Game::GetConsoleList(buf, lastof(buf)); + + PrintLineByLine(buf); + + return true; +} + DEF_CONSOLE_CMD(ConStartAI) { if (argc == 0 || argc > 3) { @@ -1895,6 +1906,8 @@ void IConsoleStdLibRegister() IConsoleCmdRegister("start_ai", ConStartAI); IConsoleCmdRegister("stop_ai", ConStopAI); + IConsoleCmdRegister("list_game", ConListGame); + /* networking functions */ #ifdef ENABLE_NETWORK /* Content downloading is only available with ZLIB */ |