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.
This commit is contained in:
@@ -291,7 +291,7 @@ static void GetCargoSummaryOfArticulatedVehicle(const Train *v, CargoSummary *su
|
||||
|
||||
item->capacity += v->cargo_cap;
|
||||
item->amount += v->cargo.StoredCount();
|
||||
if (item->source == INVALID_STATION) item->source = v->cargo.Source();
|
||||
if (item->source == INVALID_STATION) item->source = v->cargo.GetFirstStation();
|
||||
} while ((v = v->Next()) != nullptr && v->IsArticulatedPart());
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ void DrawTrainDetails(const Train *v, const Rect &r, int vscroll_pos, uint16_t v
|
||||
for (const Vehicle *u = v; u != nullptr; u = u->Next()) {
|
||||
act_cargo[u->cargo_type] += u->cargo.StoredCount();
|
||||
max_cargo[u->cargo_type] += u->cargo_cap;
|
||||
feeder_share += u->cargo.FeederShare();
|
||||
feeder_share += u->cargo.GetFeederShare();
|
||||
}
|
||||
|
||||
/* draw total cargo tab */
|
||||
|
Reference in New Issue
Block a user