* Get station-type-specific string for a bridge that is too low. * @param type Station type. * @return bridge too low string. */
| 859 | * @return bridge too low string. |
| 860 | */ |
| 861 | static StringID GetBridgeTooLowMessageForStationType(StationType type) |
| 862 | { |
| 863 | static constexpr std::array<StringID, to_underlying(StationType::End)> too_low_msgs = { |
| 864 | STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION, // Rail |
| 865 | INVALID_STRING_ID, // Airport |
| 866 | STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADSTOP, // Truck |
| 867 | STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADSTOP, // Bus |
| 868 | INVALID_STRING_ID, // Oilrig |
| 869 | STR_ERROR_BRIDGE_TOO_LOW_FOR_DOCK, // Dock |
| 870 | STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY, // Buoy |
| 871 | STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT, // RailWaypoint |
| 872 | STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT, // RoadWaypoint |
| 873 | }; |
| 874 | return too_low_msgs[to_underlying(type)]; |
| 875 | }; |
| 876 | |
| 877 | /** |
| 878 | * Test if a bridge can be built above a station. |
no test coverage detected