summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-11-27 23:11:56 +0000
committerpeter1138 <peter1138@openttd.org>2006-11-27 23:11:56 +0000
commit470c383738d84b9e2e1e202fec2633d10f6e1712 (patch)
treee4b1dd8ccb2c63d47646c0471b322b9ea585313a /train_gui.c
parent45e7e61aa969764dc71ab1bbc574655e07a346a4 (diff)
downloadopenttd-470c383738d84b9e2e1e202fec2633d10f6e1712.tar.xz
(svn r7269) -Feature: Add freight trains patch option. This option is a multiplier for the weight of cargo on freight trains, to simulate longer heavier trains. The default value of 1 behaves as before.
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/train_gui.c b/train_gui.c
index ffb36ea4e..5d208799e 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -951,7 +951,8 @@ static void TrainDetailsCargoTab(const Vehicle *v, int x, int y)
SetDParam(0, v->cargo_type);
SetDParam(1, num);
SetDParam(2, v->cargo_source);
- str = STR_8813_FROM;
+ SetDParam(3, _patches.freight_trains);
+ str = FreightWagonMult(v) > 1 ? STR_FROM_MULT : STR_8813_FROM;
}
DrawString(x, y, str, 0);
}
@@ -976,7 +977,8 @@ static void TrainDetailsCapacityTab(const Vehicle *v, int x, int y)
if (v->cargo_cap != 0) {
SetDParam(0, v->cargo_type);
SetDParam(1, v->cargo_cap);
- DrawString(x, y, STR_013F_CAPACITY, 0);
+ SetDParam(2, _patches.freight_trains);
+ DrawString(x, y, FreightWagonMult(v) > 1 ? STR_CAPACITY_MULT : STR_013F_CAPACITY, 0);
}
}
@@ -1113,7 +1115,8 @@ static void DrawTrainDetailsWindow(Window *w)
SetDParam(1, act_cargo[i]); // {CARGO} #2
SetDParam(2, i); // {SHORTCARGO} #1
SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2
- DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY, 0);
+ SetDParam(4, _patches.freight_trains);
+ DrawString(x, y + 2, FreightWagonMult(v) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, 0);
}
}
}