summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_instance.cpp6
-rw-r--r--src/ai/ai_instance.hpp1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp
index a360d516c..d7459005d 100644
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -18,6 +18,7 @@
#include "ai_config.hpp"
#include "ai_gui.hpp"
+#include "ai.hpp"
#include "../script/script_fatalerror.hpp"
#include "../script/script_suspend.hpp"
@@ -240,6 +241,11 @@ int AIInstance::GetSetting(const char *name)
return AIConfig::GetConfig(_current_company)->GetSetting(name);
}
+ScriptInfo *AIInstance::FindLibrary(const char *library, int version)
+{
+ return (ScriptInfo *)AI::FindLibrary(library, version);
+}
+
/**
* 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 01c472b03..d2642219b 100644
--- a/src/ai/ai_instance.hpp
+++ b/src/ai/ai_instance.hpp
@@ -27,6 +27,7 @@ public:
void Initialize(class AIInfo *info);
/* virtual */ int GetSetting(const char *name);
+ /* virtual */ ScriptInfo *FindLibrary(const char *library, int version);
private:
const char *versionAPI; ///< Current API used by this script.