summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-28 19:56:18 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-28 19:56:18 +0000
commit376bda7007d55e3a7bd99126d147b462f795c989 (patch)
tree18f5e3222d6f5e8dc2859681eb1e93b04c1fe686
parentfc91cd8135ecec78aa29f2a59129fe8e95030a8c (diff)
downloadopenttd-376bda7007d55e3a7bd99126d147b462f795c989.tar.xz
(svn r4610) - If a wagon has a capacity of 0 (zero), display it in the purchase list as N/A.
-rw-r--r--train_gui.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/train_gui.c b/train_gui.c
index 9f9eacca6..119896bf0 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -109,10 +109,14 @@ void DrawTrainWagonPurchaseInfo(int x, int y, EngineID engine_number)
DrawString(x, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT, 0);
y += 10;
- /* Cargo type + capacity */
- SetDParam(0, _cargoc.names_long[rvi->cargo_type]);
- SetDParam(1, rvi->capacity);
- SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY);
+ /* Cargo type + capacity, or N/A */
+ SetDParam(0, STR_8838_N_A);
+ SetDParam(2, 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);
y += 10;