* Test if a road station can be built below a bridge. * @param tile Tile to test. * @param spec Custom roadstop spec to test. * @param type Type of road station. * @param layout Layout piece of station to test. * @return Command result. */
| 937 | * @return Command result. |
| 938 | */ |
| 939 | CommandCost IsRoadStationBridgeAboveOk(TileIndex tile, const RoadStopSpec *spec, StationType type, StationGfx layout) |
| 940 | { |
| 941 | if (!IsBridgeAbove(tile)) return CommandCost(); |
| 942 | |
| 943 | TileIndex rampsouth = GetSouthernBridgeEnd(tile); |
| 944 | auto bridgeable_info = spec == nullptr ? GetStationBridgeableTileInfo(type) : spec->bridgeable_info; |
| 945 | return IsStationBridgeAboveOk(tile, bridgeable_info, type, layout, GetBridgeHeight(rampsouth), STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); |
| 946 | } |
| 947 | |
| 948 | /** |
| 949 | * Test if a dock can be built below a bridge. |
no test coverage detected