Fix: Don't allow right-click to close world generation progress window. (#13084)
[openttd-github.git] / src / ai / ai_config.hpp
blobb64020b4f0433c8c2a11cf4424f0970886ae87ed
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 /** @file ai_config.hpp AIConfig stores the configuration settings of every AI. */
10 #ifndef AI_CONFIG_HPP
11 #define AI_CONFIG_HPP
13 #include "../script/script_config.hpp"
14 #include "../company_type.h"
16 class AIConfig : public ScriptConfig {
17 public:
18 /**
19 * Get the config of a company.
21 static AIConfig *GetConfig(CompanyID company, ScriptSettingSource source = SSS_DEFAULT);
23 AIConfig() :
24 ScriptConfig()
27 AIConfig(const AIConfig *config) :
28 ScriptConfig(config)
31 class AIInfo *GetInfo() const;
33 /**
34 * When ever the AI Scanner is reloaded, all infos become invalid. This
35 * function tells AIConfig about this.
36 * @param force_exact_match If true try to find the exact same version
37 * as specified. If false any version is ok.
38 * @return \c true if the reset was successful, \c false if the AI was no longer
39 * found.
41 bool ResetInfo(bool force_exact_match);
43 protected:
44 ScriptInfo *FindInfo(const std::string &name, int version, bool force_exact_match) override;
47 #endif /* AI_CONFIG_HPP */