aboutsummaryrefslogtreecommitdiff
path: root/advtrains_line_automation/stoprail.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-04-28 16:01:35 +0200
committerorwell96 <orwell@bleipb.de>2021-02-10 16:36:24 +0100
commit8660794ef8392f08fa5be46715abb5dcbd96ca5d (patch)
treef077c3f12f901ed41061ee2672c62d53d5d2c27e /advtrains_line_automation/stoprail.lua
parent5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4 (diff)
downloadadvtrains-8660794ef8392f08fa5be46715abb5dcbd96ca5d.tar.gz
advtrains-8660794ef8392f08fa5be46715abb5dcbd96ca5d.tar.bz2
advtrains-8660794ef8392f08fa5be46715abb5dcbd96ca5d.zip
Fix lots of things around new LZB
Diffstat (limited to 'advtrains_line_automation/stoprail.lua')
-rw-r--r--advtrains_line_automation/stoprail.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains_line_automation/stoprail.lua b/advtrains_line_automation/stoprail.lua
index 5af4399..4fdab51 100644
--- a/advtrains_line_automation/stoprail.lua
+++ b/advtrains_line_automation/stoprail.lua
@@ -169,7 +169,8 @@ local adefunc = function(def, preset, suffix, rotation)
show_stoprailform(pos, player)
end,
advtrains = {
- on_train_approach = function(pos,train_id, train, index)
+ on_train_approach = function(pos,train_id, train, index, has_entered)
+ if has_entered then return end -- do not stop again!
if train.path_cn[index] == 1 then
local pe = advtrains.encode_pos(pos)
local stdata = advtrains.lines.stops[pe]
@@ -180,7 +181,7 @@ local adefunc = function(def, preset, suffix, rotation)
stdata.ars = {default=true}
end
if stdata.ars and (stdata.ars.default or advtrains.interlocking.ars_check_rule_match(stdata.ars, train) ) then
- advtrains.lzb_add_checkpoint(train, index, 2, nil)
+ advtrains.lzb_add_checkpoint(train, index, 0, nil)
local stn = advtrains.lines.stations[stdata.stn]
local stnname = stn and stn.name or "Unknown Station"
train.text_inside = "Next Stop:\n"..stnname