Codechange: rename cargo aging days to periods, as they are not really days (#11112)
This commit is contained in:
@@ -683,14 +683,14 @@ static bool LoadOldDepot(LoadgameState *ls, int num)
|
||||
static StationID _current_station_id;
|
||||
static uint16 _waiting_acceptance;
|
||||
static uint8 _cargo_source;
|
||||
static uint8 _cargo_days;
|
||||
static uint8 _cargo_periods;
|
||||
|
||||
static const OldChunks goods_chunk[] = {
|
||||
OCL_VAR ( OC_UINT16, 1, &_waiting_acceptance ),
|
||||
OCL_SVAR( OC_UINT8, GoodsEntry, time_since_pickup ),
|
||||
OCL_SVAR( OC_UINT8, GoodsEntry, rating ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_cargo_source ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_cargo_days ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_cargo_periods ),
|
||||
OCL_SVAR( OC_UINT8, GoodsEntry, last_speed ),
|
||||
OCL_SVAR( OC_UINT8, GoodsEntry, last_age ),
|
||||
|
||||
@@ -710,7 +710,7 @@ static bool LoadOldGood(LoadgameState *ls, int num)
|
||||
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),
|
||||
ge->cargo.Append(new CargoPacket(GB(_waiting_acceptance, 0, 12), _cargo_periods, (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source, 0, 0),
|
||||
INVALID_STATION);
|
||||
}
|
||||
|
||||
@@ -1175,7 +1175,7 @@ static const OldChunks vehicle_chunk[] = {
|
||||
OCL_VAR ( OC_TTD | OC_UINT16, 1, &_cargo_count ),
|
||||
OCL_VAR ( OC_TTO | OC_FILE_U8 | OC_VAR_U16, 1, &_cargo_count ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_cargo_source ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_cargo_days ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_cargo_periods ),
|
||||
|
||||
OCL_SVAR( OC_TTO | OC_UINT8, Vehicle, tick_counter ),
|
||||
|
||||
@@ -1353,7 +1353,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
|
||||
if (_cargo_count != 0 && CargoPacket::CanAllocateItem()) {
|
||||
StationID source = (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source;
|
||||
TileIndex source_xy = (source != INVALID_STATION) ? Station::Get(source)->xy : (TileIndex)0;
|
||||
v->cargo.Append(new CargoPacket(_cargo_count, _cargo_days, source, source_xy, source_xy));
|
||||
v->cargo.Append(new CargoPacket(_cargo_count, _cargo_periods, source, source_xy, source_xy));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user