summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-20 11:53:29 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-20 11:53:29 +0000
commit68dda86c5bbe2d663edb19699f58208f1d5a6f6e (patch)
tree6b676140b8977dd0e425e562f8bb9f2d5caa3e6f /train_gui.c
parent4b674976d55e6cc2236429b286ce6f40f771b3ea (diff)
downloadopenttd-68dda86c5bbe2d663edb19699f58208f1d5a6f6e.tar.xz
(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/train_gui.c b/train_gui.c
index 6e49831d2..e89dec050 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -272,7 +272,7 @@ void DrawTrainEnginePurchaseInfo(int x, int y, EngineID engine_number)
SetDParam(0, STR_8838_N_A);
SetDParam(2, STR_EMPTY);
if (rvi->capacity != 0) {
- SetDParam(0, _cargoc.names_long[rvi->cargo_type]);
+ SetDParam(0, rvi->cargo_type);
SetDParam(1, (rvi->capacity * (CountArticulatedParts(engine_number) + 1)) << multihead);
SetDParam(2, STR_9842_REFITTABLE);
}
@@ -320,7 +320,7 @@ void DrawTrainWagonPurchaseInfo(int x, int y, EngineID engine_number)
SetDParam(0, STR_8838_N_A);
SetDParam(2, STR_EMPTY);
if (rvi->capacity != 0) {
- SetDParam(0, _cargoc.names_long[rvi->cargo_type]);
+ SetDParam(0, rvi->cargo_type);
SetDParam(1, rvi->capacity * (CountArticulatedParts(engine_number) + 1));
SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY);
}
@@ -969,7 +969,7 @@ static void TrainDetailsInfoTab(const Vehicle *v, int x, int y)
static void TrainDetailsCapacityTab(const Vehicle *v, int x, int y)
{
if (v->cargo_cap != 0) {
- SetDParam(0, _cargoc.names_long[v->cargo_type]);
+ SetDParam(0, v->cargo_type);
SetDParam(1, v->cargo_cap);
DrawString(x, y, STR_013F_CAPACITY, 0);
}