|
|
|
@ -532,21 +532,20 @@ static GUIEngineList::FilterFunction * const _filter_funcs[] = {
|
|
|
|
|
&CargoFilter,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine, bool refittable)
|
|
|
|
|
static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine)
|
|
|
|
|
{
|
|
|
|
|
CargoArray cap = GetCapacityOfArticulatedParts(engine);
|
|
|
|
|
CargoArray cap;
|
|
|
|
|
uint32 refits;
|
|
|
|
|
GetArticulatedVehicleCargoesAndRefits(engine, &cap, &refits);
|
|
|
|
|
|
|
|
|
|
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
|
|
|
|
if (cap[c] == 0) continue;
|
|
|
|
|
|
|
|
|
|
SetDParam(0, c);
|
|
|
|
|
SetDParam(1, cap[c]);
|
|
|
|
|
SetDParam(2, refittable ? STR_PURCHASE_INFO_REFITTABLE : STR_EMPTY);
|
|
|
|
|
SetDParam(2, HasBit(refits, c) ? STR_PURCHASE_INFO_REFITTABLE : STR_EMPTY);
|
|
|
|
|
DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
|
|
|
|
|
y += FONT_HEIGHT_NORMAL;
|
|
|
|
|
|
|
|
|
|
/* Only show as refittable once */
|
|
|
|
|
refittable = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return y;
|
|
|
|
@ -831,7 +830,7 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
|
|
|
|
|
|
|
|
|
|
if (articulated_cargo) {
|
|
|
|
|
/* Cargo type + capacity, or N/A */
|
|
|
|
|
int new_y = DrawCargoCapacityInfo(left, right, y, engine_number, refittable);
|
|
|
|
|
int new_y = DrawCargoCapacityInfo(left, right, y, engine_number);
|
|
|
|
|
|
|
|
|
|
if (new_y == y) {
|
|
|
|
|
SetDParam(0, CT_INVALID);
|
|
|
|
|