Add road layout change counter, add to road veh path caches

Update layout counter when non-leaf road bits are added or removed
This commit is contained in:
Jonathan G Rennison
2019-05-24 18:51:30 +01:00
parent 42b6e8b0d8
commit 829c635add
15 changed files with 83 additions and 0 deletions

View File

@@ -2027,6 +2027,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
MarkTileDirtyByTile(cur_tile);
}
ZoningMarkDirtyStationCoverageArea(st);
NotifyRoadLayoutChanged();
}
if (st != nullptr) {
@@ -2149,6 +2150,8 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags)
st->bus_station.Clear();
for (const RoadStop *rs = st->bus_stops; rs != nullptr; rs = rs->next) st->bus_station.Add(rs->xy);
}
NotifyRoadLayoutChanged();
}
return CommandCost(EXPENSES_CONSTRUCTION, _price[is_truck ? PR_CLEAR_STATION_TRUCK : PR_CLEAR_STATION_BUS]);