(svn r26149) -Fix [FS#5825]: [Script] Various API functions did not check whether ScrtipRoad::SetCurrentRoadType was called appropiately.

This commit is contained in:
frosch
2013-12-08 15:44:09 +00:00
parent 0bedd475e3
commit 52c2c53c02
6 changed files with 12 additions and 3 deletions

View File

@@ -85,8 +85,8 @@ public:
* @param start Where to start the tunnel.
* @param vehicle_type The vehicle-type of tunnel to build.
* @pre ScriptMap::IsValidTile(start).
* @pre vehicle_type == ScriptVehicle::VT_ROAD || (vehicle_type == ScriptVehicle::VT_RAIL &&
* ScriptRail::IsRailTypeAvailable(ScriptRail::GetCurrentRailType())).
* @pre (vehicle_type == ScriptVehicle::VT_ROAD && ScriptRoad::IsRoadTypeAvailable(ScriptRoad::GetCurrentRoadType())) ||
* (vehicle_type == ScriptVehicle::VT_RAIL && ScriptRail::IsRailTypeAvailable(ScriptRail::GetCurrentRailType())).
* @game @pre Outside CompanyMode: vehicle_type == ScriptVehicle::VT_ROAD.
* @exception ScriptError::ERR_AREA_NOT_CLEAR
* @exception ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER