summaryrefslogtreecommitdiff
path: root/durt/nodes/(-1444,11,-2546).lua
blob: aeef76b948139f646790c4b60687b50c23f2ec18 (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
26
27
28
29
30
31
32
33
34
35
36
37
local ind = POS(-1444,10,-2546)
local function send_train()
	local rc = {
		"FREIGHT",
		"S27_SHUNTER",
		"S27_EXP_EXIT_N",
		"S27_EXP",
		"S23",
		"ARC_AUTO",
		"ARC_COLLECT_S27_EXPORT",
		"ARC_AUTO_S23S",
		"MGGR"
	}
	set_rc(table.concat(rc," "))
	atc_send("S0WRD2A1S4")
	print(rwt.to_string(rwt.now()).." S27_EXPORT Send Train")
	F.indicator(ind,false)
end
if event.ext_int then
	print(rwt.to_string(rwt.now()).." S27_EXPORT RX Notification")
	if F.indicator(ind) then return end
	if atc_id then
		send_train()
		return
	else
		F.indicator(ind,true)
		return
		end
end
if event.train then
	if F.indicator(ind) then
		send_train()
		return
	end
	atc_send("B0")
	return
end