aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainhud.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-04-23 15:51:50 +0200
committerorwell96 <orwell@bleipb.de>2018-06-14 17:39:42 +0200
commit30e98520e7e6fa17beaf3f1c328fd58e2b19cebc (patch)
tree623e3ae0a06b50423273cfdbbec261b76d0821f4 /advtrains/trainhud.lua
parent064a454117e6f921926f808ad91829e4b73664c0 (diff)
downloadadvtrains-30e98520e7e6fa17beaf3f1c328fd58e2b19cebc.tar.gz
advtrains-30e98520e7e6fa17beaf3f1c328fd58e2b19cebc.tar.bz2
advtrains-30e98520e7e6fa17beaf3f1c328fd58e2b19cebc.zip
Occupation System, new train steps, still incomplete
Diffstat (limited to 'advtrains/trainhud.lua')
-rw-r--r--advtrains/trainhud.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua
index 9b7b9e8..e48e3e4 100644
--- a/advtrains/trainhud.lua
+++ b/advtrains/trainhud.lua
@@ -67,14 +67,14 @@ function advtrains.on_control_change(pc, train, flip)
if train.door_open ~= 0 then
train.door_open = 0
else
- train.door_open = -train.movedir
+ train.door_open = -1
end
end
if pc.right then
if train.door_open ~= 0 then
train.door_open = 0
else
- train.door_open = train.movedir
+ train.door_open = 1
end
end
train.active_control = act
@@ -176,7 +176,7 @@ function advtrains.hud_train_format(train, flip)
local topLine, firstLine, secondLine
- topLine=" ["..mletter[fct*train.movedir].."] {"..levers.."} "..doorstr[(train.door_open or 0) * train.movedir]
+ topLine=" ["..mletter[fct].."] {"..levers.."} "..doorstr[(train.door_open or 0) * fct]
firstLine=attrans("Speed:").." |"..string.rep("+", vel)..string.rep("_", max-vel).."> "..vel_kmh.." km/h"
secondLine=attrans("Target:").." |"..string.rep("+", tvel)..string.rep("_", max-tvel).."> "..tvel_kmh.." km/h"