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

Function CanConvertUnownedRoadType

src/road_cmd.cpp:2412–2415  ·  view source on GitHub ↗

* Checks the tile and returns whether the current player is allowed to convert the roadtype to another roadtype without taking ownership * @param owner the tile owner. * @param rtt Road/tram type. * @return whether the road is convertible */

Source from the content-addressed store, hash-verified

2410 * @return whether the road is convertible
2411 */
2412static bool CanConvertUnownedRoadType(Owner owner, RoadTramType rtt)
2413{
2414 return (owner == OWNER_NONE || (owner == OWNER_TOWN && rtt == RTT_ROAD));
2415}
2416
2417/**
2418 * Convert the ownership of the RoadType of the tile if applicable

Callers 1

CmdConvertRoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected