ai_marine.hpp

Go to the documentation of this file.
00001 /* $Id: ai_marine.hpp 20348 2010-08-03 16:38:15Z 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_MARINE_HPP
00013 #define AI_MARINE_HPP
00014 
00015 #include "ai_object.hpp"
00016 #include "ai_error.hpp"
00017 
00021 class AIMarine : public AIObject {
00022 public:
00024   static const char *GetClassName() { return "AIMarine"; }
00025 
00029   enum ErrorMessages {
00031     ERR_MARINE_BASE = AIError::ERR_CAT_MARINE << AIError::ERR_CAT_BIT_SIZE,
00032 
00034     ERR_MARINE_MUST_BE_BUILT_ON_WATER,                  // [STR_ERROR_MUST_BE_BUILT_ON_WATER]
00035   };
00036 
00040   enum BuildType {
00041     BT_DOCK,  
00042     BT_DEPOT, 
00043     BT_BUOY,  
00044   };
00045 
00052   static bool IsWaterDepotTile(TileIndex tile);
00053 
00060   static bool IsDockTile(TileIndex tile);
00061 
00068   static bool IsBuoyTile(TileIndex tile);
00069 
00076   static bool IsLockTile(TileIndex tile);
00077 
00084   static bool IsCanalTile(TileIndex tile);
00085 
00097   static bool AreWaterTilesConnected(TileIndex tile_from, TileIndex tile_to);
00098 
00112   static bool BuildWaterDepot(TileIndex tile, TileIndex front);
00113 
00126   static bool BuildDock(TileIndex tile, StationID station_id);
00127 
00137   static bool BuildBuoy(TileIndex tile);
00138 
00147   static bool BuildLock(TileIndex tile);
00148 
00159   static bool BuildCanal(TileIndex tile);
00160 
00168   static bool RemoveWaterDepot(TileIndex tile);
00169 
00177   static bool RemoveDock(TileIndex tile);
00178 
00186   static bool RemoveBuoy(TileIndex tile);
00187 
00195   static bool RemoveLock(TileIndex tile);
00196 
00204   static bool RemoveCanal(TileIndex tile);
00205 
00211   static Money GetBuildCost(BuildType build_type);
00212 };
00213 
00214 #endif /* AI_MARINE_HPP */

Generated on Sun Jan 9 16:01:51 2011 for OpenTTD by  doxygen 1.6.1