diff options
author | rubidium <rubidium@openttd.org> | 2014-05-11 18:02:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-05-11 18:02:11 +0000 |
commit | 89c25b955e636efa46d65ebf5b4782b77f30f764 (patch) | |
tree | df0d3aacb099edb188c2cab71394604569707af8 /src/saveload | |
parent | 62378e098b008d41fa4f428b212bc238d33c5aad (diff) | |
download | openttd-89c25b955e636efa46d65ebf5b4782b77f30f764.tar.xz |
(svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore)
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 2 | ||||
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 4 | ||||
-rw-r--r-- | src/saveload/station_sl.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index d56dbe171..8ecd27b49 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1599,7 +1599,7 @@ bool AfterLoadGame() FOR_ALL_STATIONS(st) { for (CargoID c = 0; c < NUM_CARGO; c++) { st->goods[c].last_speed = 0; - if (st->goods[c].cargo.AvailableCount() != 0) SetBit(st->goods[c].acceptance_pickup, GoodsEntry::GES_PICKUP); + if (st->goods[c].cargo.AvailableCount() != 0) SetBit(st->goods[c].status, GoodsEntry::GES_RATING); } } } diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index e260acd45..d3c63d951 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -710,8 +710,8 @@ static bool LoadOldGood(LoadgameState *ls, int num) if (!LoadChunk(ls, ge, goods_chunk)) return false; - SB(ge->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE, 1, HasBit(_waiting_acceptance, 15)); - SB(ge->acceptance_pickup, GoodsEntry::GES_PICKUP, 1, _cargo_source != 0xFF); + SB(ge->status, GoodsEntry::GES_ACCEPTANCE, 1, HasBit(_waiting_acceptance, 15)); + SB(ge->status, GoodsEntry::GES_RATING, 1, _cargo_source != 0xFF); if (GB(_waiting_acceptance, 0, 12) != 0 && CargoPacket::CanAllocateItem()) { ge->cargo.Append(new CargoPacket(GB(_waiting_acceptance, 0, 12), _cargo_days, (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source, 0, 0), INVALID_STATION); diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index 23c306c38..a6de95dd0 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -267,7 +267,7 @@ const SaveLoad *GetGoodsDesc() { static const SaveLoad goods_desc[] = { SLEG_CONDVAR( _waiting_acceptance, SLE_UINT16, 0, 67), - SLE_CONDVAR(GoodsEntry, acceptance_pickup, SLE_UINT8, 68, SL_MAX_VERSION), + SLE_CONDVAR(GoodsEntry, status, SLE_UINT8, 68, SL_MAX_VERSION), SLE_CONDNULL(2, 51, 67), SLE_VAR(GoodsEntry, time_since_pickup, SLE_UINT8), SLE_VAR(GoodsEntry, rating, SLE_UINT8), @@ -339,7 +339,7 @@ static void Load_STNS() SlObject(ge, GetGoodsDesc()); SwapPackets(ge); if (IsSavegameVersionBefore(68)) { - SB(ge->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE, 1, HasBit(_waiting_acceptance, 15)); + SB(ge->status, GoodsEntry::GES_ACCEPTANCE, 1, HasBit(_waiting_acceptance, 15)); if (GB(_waiting_acceptance, 0, 12) != 0) { /* In old versions, enroute_from used 0xFF as INVALID_STATION */ StationID source = (IsSavegameVersionBefore(7) && _cargo_source == 0xFF) ? INVALID_STATION : _cargo_source; @@ -353,7 +353,7 @@ static void Load_STNS() /* Don't construct the packet with station here, because that'll fail with old savegames */ CargoPacket *cp = new CargoPacket(GB(_waiting_acceptance, 0, 12), _cargo_days, source, _cargo_source_xy, _cargo_source_xy, _cargo_feeder_share); ge->cargo.Append(cp, INVALID_STATION); - SB(ge->acceptance_pickup, GoodsEntry::GES_PICKUP, 1, 1); + SB(ge->status, GoodsEntry::GES_RATING, 1, 1); } } } |