1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 09:39:10 +00:00

(svn r4610) - If a wagon has a capacity of 0 (zero), display it in the purchase list as N/A.

This commit is contained in:
2006-04-28 19:56:18 +00:00
parent fc91cd8135
commit 376bda7007

@@ -109,10 +109,14 @@ void DrawTrainWagonPurchaseInfo(int x, int y, EngineID engine_number)
DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, 0); DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, 0);
y += 10; y += 10;
/* Cargo type + capacity */ /* Cargo type + capacity, or N/A */
SetDParam(0, _cargoc.names_long[rvi->cargo_type]); SetDParam(0, STR_8838_N_A);
SetDParam(1, rvi->capacity); SetDParam(2, STR_EMPTY);
SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY); if (rvi->capacity != 0) {
SetDParam(0, _cargoc.names_long[rvi->cargo_type]);
SetDParam(1, rvi->capacity);
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;