summaryrefslogtreecommitdiff
path: root/auto_yards/nodes/(-2004,2,-1101).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:57:43 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:57:43 +0200
commitac853fa04d0d8a6489320dfe7dbd60c9371d756b (patch)
treec21c64e8363b38cb46c0bc2f86d8b564b86c95ca /auto_yards/nodes/(-2004,2,-1101).lua
parent81cc5416a111260d21e63b1029864914ee3709f7 (diff)
downloadluaatc_envs-ac853fa04d0d8a6489320dfe7dbd60c9371d756b.tar.gz
luaatc_envs-ac853fa04d0d8a6489320dfe7dbd60c9371d756b.tar.bz2
luaatc_envs-ac853fa04d0d8a6489320dfe7dbd60c9371d756b.zip
State at 2022-06-19
Diffstat (limited to 'auto_yards/nodes/(-2004,2,-1101).lua')
-rw-r--r--auto_yards/nodes/(-2004,2,-1101).lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/auto_yards/nodes/(-2004,2,-1101).lua b/auto_yards/nodes/(-2004,2,-1101).lua
new file mode 100644
index 0000000..c39016a
--- /dev/null
+++ b/auto_yards/nodes/(-2004,2,-1101).lua
@@ -0,0 +1,23 @@
+local yard_id = "BY"
+local subs = {
+ ['S27'] = POS(-1512,8,-2613)
+}
+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
+ end
+ return
+ end
+end \ No newline at end of file