|
@@ -1238,30 +1238,24 @@ static uint GetSlopeZ_TunnelBridge(TileI
|
|
|
return z + 1 + delta;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return z + GetPartialZ(x, y, tileh);
|
|
|
}
|
|
|
|
|
|
static Foundation GetFoundation_TunnelBridge(TileIndex tile, Slope tileh)
|
|
|
{
|
|
|
return IsTunnel(tile) ? FOUNDATION_NONE : GetBridgeFoundation(tileh, DiagDirToAxis(GetTunnelBridgeDirection(tile)));
|
|
|
}
|
|
|
|
|
|
|
|
|
static void GetAcceptedCargo_TunnelBridge(TileIndex tile, AcceptedCargo ac)
|
|
|
{
|
|
|
/* not used */
|
|
|
}
|
|
|
|
|
|
static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td)
|
|
|
{
|
|
|
TransportType tt = GetTunnelBridgeTransportType(tile);
|
|
|
|
|
|
if (IsTunnel(tile)) {
|
|
|
td->str = (tt == TRANSPORT_RAIL) ? STR_TUNNEL_DESCRIPTION_RAILROAD : STR_TUNNEL_DESCRIPTION_ROAD;
|
|
|
} else { // IsBridge(tile)
|
|
|
td->str = (tt == TRANSPORT_WATER) ? STR_BRIDGE_DESCRIPTION_AQUEDUCT : GetBridgeSpec(GetBridgeType(tile))->transport_name[tt];
|
|
|
}
|
|
|
td->owner[0] = GetTileOwner(tile);
|
|
|
|
|
|
Owner road_owner = INVALID_OWNER;
|
|
@@ -1537,24 +1531,24 @@ static CommandCost TerraformTile_TunnelB
|
|
|
|
|
|
/* Surface slope is valid and remains unchanged? */
|
|
|
if (!CmdFailed(res) && (z_old == z_new) && (tileh_old == tileh_new)) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform);
|
|
|
}
|
|
|
|
|
|
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
|
|
}
|
|
|
|
|
|
extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
|
|
|
DrawTile_TunnelBridge, // draw_tile_proc
|
|
|
GetSlopeZ_TunnelBridge, // get_slope_z_proc
|
|
|
ClearTile_TunnelBridge, // clear_tile_proc
|
|
|
GetAcceptedCargo_TunnelBridge, // get_accepted_cargo_proc
|
|
|
NULL, // get_accepted_cargo_proc
|
|
|
GetTileDesc_TunnelBridge, // get_tile_desc_proc
|
|
|
GetTileTrackStatus_TunnelBridge, // get_tile_track_status_proc
|
|
|
ClickTile_TunnelBridge, // click_tile_proc
|
|
|
AnimateTile_TunnelBridge, // animate_tile_proc
|
|
|
TileLoop_TunnelBridge, // tile_loop_clear
|
|
|
ChangeTileOwner_TunnelBridge, // change_tile_owner_clear
|
|
|
NULL, // get_produced_cargo_proc
|
|
|
VehicleEnter_TunnelBridge, // vehicle_enter_tile_proc
|
|
|
GetFoundation_TunnelBridge, // get_foundation_proc
|
|
|
TerraformTile_TunnelBridge, // terraform_tile_proc
|
|
|
};
|