From e3591f8a1d0b0e5a84cc8b9d45bb5809a622d1f2 Mon Sep 17 00:00:00 2001 From: yexo Date: Mon, 15 Mar 2010 22:42:43 +0000 Subject: (svn r19429) -Fix: when the title game contains an AIPL block the AI settinsg where overwritten by those from the title game --- src/ai/ai_config.hpp | 10 +++++++++- 1 file changed, 9 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 314082aa4..98e98263c 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -61,10 +61,18 @@ public: */ const AIConfigItemList *GetConfigList(); + /* Where to get the config from, either default (depends on current game + * mode) or force either newgame or normal */ + enum AISettingSource { + AISS_DEFAULT, ///< Get the AI config from the current game mode + AISS_FORCE_NEWGAME, ///< Get the newgame AI config + AISS_FORCE_GAME, ///< Get the AI config from the current game + }; + /** * Get the config of a company. */ - static AIConfig *GetConfig(CompanyID company, bool forceNewgameSetting = false); + static AIConfig *GetConfig(CompanyID company, AISettingSource source = AISS_DEFAULT); /** * Get the value of a setting for this config. It might fallback to his -- cgit v1.2.3-70-g09d2