MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetBridgeTooLowMessageForStationType

Function GetBridgeTooLowMessageForStationType

src/station_cmd.cpp:861–875  ·  view source on GitHub ↗

* Get station-type-specific string for a bridge that is too low. * @param type Station type. * @return bridge too low string. */

Source from the content-addressed store, hash-verified

859 * @return bridge too low string.
860 */
861static 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.

Callers 1

IsStationBridgeAboveOkFunction · 0.85

Calls 1

to_underlyingFunction · 0.85

Tested by

no test coverage detected