summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_instance.cpp5
-rw-r--r--src/ai/ai_instance.hpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp
index 2df8c2e44..a360d516c 100644
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -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.
diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp
index 886b716ae..01c472b03 100644
--- a/src/ai/ai_instance.hpp
+++ b/src/ai/ai_instance.hpp
@@ -26,6 +26,8 @@ public:
*/
void Initialize(class AIInfo *info);
+ /* virtual */ int GetSetting(const char *name);
+
private:
const char *versionAPI; ///< Current API used by this script.