From 67106dc0633c50ef6545d0ab6253384b276ab40e Mon Sep 17 00:00:00 2001 From: yexo Date: Tue, 18 Aug 2009 18:51:42 +0000 Subject: (svn r17214) -Add [NoAI]: GetAPIVersion() as optional function in info.nut. Return "0.7" to get an api compatible (as much as possible) with the 0.7 api or "0.8" to get the latest api. -Change [NoAI]: move all deprecated functions to a separate squirrel script that is only loaded if an AI requests an old API version. --- src/ai/ai_info.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ai/ai_info.hpp') diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp index 81b1def3e..0a6e51eda 100644 --- a/src/ai/ai_info.hpp +++ b/src/ai/ai_info.hpp @@ -99,10 +99,16 @@ public: */ bool UseAsRandomAI() const { return this->use_as_random; } + /** + * Get the API version this AI is written for. + */ + const char *GetAPIVersion() const { return this->api_version; } + private: AIConfigItemList config_list; int min_loadable_version; bool use_as_random; + const char *api_version; }; class AILibrary : public AIFileInfo { -- cgit v1.2.3-54-g00ecf