Update to 12.0-beta1

This commit is contained in:
dP
2021-08-15 14:57:29 +03:00
parent ac7d3eba75
commit 9df4f2c4fc
666 changed files with 61302 additions and 20466 deletions

View File

@@ -55,10 +55,10 @@ BaseStation::~BaseStation()
if (CleaningPool()) return;
DeleteWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, this->owner, this->index).Pack());
DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, this->owner, this->index).Pack());
DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, this->owner, this->index).Pack());
DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, this->owner, this->index).Pack());
CloseWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, this->owner, this->index).Pack());
CloseWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, this->owner, this->index).Pack());
CloseWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, this->owner, this->index).Pack());
CloseWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, this->owner, this->index).Pack());
this->sign.MarkDirty();
}
@@ -143,7 +143,7 @@ Station::~Station()
InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
}
DeleteWindowById(WC_STATION_VIEW, index);
CloseWindowById(WC_STATION_VIEW, index);
/* Now delete all orders that go to the station */
RemoveOrderFromAllVehicles(OT_GOTO_STATION, this->index);
@@ -416,7 +416,7 @@ void Station::RecomputeCatchment()
if (!_settings_game.station.serve_neutral_industries && this->industry != nullptr) {
/* Station is associated with an industry, so we only need to deliver to that industry. */
this->catchment_tiles.Initialize(this->industry->location);
TILE_AREA_LOOP(tile, this->industry->location) {
for (TileIndex tile : this->industry->location) {
if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == this->industry->index) {
this->catchment_tiles.SetTile(tile);
}
@@ -435,7 +435,7 @@ void Station::RecomputeCatchment()
/* Loop finding all station tiles */
TileArea ta(TileXY(this->rect.left, this->rect.top), TileXY(this->rect.right, this->rect.bottom));
TILE_AREA_LOOP(tile, ta) {
for (TileIndex tile : ta) {
if (!IsTileType(tile, MP_STATION) || GetStationIndex(tile) != this->index) continue;
uint r = GetTileCatchmentRadius(tile, this);
@@ -443,7 +443,7 @@ void Station::RecomputeCatchment()
/* This tile sub-loop doesn't need to test any tiles, they are simply added to the catchment set. */
TileArea ta2 = TileArea(tile, 1, 1).Expand(r);
TILE_AREA_LOOP(tile2, ta2) this->catchment_tiles.SetTile(tile2);
for (TileIndex tile2 : ta2) this->catchment_tiles.SetTile(tile2);
}
/* Search catchment tiles for towns and industries */
@@ -567,7 +567,7 @@ CommandCost StationRect::BeforeAddRect(TileIndex tile, int w, int h, StationRect
/* static */ bool StationRect::ScanForStationTiles(StationID st_id, int left_a, int top_a, int right_a, int bottom_a)
{
TileArea ta(TileXY(left_a, top_a), TileXY(right_a, bottom_a));
TILE_AREA_LOOP(tile, ta) {
for (TileIndex tile : ta) {
if (IsTileType(tile, MP_STATION) && GetStationIndex(tile) == st_id) return true;
}