summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-09-22 10:31:09 +0000
committerpeter1138 <peter1138@openttd.org>2005-09-22 10:31:09 +0000
commit02c2de2a675043987ff3f55f0ae4635b709f7ae6 (patch)
tree61d6fe8d1682313610d42efbc4d0890ca8fb2e54 /train_gui.c
parent1195076373297f4d60a5705966f483b42cddf9ea (diff)
downloadopenttd-02c2de2a675043987ff3f55f0ae4635b709f7ae6.tar.xz
(svn r2969) -Newgrf: Show a wagon's speed limit in purchase list.
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/train_gui.c b/train_gui.c
index f3b80206b..514d52183 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -109,6 +109,13 @@ void DrawTrainWagonPurchaseInfo(int x, int y, EngineID engine_number)
SetDParam(2, refittable ? STR_9842_REFITTABLE : STR_EMPTY);
DrawString(x, y, STR_PURCHASE_INFO_CAPACITY, 0);
y += 10;
+
+ /* Wagon speed limit, displayed if above zero */
+ if (rvi->max_speed > 0) {
+ SetDParam(0, rvi->max_speed * 10 >> 4);
+ DrawString(x,y, STR_PURCHASE_INFO_SPEED, 0);
+ y += 10;
+ }
}
void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2)