summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_controller.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-05-07 21:33:38 +0000
committeryexo <yexo@openttd.org>2009-05-07 21:33:38 +0000
commita00b22b1cd101eebc8dd1f8b54713dd3a3ca00eb (patch)
treecc8879a7b550a909c37360505840ca50d63d9adb /src/ai/api/ai_controller.cpp
parent9b4a32deb41a33ea1a83ee1f14256e087460e1e5 (diff)
downloadopenttd-a00b22b1cd101eebc8dd1f8b54713dd3a3ca00eb.tar.xz
(svn r16253) -Add [NoAI]: AIController::GetVersion, this returns the newgrf-version of OpenTTD
Diffstat (limited to 'src/ai/api/ai_controller.cpp')
-rw-r--r--src/ai/api/ai_controller.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ai/api/ai_controller.cpp b/src/ai/api/ai_controller.cpp
index f783bbabb..f9ef2ab16 100644
--- a/src/ai/api/ai_controller.cpp
+++ b/src/ai/api/ai_controller.cpp
@@ -5,6 +5,7 @@
#include "../../stdafx.h"
#include "../../string_func.h"
#include "../../company_base.h"
+#include "../../rev.h"
#include "table/strings.h"
#include "../ai.hpp"
@@ -66,6 +67,11 @@ AIController::~AIController()
return AIConfig::GetConfig(_current_company)->GetSetting(name);
}
+/* static */ uint AIController::GetVersion()
+{
+ return _openttd_newgrf_version;
+}
+
bool AIController::LoadedLibrary(const char *library_name, int *next_number, char *fake_class_name, int fake_class_name_len)
{
LoadedLibraryList::iterator iter = this->loaded_library.find(library_name);