mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-06 22:37:22 +00:00
(svn r8377) -Fix (r8331): [build vehicle window] train cargo capacity now only add "(refitable)" if the engine in question is refitable
This commit is contained in:
parent
e6ea9ba0f5
commit
8d89ca48e1
@ -549,9 +549,11 @@ void DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number)
|
|||||||
SetDParam(2, STR_EMPTY);
|
SetDParam(2, STR_EMPTY);
|
||||||
} else {
|
} else {
|
||||||
int multihead = (rvi->flags & RVI_MULTIHEAD ? 1 : 0);
|
int multihead = (rvi->flags & RVI_MULTIHEAD ? 1 : 0);
|
||||||
|
bool refittable = (EngInfo(engine_number)->refit_mask != 0);
|
||||||
|
|
||||||
SetDParam(0, rvi->cargo_type);
|
SetDParam(0, rvi->cargo_type);
|
||||||
SetDParam(1, (rvi->capacity * (CountArticulatedParts(engine_number) + 1)) << multihead);
|
SetDParam(1, (rvi->capacity * (CountArticulatedParts(engine_number) + 1)) << multihead);
|
||||||
SetDParam(2, STR_9842_REFITTABLE);
|
SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY);
|
||||||
}
|
}
|
||||||
DrawString(x,y, STR_PURCHASE_INFO_CAPACITY, 0);
|
DrawString(x,y, STR_PURCHASE_INFO_CAPACITY, 0);
|
||||||
y += 10;
|
y += 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user