00001 /* $Id: script_industrytype.hpp 23633 2011-12-19 21:05:36Z truebrain $ */ 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 SCRIPT_INDUSTRYTYPE_HPP 00013 #define SCRIPT_INDUSTRYTYPE_HPP 00014 00015 #include "script_list.hpp" 00016 00021 class ScriptIndustryType : public ScriptObject { 00022 public: 00026 enum SpecialIndustryType { 00027 INDUSTRYTYPE_UNKNOWN = 0xFE, 00028 INDUSTRYTYPE_TOWN = 0xFF, 00029 }; 00030 00036 static bool IsValidIndustryType(IndustryType industry_type); 00037 00044 static char *GetName(IndustryType industry_type); 00045 00054 static ScriptList *GetProducedCargo(IndustryType industry_type); 00055 00064 static ScriptList *GetAcceptedCargo(IndustryType industry_type); 00065 00072 static bool IsRawIndustry(IndustryType industry_type); 00073 00080 static bool ProductionCanIncrease(IndustryType industry_type); 00081 00088 static Money GetConstructionCost(IndustryType industry_type); 00089 00097 static bool CanBuildIndustry(IndustryType industry_type); 00098 00107 static bool CanProspectIndustry(IndustryType industry_type); 00108 00117 static bool BuildIndustry(IndustryType industry_type, TileIndex tile); 00118 00129 static bool ProspectIndustry(IndustryType industry_type); 00130 00137 static bool IsBuiltOnWater(IndustryType industry_type); 00138 00145 static bool HasHeliport(IndustryType industry_type); 00146 00153 static bool HasDock(IndustryType industry_type); 00154 }; 00155 00156 #endif /* SCRIPT_INDUSTRYTYPE_HPP */