# ai_tunnel.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_tunnel.hpp 15520 2009-02-19 09:01:34Z yexo $ */
    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
    00055   static TileIndex GetOtherTunnelEnd(TileIndex tile);
    00056
    00057 #ifndef DOXYGEN_SKIP
    00058
    00061   static bool _BuildTunnelRoad1();
    00062
    00066   static bool _BuildTunnelRoad2();
    00067 #endif /* DOXYGEN_SKIP */
    00068
    00091   static bool BuildTunnel(AIVehicle::VehicleType vehicle_type, TileIndex start);
    00092
    00100   static bool RemoveTunnel(TileIndex tile);
    00101 };
    00102
    00103 #endif /* AI_TUNNEL_HPP */