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

Function GetTownRoadBits

src/town_cmd.cpp:954–959  ·  view source on GitHub ↗

* Return the RoadBits of a tile, ignoring depot and bay road stops. * @param tile The tile to check. * @return The roadbits of the given tile. */

Source from the content-addressed store, hash-verified

952 * @return The roadbits of the given tile.
953 */
954static RoadBits GetTownRoadBits(TileIndex tile)
955{
956 if (IsRoadDepotTile(tile) || IsBayRoadStopTile(tile)) return ROAD_NONE;
957
958 return GetAnyRoadBits(tile, RTT_ROAD, true);
959}
960
961/**
962 * Get the road type that towns should build at this current moment.

Callers 7

IsNeighbourRoadTileFunction · 0.85
IsRoadAllowedHereFunction · 0.85
GrowTownWithBridgeFunction · 0.85
GrowTownWithTunnelFunction · 0.85
CanFollowRoadFunction · 0.85
GrowTownAtRoadFunction · 0.85
GrowTownFunction · 0.85

Calls 3

IsRoadDepotTileFunction · 0.85
IsBayRoadStopTileFunction · 0.85
GetAnyRoadBitsFunction · 0.85

Tested by

no test coverage detected