aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainhud.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-10-10 23:31:12 +0200
committerorwell96 <orwell@bleipb.de>2018-10-10 23:31:12 +0200
commit11fe530e18248b14c40edb6b56e9e3f47af3461c (patch)
treec403c8c9f2a87d7bde055da9804f2341c777b5f6 /advtrains/trainhud.lua
parent9db52bcd32b49d6b98644dcb7edcf14987850fa5 (diff)
downloadadvtrains-11fe530e18248b14c40edb6b56e9e3f47af3461c.tar.gz
advtrains-11fe530e18248b14c40edb6b56e9e3f47af3461c.tar.bz2
advtrains-11fe530e18248b14c40edb6b56e9e3f47af3461c.zip
Properly handle speed restrictions
Diffstat (limited to 'advtrains/trainhud.lua')
-rw-r--r--advtrains/trainhud.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua
index 9ea7466..d880ffc 100644
--- a/advtrains/trainhud.lua
+++ b/advtrains/trainhud.lua
@@ -197,6 +197,9 @@ function advtrains.hud_train_format(train, flip)
topLine=" ["..mletter[fct].."] {"..levers.."} "..doorstr[(train.door_open or 0) * fct]
firstLine=attrans("Speed:").." |"..string.rep("+", vel)..string.rep("_", res-vel).."|"..string.rep("_", max-res).."> "..vel_kmh.." km/h"
+ if train.speed_restriction == 0 then
+ firstLine = "OVERRUN RED SIGNAL! Examine situation and reverse train to move again."
+ end
return (train.debug or "").."\n"..topLine.."\n"..firstLine.."\n"..secondLine
end