* Test if a dock can be built below a bridge. * @param tile Tile to test. * @param layout Layout piece of station to test. * @return Command result. */
| 952 | * @return Command result. |
| 953 | */ |
| 954 | static CommandCost IsDockBridgeAboveOk(TileIndex tile, StationGfx layout) |
| 955 | { |
| 956 | if (!IsBridgeAbove(tile)) return CommandCost(); |
| 957 | |
| 958 | TileIndex rampsouth = GetSouthernBridgeEnd(tile); |
| 959 | auto bridgeable_info = GetStationBridgeableTileInfo(StationType::Dock); |
| 960 | return IsStationBridgeAboveOk(tile, bridgeable_info, StationType::Dock, layout, GetBridgeHeight(rampsouth), STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); |
| 961 | } |
| 962 | |
| 963 | /** |
| 964 | * Test if a buoy can be built below a bridge. |
no test coverage detected