From ac853fa04d0d8a6489320dfe7dbd60c9371d756b Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:57:43 +0200 Subject: State at 2022-06-19 --- auto_yards/nodes/(-2004,2,-1101).lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 auto_yards/nodes/(-2004,2,-1101).lua (limited to 'auto_yards/nodes/(-2004,2,-1101).lua') 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 -- cgit v1.2.3