equal
deleted
inserted
replaced
101 */ |
101 */ |
102 static int32 GetYearAvailable(BridgeID bridge_id); |
102 static int32 GetYearAvailable(BridgeID bridge_id); |
103 |
103 |
104 /** |
104 /** |
105 * Build a bridge from one tile to the other. |
105 * Build a bridge from one tile to the other. |
|
106 * As an extra for road, this functions builds two half-pieces of road on |
|
107 * each end of the bridge, making it easier for you to connect it to your |
|
108 * network. |
106 * @param vehicle_type The vehicle-type of bridge to build. |
109 * @param vehicle_type The vehicle-type of bridge to build. |
107 * @param bridge_id The bridge-type to build. |
110 * @param bridge_id The bridge-type to build. |
108 * @param start Where to start the bridge. |
111 * @param start Where to start the bridge. |
109 * @param end Where to end the bridge. |
112 * @param end Where to end the bridge. |
110 * @pre AIMap::IsValidTile(start). |
113 * @pre AIMap::IsValidTile(start). |
119 * @exception AIError::ERR_VEHICLE_IN_THE_WAY |
122 * @exception AIError::ERR_VEHICLE_IN_THE_WAY |
120 * @exception AIBridge::ERR_BRIDGE_TYPE_UNAVAILABLE |
123 * @exception AIBridge::ERR_BRIDGE_TYPE_UNAVAILABLE |
121 * @exception AIBridge::ERR_BRIDGE_CANNOT_END_IN_WATER |
124 * @exception AIBridge::ERR_BRIDGE_CANNOT_END_IN_WATER |
122 * @exception AIBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT |
125 * @exception AIBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT |
123 * @return Whether the bridge has been/can be build or not. |
126 * @return Whether the bridge has been/can be build or not. |
|
127 * @note No matter if the road pieces were build or not, if building the |
|
128 * bridge succeeded, this function returns true. |
124 */ |
129 */ |
125 static bool BuildBridge(AIVehicle::VehicleType vehicle_type, BridgeID bridge_id, TileIndex start, TileIndex end); |
130 static bool BuildBridge(AIVehicle::VehicleType vehicle_type, BridgeID bridge_id, TileIndex start, TileIndex end); |
126 |
131 |
127 /** |
132 /** |
128 * Removes a bridge, by executing it on either the start or end tile. |
133 * Removes a bridge, by executing it on either the start or end tile. |