diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:56:59 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:56:59 +0000 |
commit | 963802e9a7cb67f51cb7e6ffe9d33a02cfe93821 (patch) | |
tree | d8b2d5c1c2d90c7cb1a02403cea942ab52c2e501 /src/console_cmds.cpp | |
parent | 83f2785f54de1c31267c5586464c97fb39f95b5a (diff) | |
download | openttd-963802e9a7cb67f51cb7e6ffe9d33a02cfe93821.tar.xz |
(svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library)
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 7bc723ec6..030d03154 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1106,6 +1106,16 @@ DEF_CONSOLE_CMD(ConListAI) return true; } +DEF_CONSOLE_CMD(ConListGameLibs) +{ + char buf[4096]; + Game::GetConsoleLibraryList(buf, lastof(buf)); + + PrintLineByLine(buf); + + return true; +} + DEF_CONSOLE_CMD(ConListGame) { char buf[4096]; @@ -1743,7 +1753,7 @@ DEF_CONSOLE_CMD(ConContent) if (strcasecmp(argv[1], "state") == 0) { IConsolePrintF(CC_WHITE, "id, type, state, name"); for (ConstContentIterator iter = _network_content_client.Begin(); iter != _network_content_client.End(); iter++) { - static const char * const types[] = { "Base graphics", "NewGRF", "AI", "AI library", "Scenario", "Heightmap", "Base sound", "Base music", "Game script" }; + static const char * const types[] = { "Base graphics", "NewGRF", "AI", "AI library", "Scenario", "Heightmap", "Base sound", "Base music", "Game script", "GS library" }; assert_compile(lengthof(types) == CONTENT_TYPE_END - CONTENT_TYPE_BEGIN); static const char * const states[] = { "Not selected", "Selected", "Dep Selected", "Installed", "Unknown" }; static const TextColour state_to_colour[] = { CC_COMMAND, CC_INFO, CC_INFO, CC_WHITE, CC_ERROR }; @@ -1907,6 +1917,7 @@ void IConsoleStdLibRegister() IConsoleCmdRegister("stop_ai", ConStopAI); IConsoleCmdRegister("list_game", ConListGame); + IConsoleCmdRegister("list_game_libs", ConListGameLibs); /* networking functions */ #ifdef ENABLE_NETWORK |