diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:50 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:50 +0200 |
commit | b6c1de75dfbbc9ecdc7a17bb1fc0036935bac03e (patch) | |
tree | ad3922d436c8f95ecfef63cffc441341d2c62fc3 /auto_yards | |
parent | b48d879c279b5f1ee1b6fe6dc392ba77708de173 (diff) | |
download | luaatc_envs-b6c1de75dfbbc9ecdc7a17bb1fc0036935bac03e.tar.gz luaatc_envs-b6c1de75dfbbc9ecdc7a17bb1fc0036935bac03e.tar.bz2 luaatc_envs-b6c1de75dfbbc9ecdc7a17bb1fc0036935bac03e.zip |
State at 2022-06-28
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) |