script_infrastructure.hpp

Go to the documentation of this file.
00001 /* $Id$ */
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_INFRASTRUCTURE_HPP
00013 #define SCRIPT_INFRASTRUCTURE_HPP
00014 
00015 #include "script_object.hpp"
00016 #include "script_road.hpp"
00017 #include "script_rail.hpp"
00018 
00023 class ScriptInfrastructure : public ScriptObject {
00024 public:
00026   enum Infrastructure {
00027     INFRASTRUCTURE_RAIL,    
00028     INFRASTRUCTURE_SIGNALS, 
00029     INFRASTRUCTURE_ROAD,    
00030     INFRASTRUCTURE_CANAL,   
00031     INFRASTRUCTURE_STATION, 
00032     INFRASTRUCTURE_AIRPORT, 
00033   };
00034 
00041   static uint32 GetRailPieceCount(ScriptCompany::CompanyID company, ScriptRail::RailType railtype);
00042 
00049   static uint32 GetRoadPieceCount(ScriptCompany::CompanyID company, ScriptRoad::RoadType roadtype);
00050 
00058   static uint32 GetInfrastructurePieceCount(ScriptCompany::CompanyID company, Infrastructure infra_type);
00059 
00066   static Money GetMonthlyRailCosts(ScriptCompany::CompanyID company, ScriptRail::RailType railtype);
00067 
00074   static Money GetMonthlyRoadCosts(ScriptCompany::CompanyID company, ScriptRoad::RoadType roadtype);
00075 
00083   static Money GetMonthlyInfrastructureCosts(ScriptCompany::CompanyID company, Infrastructure infra_type);
00084 };
00085 
00086 #endif /* SCRIPT_INFRASTRUCTURE_HPP */