ai_industry.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 AI_INDUSTRY_HPP
00013 #define AI_INDUSTRY_HPP
00014 
00015 #include "ai_object.hpp"
00016 
00020 class AIIndustry : public AIObject {
00021 public:
00023   static const char *GetClassName() { return "AIIndustry"; }
00024 
00026   enum CargoAcceptState {
00027     CAS_NOT_ACCEPTED, 
00028     CAS_ACCEPTED,     
00029     CAS_TEMP_REFUSED, 
00030   };
00031 
00038   static int32 GetIndustryCount();
00039 
00045   static bool IsValidIndustry(IndustryID industry_id);
00046 
00055   static IndustryID GetIndustryID(TileIndex tile);
00056 
00063   static char *GetName(IndustryID industry_id);
00064 
00073   static CargoAcceptState IsCargoAccepted(IndustryID industry_id, CargoID cargo_id);
00074 
00083   static int32 GetStockpiledCargo(IndustryID industry_id, CargoID cargo_id);
00084 
00093   static int32 GetLastMonthProduction(IndustryID industry_id, CargoID cargo_id);
00094 
00103   static int32 GetLastMonthTransported(IndustryID industry_id, CargoID cargo_id);
00104 
00113   static int32 GetLastMonthTransportedPercentage(IndustryID industry_id, CargoID cargo_id);
00114 
00121   static TileIndex GetLocation(IndustryID industry_id);
00122 
00131   static int32 GetAmountOfStationsAround(IndustryID industry_id);
00132 
00142   static int32 GetDistanceManhattanToTile(IndustryID industry_id, TileIndex tile);
00143 
00153   static int32 GetDistanceSquareToTile(IndustryID industry_id, TileIndex tile);
00154 
00161   static bool IsBuiltOnWater(IndustryID industry_id);
00162 
00169   static bool HasHeliport(IndustryID industry_id);
00170 
00178   static TileIndex GetHeliportLocation(IndustryID industry_id);
00179 
00186   static bool HasDock(IndustryID industry_id);
00187 
00195   static TileIndex GetDockLocation(IndustryID industry_id);
00196 
00203   static IndustryType GetIndustryType(IndustryID industry_id);
00204 };
00205 
00206 #endif /* AI_INDUSTRY_HPP */

Generated on Sun Jun 5 04:19:53 2011 for OpenTTD by  doxygen 1.6.1