1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 09:29:10 +00:00

(svn r23364) -Codechange: refactor AIConfig, moving it mostly to Scriptconfig

This commit is contained in:
truebrain
2011-11-29 23:26:35 +00:00
parent c38c16773c
commit 34d7f01ccc
21 changed files with 815 additions and 643 deletions

View File

@@ -1150,8 +1150,8 @@ DEF_CONSOLE_CMD(ConStartAI)
AIConfig *config = AIConfig::GetConfig((CompanyID)n);
if (argc >= 2) {
config->ChangeAI(argv[1], -1, true);
if (!config->HasAI()) {
config->Change(argv[1], -1, true);
if (!config->HasScript()) {
IConsoleWarning("Failed to load the specified AI");
return true;
}