(svn r23606) -Add: GameScanner, to auto-detect game scripts, and wire it in the console

This commit is contained in:
truebrain
2011-12-19 20:55:56 +00:00
parent b4f832f29f
commit c99950c215
18 changed files with 608 additions and 11 deletions

View File

@@ -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 */