diff options
author | yexo <yexo@openttd.org> | 2009-05-07 21:33:38 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-05-07 21:33:38 +0000 |
commit | a00b22b1cd101eebc8dd1f8b54713dd3a3ca00eb (patch) | |
tree | cc8879a7b550a909c37360505840ca50d63d9adb /src/ai/api/ai_controller.hpp | |
parent | 9b4a32deb41a33ea1a83ee1f14256e087460e1e5 (diff) | |
download | openttd-a00b22b1cd101eebc8dd1f8b54713dd3a3ca00eb.tar.xz |
(svn r16253) -Add [NoAI]: AIController::GetVersion, this returns the newgrf-version of OpenTTD
Diffstat (limited to 'src/ai/api/ai_controller.hpp')
-rw-r--r-- | src/ai/api/ai_controller.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ai/api/ai_controller.hpp b/src/ai/api/ai_controller.hpp index 5304039c2..a0d4c8bef 100644 --- a/src/ai/api/ai_controller.hpp +++ b/src/ai/api/ai_controller.hpp @@ -51,6 +51,18 @@ public: static int GetSetting(const char *name); /** + * Get the OpenTTD version of this executable. The version is formatted + * with the bits having the following meaning: + * 28-31 major version + * 24-27 minor version + * 20-23 build + * 19 1 if it is a release, 0 if it is not. + * 0-18 revision number; 0 when the revision is unknown. + * @return The version in newgrf format. + */ + static uint GetVersion(); + + /** * Change the minimum amount of time the AI should be put in suspend mode * when you execute a command. Normally in SP this is 1, and in MP it is * what ever delay the server has been programmed to delay commands |