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

@@ -81,9 +81,9 @@ void DrawRoadVehDetails(const Vehicle *v, const Rect &r)
if (u->cargo.StoredCount() > 0) {
SetDParam(0, u->cargo_type);
SetDParam(1, u->cargo.StoredCount());
SetDParam(2, u->cargo.Source());
SetDParam(2, u->cargo.GetFirstStation());
str = STR_VEHICLE_DETAILS_CARGO_FROM;
feeder_share += u->cargo.FeederShare();
feeder_share += u->cargo.GetFeederShare();
}
DrawString(r.left, r.right, y, str);
y += FONT_HEIGHT_NORMAL;
@@ -100,9 +100,9 @@ void DrawRoadVehDetails(const Vehicle *v, const Rect &r)
if (v->cargo.StoredCount() > 0) {
SetDParam(0, v->cargo_type);
SetDParam(1, v->cargo.StoredCount());
SetDParam(2, v->cargo.Source());
SetDParam(2, v->cargo.GetFirstStation());
str = STR_VEHICLE_DETAILS_CARGO_FROM;
feeder_share += v->cargo.FeederShare();
feeder_share += v->cargo.GetFeederShare();
}
DrawString(r.left, r.right, y, str);
y += FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.vsep_normal;