OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

ai_config.hpp
Go to the documentation of this file.
1 /* $Id: ai_config.hpp 23735 2012-01-03 20:26:05Z rubidium $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef AI_CONFIG_HPP
13 #define AI_CONFIG_HPP
14
15 #include "../script/script_config.hpp"
16 #include "../company_type.h"
17
18 class AIConfig : public ScriptConfig {
19 public:
23 static AIConfig *GetConfig(CompanyID company, ScriptSettingSource source = SSS_DEFAULT);
24
25 AIConfig() :
26 ScriptConfig()
27 {}
28
29 AIConfig(const AIConfig *config) :
30 ScriptConfig(config)
31 {}
32
33 class AIInfo *GetInfo() const;
34
35 /* virtual */ int GetSetting(const char *name) const;
36 /* virtual */ void SetSetting(const char *name, int value);
37
46 bool ResetInfo(bool force_exact_match);
47
48 protected:
49 /* virtual */ void PushExtraConfigList();
50 /* virtual */ void ClearConfigList();
51 /* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
52 };
53
54 #endif /* AI_CONFIG_HPP */