* Test if a buoy can be built below a bridge. * @param tile Tile to test. * @return Command result. */
| 966 | * @return Command result. |
| 967 | */ |
| 968 | CommandCost IsBuoyBridgeAboveOk(TileIndex tile) |
| 969 | { |
| 970 | if (!IsBridgeAbove(tile)) return CommandCost(); |
| 971 | |
| 972 | TileIndex rampsouth = GetSouthernBridgeEnd(tile); |
| 973 | auto bridgeable_info = GetStationBridgeableTileInfo(StationType::Buoy); |
| 974 | return IsStationBridgeAboveOk(tile, bridgeable_info, StationType::Buoy, 0, GetBridgeHeight(rampsouth), STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); |
| 975 | } |
| 976 | |
| 977 | /** |
| 978 | * Checks if a rail station can be built at the given tile. |
no test coverage detected