ai_marine.hpp

Go to the documentation of this file.
00001 /* $Id: ai_marine.hpp 17248 2009-08-21 20:21: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_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:
00023   static const char *GetClassName() { return "AIMarine"; }
00024 
00028   enum ErrorMessages {
00030     ERR_MARINE_BASE = AIError::ERR_CAT_MARINE << AIError::ERR_CAT_BIT_SIZE,
00031 
00033     ERR_MARINE_MUST_BE_BUILT_ON_WATER,                  // [STR_ERROR_MUST_BE_BUILT_ON_WATER]
00034   };
00035 
00042   static bool IsWaterDepotTile(TileIndex tile);
00043 
00050   static bool IsDockTile(TileIndex tile);
00051 
00058   static bool IsBuoyTile(TileIndex tile);
00059 
00066   static bool IsLockTile(TileIndex tile);
00067 
00074   static bool IsCanalTile(TileIndex tile);
00075 
00087   static bool AreWaterTilesConnected(TileIndex tile_from, TileIndex tile_to);
00088 
00101   static bool BuildWaterDepot(TileIndex tile, TileIndex front);
00102 
00115   static bool BuildDock(TileIndex tile, StationID station_id);
00116 
00126   static bool BuildBuoy(TileIndex tile);
00127 
00136   static bool BuildLock(TileIndex tile);
00137 
00148   static bool BuildCanal(TileIndex tile);
00149 
00157   static bool RemoveWaterDepot(TileIndex tile);
00158 
00166   static bool RemoveDock(TileIndex tile);
00167 
00175   static bool RemoveBuoy(TileIndex tile);
00176 
00184   static bool RemoveLock(TileIndex tile);
00185 
00193   static bool RemoveCanal(TileIndex tile);
00194 };
00195 
00196 #endif /* AI_MARINE_HPP */

Generated on Wed Dec 23 23:27:48 2009 for OpenTTD by  doxygen 1.5.6