diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index faefaa9..f79b71a 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -50,7 +50,7 @@ void DrawAircraftDetails(const Aircraft *v, int left, int right, int y) } if (u->cargo_cap != 0) { - uint cargo_count = u->cargo.Count(); + uint cargo_count = u->cargo.OnboardCount(); y_offset += FONT_HEIGHT_NORMAL + 1; if (cargo_count != 0) { diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index e740e26..00a6d3a 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -133,7 +133,7 @@ SpriteID RoadVehicle::GetImage(Direction direction, EngineImageType image_type) sprite = direction + _roadveh_images[spritenum]; - if (this->cargo.Count() >= this->cargo_cap / 2U) sprite += _roadveh_full_adder[spritenum]; + if (this->cargo.OnboardCount() >= this->cargo_cap / 2U) sprite += _roadveh_full_adder[spritenum]; return sprite; } diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index 03e2830..7d001dd 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -83,7 +83,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y) str = STR_VEHICLE_DETAILS_CARGO_EMPTY; if (!u->cargo.Empty()) { SetDParam(0, u->cargo_type); - SetDParam(1, u->cargo.Count()); + SetDParam(1, u->cargo.OnboardCount()); SetDParam(2, u->cargo.Source()); str = STR_VEHICLE_DETAILS_CARGO_FROM; feeder_share += u->cargo.FeederShare(); @@ -103,7 +103,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y) str = STR_VEHICLE_DETAILS_CARGO_EMPTY; if (!v->cargo.Empty()) { SetDParam(0, v->cargo_type); - SetDParam(1, v->cargo.Count()); + SetDParam(1, v->cargo.OnboardCount()); SetDParam(2, v->cargo.Source()); str = STR_VEHICLE_DETAILS_CARGO_FROM; feeder_share += v->cargo.FeederShare(); diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index a016125..fe55cea 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -476,7 +476,7 @@ SpriteID Train::GetImage(Direction direction, EngineImageType image_type) const sprite = GetDefaultTrainSprite(spritenum, direction); - if (this->cargo.Count() >= this->cargo_cap / 2U) sprite += _wagon_full_adder[spritenum]; + if (this->cargo.OnboardCount() >= this->cargo_cap / 2U) sprite += _wagon_full_adder[spritenum]; return sprite; } diff --git a/src/train_gui.cpp b/src/train_gui.cpp index f302d75..b91bfdc 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -276,7 +276,7 @@ static void GetCargoSummaryOfArticulatedVehicle(const Train *v, CargoSummary *su } item->capacity += v->cargo_cap; - item->amount += v->cargo.Count(); + item->amount += v->cargo.OnboardCount(); if (item->source == INVALID_STATION) item->source = v->cargo.Source(); } while ((v = v->Next()) != NULL && v->IsArticulatedPart()); } @@ -311,7 +311,7 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab) CargoArray act_cargo; CargoArray max_cargo; for (const Vehicle *v = Vehicle::Get(veh_id); v != NULL; v = v->Next()) { - act_cargo[v->cargo_type] += v->cargo.Count(); + act_cargo[v->cargo_type] += v->cargo.OnboardCount(); max_cargo[v->cargo_type] += v->cargo_cap; } @@ -424,7 +424,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po Money feeder_share = 0; for (const Vehicle *u = v; u != NULL; u = u->Next()) { - act_cargo[u->cargo_type] += u->cargo.Count(); + act_cargo[u->cargo_type] += u->cargo.OnboardCount(); max_cargo[u->cargo_type] += u->cargo_cap; feeder_share += u->cargo.FeederShare(); }