Fix road/tram type load check for savegame versions before 62

This commit is contained in:
Jonathan G Rennison
2024-01-15 19:37:54 +00:00
parent da71a58a84
commit a6b467cf45
2 changed files with 24 additions and 1 deletions

View File

@@ -46,6 +46,24 @@ inline bool MayHaveRoad(TileIndex t)
}
}
/**
* Test whether a tile type can have road/tram types.
* @param type Tile type.
* @return true if tile type can have road/tram types.
*/
inline bool MayTileTypeHaveRoad(TileType type)
{
switch (type) {
case MP_ROAD:
case MP_STATION:
case MP_TUNNELBRIDGE:
return true;
default:
return false;
}
}
/**
* Get the type of the road tile.
* @param t Tile to query.