diff options
author | Yexo <yexo@openttd.org> | 2009-01-20 16:49:10 +0000 |
---|---|---|
committer | Yexo <yexo@openttd.org> | 2009-01-20 16:49:10 +0000 |
commit | 3d35b3c2cc8b227d0cc2df61b4e8dbd70b6a78f1 (patch) | |
tree | 09d1d76f4f48c9a1a82dc292ae48bd8ffb432849 /src/ai/ai_config.hpp | |
parent | 49c5c7134807bb2d975a85f974523b699169ef6d (diff) | |
download | openttd-3d35b3c2cc8b227d0cc2df61b4e8dbd70b6a78f1.tar.xz |
(svn r15175) -Feature: Add the option to select the AIs to start in a new game and configure them via the gui.
Diffstat (limited to 'src/ai/ai_config.hpp')
-rw-r--r-- | src/ai/ai_config.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp index d56a09bbc..ba76a3add 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -6,6 +6,7 @@ #define AI_CONFIG_HPP #include <map> +#include "ai_info.hpp" #ifndef AI_HPP struct ltstr { bool operator()(const char *s1, const char *s2) const { return strcmp(s1, s2) < 0; } }; @@ -19,7 +20,8 @@ public: AIConfig() : name(NULL), version(-1), - info(NULL) + info(NULL), + config_list(NULL) {} AIConfig(const AIConfig *config); ~AIConfig(); @@ -45,6 +47,11 @@ public: class AIInfo *GetInfo(); /** + * Get the config list for this AIConfig. + */ + const AIConfigItemList *GetConfigList(); + + /** * Get the config of a company. */ static AIConfig *GetConfig(CompanyID company, bool forceNewgameSetting = false); @@ -64,6 +71,11 @@ public: void SetSetting(const char *name, int value); /** + * Reset all settings to their default value. + */ + void ResetSettings(); + + /** * Randomize all settings the AI requested to be randomized. */ void AddRandomDeviation(); @@ -100,6 +112,7 @@ private: int version; class AIInfo *info; SettingValueList settings; + AIConfigItemList *config_list; }; #endif /* AI_CONFIG_HPP */ |