ai_tunnel.hpp

Go to the documentation of this file.
00001 /* $Id: ai_tunnel.hpp 16247 2009-05-06 22:37:19Z rubidium $ */
00002 
00005 #ifndef AI_TUNNEL_HPP
00006 #define AI_TUNNEL_HPP
00007 
00008 #include "ai_object.hpp"
00009 #include "ai_vehicle.hpp"
00010 
00014 class AITunnel : public AIObject {
00015 public:
00016   static const char *GetClassName() { return "AITunnel"; }
00017 
00021   enum ErrorMessages {
00022 
00024     ERR_TUNNEL_BASE = AIError::ERR_CAT_TUNNEL << AIError::ERR_CAT_BIT_SIZE,
00025 
00027     ERR_TUNNEL_CANNOT_BUILD_ON_WATER,            // [STR_3807_CAN_T_BUILD_ON_WATER]
00028 
00030     ERR_TUNNEL_START_SITE_UNSUITABLE,            // [STR_500B_SITE_UNSUITABLE_FOR_TUNNEL]
00031 
00033     ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY,        // [STR_5003_ANOTHER_TUNNEL_IN_THE_WAY]
00034 
00036     ERR_TUNNEL_END_SITE_UNSUITABLE,              // [STR_5005_UNABLE_TO_EXCAVATE_LAND]
00037   };
00038 
00045   static bool IsTunnelTile(TileIndex tile);
00046 
00059   static TileIndex GetOtherTunnelEnd(TileIndex tile);
00060 
00061 #ifndef DOXYGEN_SKIP
00062 
00065   static bool _BuildTunnelRoad1();
00066 
00070   static bool _BuildTunnelRoad2();
00071 #endif /* DOXYGEN_SKIP */
00072 
00095   static bool BuildTunnel(AIVehicle::VehicleType vehicle_type, TileIndex start);
00096 
00104   static bool RemoveTunnel(TileIndex tile);
00105 };
00106 
00107 #endif /* AI_TUNNEL_HPP */

Generated on Sun Nov 15 15:40:09 2009 for OpenTTD by  doxygen 1.5.6