(svn r23367) -Codechange: refactor GetSetting to ScriptInstance, to avoid global variable in script_controller
This commit is contained in:
@@ -235,6 +235,11 @@ void AIInstance::LoadDummyScript()
|
||||
Script_CreateDummy(this->engine->GetVM(), STR_ERROR_AI_NO_AI_FOUND, "AI");
|
||||
}
|
||||
|
||||
int AIInstance::GetSetting(const char *name)
|
||||
{
|
||||
return AIConfig::GetConfig(_current_company)->GetSetting(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* DoCommand callback function for all commands executed by AIs.
|
||||
* @param result The result of the command.
|
||||
|
Reference in New Issue
Block a user