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/>.
8 /** @file ai_config.hpp AIConfig stores the configuration settings of every AI. */
13 #include "../script/script_config.hpp"
14 #include "../company_type.h"
16 class AIConfig
: public ScriptConfig
{
19 * Get the config of a company.
21 static AIConfig
*GetConfig(CompanyID company
, ScriptSettingSource source
= SSS_DEFAULT
);
27 AIConfig(const AIConfig
*config
) :
31 class AIInfo
*GetInfo() const;
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
41 bool ResetInfo(bool force_exact_match
);
44 ScriptInfo
*FindInfo(const std::string
&name
, int version
, bool force_exact_match
) override
;
47 #endif /* AI_CONFIG_HPP */