ai_tunnel.hpp

Go to the documentation of this file.
00001 /* $Id: ai_tunnel.hpp 20288 2010-08-01 20:41:46Z yexo $ */
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_TUNNEL_HPP
00013 #define AI_TUNNEL_HPP
00014 
00015 #include "ai_object.hpp"
00016 #include "ai_vehicle.hpp"
00017 
00021 class AITunnel : public AIObject {
00022 public:
00024   static const char *GetClassName() { return "AITunnel"; }
00025 
00029   enum ErrorMessages {
00030 
00032     ERR_TUNNEL_BASE = AIError::ERR_CAT_TUNNEL << AIError::ERR_CAT_BIT_SIZE,
00033 
00035     ERR_TUNNEL_CANNOT_BUILD_ON_WATER,            // [STR_ERROR_CAN_T_BUILD_ON_WATER]
00036 
00038     ERR_TUNNEL_START_SITE_UNSUITABLE,            // [STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL]
00039 
00041     ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY,        // [STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY]
00042 
00044     ERR_TUNNEL_END_SITE_UNSUITABLE,              // [STR_ERROR_UNABLE_TO_EXCAVATE_LAND]
00045   };
00046 
00053   static bool IsTunnelTile(TileIndex tile);
00054 
00067   static TileIndex GetOtherTunnelEnd(TileIndex tile);
00068 
00069 #ifndef DOXYGEN_SKIP
00070 
00073   static bool _BuildTunnelRoad1();
00074 
00078   static bool _BuildTunnelRoad2();
00079 #endif /* DOXYGEN_SKIP */
00080 
00103   static bool BuildTunnel(AIVehicle::VehicleType vehicle_type, TileIndex start);
00104 
00112   static bool RemoveTunnel(TileIndex tile);
00113 };
00114 
00115 #endif /* AI_TUNNEL_HPP */

Generated on Fri Dec 31 17:15:29 2010 for OpenTTD by  doxygen 1.6.1