summaryrefslogtreecommitdiff
path: root/auto_yards/nodes/(-2004,2,-1101).lua
blob: c39016a634aae7ff37ccb9c35897d1bdf1d288fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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