mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 11:44:17 +01:00
Bridges can be built over buoys but not the other way around.
This commit is contained in:
@@ -960,6 +960,20 @@ static CommandCost IsDockBridgeAboveOk(TileIndex tile, StationGfx layout)
|
||||
return IsStationBridgeAboveOk(tile, bridgeable_info, StationType::Dock, layout, GetBridgeHeight(rampsouth), STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if a buoy can be built below a bridge.
|
||||
* @param tile Tile to test.
|
||||
* @return Command result.
|
||||
*/
|
||||
CommandCost IsBuoyBridgeAboveOk(TileIndex tile)
|
||||
{
|
||||
if (!IsBridgeAbove(tile)) return CommandCost();
|
||||
|
||||
TileIndex rampsouth = GetSouthernBridgeEnd(tile);
|
||||
auto bridgeable_info = GetStationBridgeableTileInfo(StationType::Buoy);
|
||||
return IsStationBridgeAboveOk(tile, bridgeable_info, StationType::Buoy, 0, GetBridgeHeight(rampsouth), STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a rail station can be built at the given tile.
|
||||
* @param tile_cur Tile to check.
|
||||
|
||||
Reference in New Issue
Block a user