From bcbbf2c366b829994983513d2858762874e99964 Mon Sep 17 00:00:00 2001 From: truebrain Date: Tue, 13 Jan 2009 01:46:46 +0000 Subject: (svn r15045) -Add [NoAI API CHANGE]: in info.nut you can now have (optional) a CanLoadFromVersion(version), which should return true/false, to indicate if you can load a savegame made with your AI of version 'version' -Add [NoAI API CHANGE]: in main.nut the Load() function now should be Load(version, data), where 'version' is the version of your AI which made the savegame -Codechange [NoAI]: various of function renames to make things more sane -Add [NoAI]: push the 'version' of the AI through various of layers -Codechange [NoAI]: various of code cleanups -Add [NoAI]: store the version of the AI in the savegame too --- src/ai/ai_config.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ai/ai_config.hpp') diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp index e6790e22a..90c52b563 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -26,8 +26,10 @@ public: /** * Set another AI to be loaded in this slot. + * @param name The name of the AI. + * @param version The version of the AI to load, or -1 of latest. */ - void ChangeAI(const char *name); + void ChangeAI(const char *name, int version = -1); /** * When ever the AI Scanner is reloaded, all infos become invalid. This -- cgit v1.2.3-54-g00ecf