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

Function ValParamRailType

src/rail.cpp:90–93  ·  view source on GitHub ↗

* Validate functions for rail building. * @param rail the railtype to check. * @return true if the current company may build the rail. */

Source from the content-addressed store, hash-verified

88 * @return true if the current company may build the rail.
89 */
90bool ValParamRailType(const RailType rail)
91{
92 return rail < RAILTYPE_END && HasRailTypeAvail(_current_company, rail);
93}
94
95/**
96 * Add the rail types that are to be introduced at the given date.

Callers 9

CmdBuildSingleRailFunction · 0.85
CmdRailTrackHelperFunction · 0.85
CmdBuildTrainDepotFunction · 0.85
CmdConvertRailFunction · 0.85
CmdBuildBridgeFunction · 0.85
CmdBuildTunnelFunction · 0.85
CmdBuildRailStationFunction · 0.85
OnInvalidateDataMethod · 0.85
ShowBuildRailToolbarFunction · 0.85

Calls 1

HasRailTypeAvailFunction · 0.85

Tested by

no test coverage detected