diff options
-rw-r--r-- | auto_yards/init_code.lua | 7 | ||||
-rw-r--r-- | durt/nodes/(-1512,8,-2613).lua | 2 |
2 files changed, 5 insertions, 4 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) diff --git a/durt/nodes/(-1512,8,-2613).lua b/durt/nodes/(-1512,8,-2613).lua index b38ec43..9651843 100644 --- a/durt/nodes/(-1512,8,-2613).lua +++ b/durt/nodes/(-1512,8,-2613).lua @@ -4,8 +4,8 @@ local loco_track = POS(-1515,7,-2625) if event.ext_int then if event.message == "S27" then if F.indicator(ind) then return end + F.indicator(ind,true) interrupt_pos(loco_track,"SEND") - F.indicator(ind,false) return end end |