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

Function ValParamRoadType

src/road.cpp:164–167  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

162 * @return true if the current company may build the road.
163 */
164bool ValParamRoadType(RoadType roadtype)
165{
166 return roadtype < ROADTYPE_END && HasRoadTypeAvail(_current_company, roadtype);
167}
168
169/**
170 * Add the road types that are to be introduced at the given date.

Callers 10

CmdBuildBridgeFunction · 0.85
CmdBuildTunnelFunction · 0.85
CmdBuildRoadStopFunction · 0.85
CmdBuildRoadFunction · 0.85
CmdBuildLongRoadFunction · 0.85
CmdRemoveLongRoadFunction · 0.85
CmdBuildRoadDepotFunction · 0.85
CmdConvertRoadFunction · 0.85
OnInvalidateDataMethod · 0.85
ShowBuildRoadToolbarFunction · 0.85

Calls 1

HasRoadTypeAvailFunction · 0.85

Tested by

no test coverage detected