mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-26 21:54:22 +01:00
Codechange: Use EnumBitSet for StationFacility.
This commit is contained in:
committed by
Peter Nelson
parent
8d38308ebb
commit
75387b9e2b
@@ -1603,7 +1603,7 @@ bool AfterLoadGame()
|
||||
* be OWNER_NONE. So replace OWNER_NONE with OWNER_WATER. */
|
||||
if (IsSavegameVersionBefore(SLV_46)) {
|
||||
for (Waypoint *wp : Waypoint::Iterate()) {
|
||||
if ((wp->facilities & FACIL_DOCK) != 0 && IsTileOwner(wp->xy, OWNER_NONE) && TileHeight(wp->xy) == 0) SetTileOwner(wp->xy, OWNER_WATER);
|
||||
if (wp->facilities.Test(StationFacility::Dock) && IsTileOwner(wp->xy, OWNER_NONE) && TileHeight(wp->xy) == 0) SetTileOwner(wp->xy, OWNER_WATER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2265,7 +2265,7 @@ bool AfterLoadGame()
|
||||
if (IsSavegameVersionBefore(SLV_124) && !IsSavegameVersionBefore(SLV_1)) {
|
||||
/* The train station tile area was added, but for really old (TTDPatch) it's already valid. */
|
||||
for (Waypoint *wp : Waypoint::Iterate()) {
|
||||
if (wp->facilities & FACIL_TRAIN) {
|
||||
if (wp->facilities.Test(StationFacility::Train)) {
|
||||
wp->train_station.tile = wp->xy;
|
||||
wp->train_station.w = 1;
|
||||
wp->train_station.h = 1;
|
||||
@@ -2828,7 +2828,7 @@ bool AfterLoadGame()
|
||||
|
||||
if (!IsSavegameVersionBefore(SLV_145)) {
|
||||
for (Station *st : Station::Iterate()) {
|
||||
if (!(st->facilities & FACIL_AIRPORT)) continue;
|
||||
if (!st->facilities.Test(StationFacility::Airport)) continue;
|
||||
assert(st->airport.psa != nullptr);
|
||||
|
||||
/* Check if the old storage was empty. */
|
||||
|
||||
Reference in New Issue
Block a user