Update to 12.2
This commit is contained in:
@@ -743,9 +743,16 @@ static void DeleteStationIfEmpty(BaseStation *st)
|
||||
void Station::AfterStationTileSetChange(bool adding, StationType type)
|
||||
{
|
||||
this->UpdateVirtCoord();
|
||||
this->RecomputeCatchment();
|
||||
DirtyCompanyInfrastructureWindows(this->owner);
|
||||
if (adding) InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
|
||||
|
||||
if (adding) {
|
||||
this->RecomputeCatchment();
|
||||
MarkCatchmentTilesDirty();
|
||||
InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
|
||||
} else {
|
||||
MarkCatchmentTilesDirty();
|
||||
this->RecomputeCatchment();
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case STATION_RAIL:
|
||||
@@ -1643,6 +1650,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, std::vector<T *> &affected_st
|
||||
if (st->train_station.tile == INVALID_TILE) {
|
||||
st->facilities &= ~FACIL_TRAIN;
|
||||
SetWindowWidgetDirty(WC_STATION_VIEW, st->index, WID_SV_TRAINS);
|
||||
MarkCatchmentTilesDirty();
|
||||
st->UpdateVirtCoord();
|
||||
DeleteStationIfEmpty(st);
|
||||
}
|
||||
@@ -1679,6 +1687,7 @@ CommandCost CmdRemoveFromRailStation(TileIndex start, DoCommandFlag flags, uint3
|
||||
|
||||
if (st->train_station.tile == INVALID_TILE) SetWindowWidgetDirty(WC_STATION_VIEW, st->index, WID_SV_TRAINS);
|
||||
st->MarkTilesDirty(false);
|
||||
MarkCatchmentTilesDirty();
|
||||
st->RecomputeCatchment();
|
||||
}
|
||||
|
||||
@@ -1953,11 +1962,11 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
||||
|
||||
MarkTileDirtyByTile(cur_tile);
|
||||
}
|
||||
if (st != nullptr) citymania::OnStationPartBuilt(st, tile, p1, p2);
|
||||
}
|
||||
|
||||
if (st != nullptr) {
|
||||
st->AfterStationTileSetChange(true, type ? STATION_TRUCK: STATION_BUS);
|
||||
|
||||
if (st != nullptr) {
|
||||
citymania::OnStationPartBuilt(st, tile, p1, p2);
|
||||
st->AfterStationTileSetChange(true, type ? STATION_TRUCK: STATION_BUS);
|
||||
}
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user