(svn r23629) -Add: allow ScriptRoad::BuildRoad, ScriptBridge::BuildBridge (for roads) and ScriptTunnel:BuildTunnel (for roads) to work for GameScript

This commit is contained in:
truebrain
2011-12-19 21:02:33 +00:00
parent 2fc120d4d1
commit 102c7ae60e
14 changed files with 81 additions and 33 deletions

View File

@@ -87,6 +87,7 @@ public:
* @pre ScriptMap::IsValidTile(start).
* @pre vehicle_type == ScriptVehicle::VT_ROAD || (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
* @exception ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE
@@ -96,7 +97,7 @@ public:
* @note The slope of a tile can be determined by ScriptTile::GetSlope(TileIndex).
* @note No matter if the road pieces were build or not, if building the
* tunnel succeeded, this function returns true.
* @api -game
* @game @note Building a bridge (without CompanyMode) results in a bridge owned by towns.
*/
static bool BuildTunnel(ScriptVehicle::VehicleType vehicle_type, TileIndex start);