Merge branch 'master' into jgrpp
# Conflicts: # src/music.cpp # src/script/api/script_company.cpp # src/script/api/script_event_types.cpp # src/script/api/script_group.cpp # src/script/api/script_object.cpp # src/script/api/script_road.cpp
This commit is contained in:
@@ -79,6 +79,7 @@ static void _DoCommandReturnBuildTunnel1(class ScriptInstance *instance)
|
||||
|
||||
/* static */ bool ScriptTunnel::BuildTunnel(ScriptVehicle::VehicleType vehicle_type, TileIndex start)
|
||||
{
|
||||
EnforceDeityOrCompanyModeValid(false);
|
||||
EnforcePrecondition(false, ::IsValidTile(start));
|
||||
EnforcePrecondition(false, vehicle_type == ScriptVehicle::VT_RAIL || vehicle_type == ScriptVehicle::VT_ROAD);
|
||||
EnforcePrecondition(false, vehicle_type != ScriptVehicle::VT_RAIL || ScriptRail::IsRailTypeAvailable(ScriptRail::GetCurrentRailType()));
|
||||
@@ -105,6 +106,8 @@ static void _DoCommandReturnBuildTunnel1(class ScriptInstance *instance)
|
||||
|
||||
/* static */ bool ScriptTunnel::_BuildTunnelRoad1()
|
||||
{
|
||||
EnforceDeityOrCompanyModeValid(false);
|
||||
|
||||
/* Build the piece of road on the 'start' side of the tunnel */
|
||||
TileIndex end = ScriptObject::GetCallbackVariable(0);
|
||||
TileIndex start = ScriptTunnel::GetOtherTunnelEnd(end);
|
||||
@@ -117,6 +120,8 @@ static void _DoCommandReturnBuildTunnel1(class ScriptInstance *instance)
|
||||
|
||||
/* static */ bool ScriptTunnel::_BuildTunnelRoad2()
|
||||
{
|
||||
EnforceDeityOrCompanyModeValid(false);
|
||||
|
||||
/* Build the piece of road on the 'end' side of the tunnel */
|
||||
TileIndex end = ScriptObject::GetCallbackVariable(0);
|
||||
TileIndex start = ScriptTunnel::GetOtherTunnelEnd(end);
|
||||
|
Reference in New Issue
Block a user