One-way road zoning mode

This commit is contained in:
Jonathan G Rennison
2020-10-26 03:45:35 +00:00
parent 750417af10
commit 38a153017f
5 changed files with 39 additions and 0 deletions

View File

@@ -449,6 +449,16 @@ static bool IsOneWayRoadTile(TileIndex tile)
return false;
}
uint8 GetOneWayRoadTileType(TileIndex tile)
{
if (IsNormalRoadTile(tile)) {
if (GetDisallowedRoadDirections(tile) != DRD_NONE) return 1;
if (IsOneWaySideJunctionRoad(tile)) return 2;
}
if (IsDriveThroughStopTile(tile) && GetDriveThroughStopDisallowedRoadDirections(tile) != DRD_NONE) return 3;
return 0;
}
/**
* Turn a roadvehicle around.
* @param tile unused