Disallow converting town-owned roads to types with the no houses flag
This commit is contained in:
@@ -2966,6 +2966,13 @@ CommandCost CmdConvertRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
}
|
||||
}
|
||||
|
||||
/* Disallow converting town roads to types which do not allow houses */
|
||||
if (rtt == RTT_ROAD && owner == OWNER_TOWN && HasBit(GetRoadTypeInfo(to_type)->flags, ROTF_NO_HOUSES)) {
|
||||
error.MakeError(STR_ERROR_OWNED_BY);
|
||||
GetNameOfOwner(OWNER_TOWN, tile);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Vehicle on the tile when not converting normal <-> powered
|
||||
* Tunnels and bridges have special check later */
|
||||
if (tt != MP_TUNNELBRIDGE) {
|
||||
|
Reference in New Issue
Block a user