summaryrefslogtreecommitdiff
path: root/auto_yards/nodes/(-2004,2,-1101).lua
blob: c0d57ae866ea6dca9a77184035964dbb3ad2059a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
local yard_id = "BY"

if not S.yards[yard_id].notify then return end

local subs = {
--[[
	A list of FC subscribers to send out notifications for.
	Each entry must have a coresponding Lua Track / Operators Panel to trigger (using event.ext_int)
	Used to alert a shunter locomotive or other yard that there's wagons available to collect from this yard.
]]--

	['ARC'] = {['pos'] = POS(-1973,16,800), ['msg'] = "notify"},
}

if event.ext_int or event.punch then
	local list = "Notify: "
	for fc, sub in pairs(subs) do
		if S.yards[yard_id].notify[fc] then
			interrupt_pos(sub.pos,sub.msg or "notify")
			list = list .. fc .. ", "
		end
	end
	digiline_send("lcd",list)
	S.yards[yard_id].notify = {}
end