ai_config.hpp

Go to the documentation of this file.
00001 /* $Id: ai_config.hpp 23735 2012-01-03 20:26:05Z rubidium $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * 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.
00006  * 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.
00007  * 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/>.
00008  */
00009 
00012 #ifndef AI_CONFIG_HPP
00013 #define AI_CONFIG_HPP
00014 
00015 #include "../script/script_config.hpp"
00016 #include "../company_type.h"
00017 
00018 class AIConfig : public ScriptConfig {
00019 public:
00023   static AIConfig *GetConfig(CompanyID company, ScriptSettingSource source = SSS_DEFAULT);
00024 
00025   AIConfig() :
00026     ScriptConfig()
00027   {}
00028 
00029   AIConfig(const AIConfig *config) :
00030     ScriptConfig(config)
00031   {}
00032 
00033   class AIInfo *GetInfo() const;
00034 
00035   /* virtual */ int GetSetting(const char *name) const;
00036   /* virtual */ void SetSetting(const char *name, int value);
00037 
00046   bool ResetInfo(bool force_exact_match);
00047 
00048 protected:
00049   /* virtual */ void PushExtraConfigList();
00050   /* virtual */ void ClearConfigList();
00051   /* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
00052 };
00053 
00054 #endif /* AI_CONFIG_HPP */