Codechange: cleanup CargoPacket in terms of variable/function names (#11278)

Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.

(cherry picked from commit 30172fc037)
This commit is contained in:
Patric Stout
2023-09-09 23:21:21 +02:00
committed by Jonathan G Rennison
parent 2890127675
commit e5673a1756
27 changed files with 213 additions and 200 deletions

View File

@@ -983,8 +983,8 @@ static uint32 VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *object,
case 0x3B: return GB(v->cargo_cap, 8, 8);
case 0x3C: return ClampTo<uint16_t>(v->cargo.StoredCount());
case 0x3D: return GB(ClampTo<uint16_t>(v->cargo.StoredCount()), 8, 8);
case 0x3E: return v->cargo.Source();
case 0x3F: return ClampTo<uint8_t>(v->cargo.DaysInTransit());
case 0x3E: return v->cargo.GetFirstStation();
case 0x3F: return ClampTo<uint8_t>(v->cargo.PeriodsInTransit());
case 0x40: return ClampTo<uint16_t>(v->age);
case 0x41: return GB(ClampTo<uint16_t>(v->age), 8, 8);
case 0x42: return ClampTo<uint16_t>(v->max_age);