summaryrefslogtreecommitdiff
path: root/auto_yards/nodes/(-2004,2,-1101).lua
diff options
context:
space:
mode:
Diffstat (limited to 'auto_yards/nodes/(-2004,2,-1101).lua')
-rw-r--r--auto_yards/nodes/(-2004,2,-1101).lua27
1 files changed, 9 insertions, 18 deletions
diff --git a/auto_yards/nodes/(-2004,2,-1101).lua b/auto_yards/nodes/(-2004,2,-1101).lua
index c39016a..6ff3fbf 100644
--- a/auto_yards/nodes/(-2004,2,-1101).lua
+++ b/auto_yards/nodes/(-2004,2,-1101).lua
@@ -1,23 +1,14 @@
local yard_id = "BY"
local subs = {
- ['S27'] = POS(-1512,8,-2613)
+ ['S27'] = POS(-1512,8,-2613),
+ ['no_match_anywhere'] = POS(-2006,3,-1099),
}
-if event.ext_int then
- print(event)
- local m = event.message
- if m.command == "NOTIFY" then -- store the notifications in the yards's S table entry for mass-dispatch
- if m.msg == "*" then return end -- no need to notify for the LHF train's collect moves
- S.yards[yard_id].notify[m.msg] = true
- return
- end
- if m.command == "COLLECTED" then
- S.yards[yard_id].notify[m.msg] = nil
- return
- end
- if m.command == "EXIT" then
- for k in pairs(S.yards[yard_id].notify) do
- if subs[k] then interrupt_pos(subs[k],{command="NOTIFY",msg=k}) end
+
+if event.ext_int or event.punch then
+ for fc, pos in pairs(subs) do
+ if S.yards[yard_id].notify[fc] then
+ interrupt_pos(pos,"notify")
end
- return
end
-end \ No newline at end of file
+ S.yards[yard_id].notify = {}
+end