diff options
Diffstat (limited to 'auto_yards')
-rw-r--r-- | auto_yards/init_code.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/auto_yards/init_code.lua b/auto_yards/init_code.lua index 7c37bc1..e733797 100644 --- a/auto_yards/init_code.lua +++ b/auto_yards/init_code.lua @@ -363,7 +363,7 @@ F.headshunt_exit = function(yard_id,this_dir) -- arrow points out of yard F.remove_rc_match(yard_id.."_WAGONS_%d+") if yard.notify_pos and yard.notify then - if #yard.notify > 0 then + if yard.notify[1] == true then interrupt_pos(yard.notify_pos,"notify") end end @@ -422,12 +422,13 @@ F.lane_EOL = function(yard_id,this_dir) -- arrow points towards headshunt end else if F.indicator(yard.dir_indicator_pos) == this_dir then - F.remove_rc_match(yard_id.."_CLASS_%S+") local fc = F.get_rc_safe():match(yard_id.."_CLASS_(%S+)") + F.remove_rc_match(yard_id.."_CLASS_%S+") + if not yard.notify or yard.notify_pos then return end if not fc then return end if fc == "*" then return end if F.has_rc(yard_id.."_COLLECT_"..fc) then return end - S.yards[yard_id].notify[fc] = true + table.insert(S.yards[yard_id].notify,fc) else --this should never come into play as it means the train has entered from the wrong end somehow atc_send("BBOL") --stop the train and open the doors (if available) to signify assistance required F.indicator(yard.error_indicator_pos,true) |