summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2077,3,788).lua
blob: ad1d7d2c7dd88a8b552f59b5741f285da24c401a (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
local signal = POS(-2077,4,784)
__approach_callback_mode = 1

if event.approach and not event.has_entered then
	atc_set_lzb_tsr(1)
	atc_set_ars_disable(true)
	return
end

if event.train then
	if F.has_rc("ARC_LOAD_AROUND") then --should be light-engine
		set_route(signal,"Headshunt")
		atc_set_ars_disable(false)
		return
	end
	if F.has_rc("ARC_LOAD_LOADING") then -- train is ready to depart with consist
		F.remove_rc({ --cleanup some loose RCs
			"ARC_LOAD_LOADING",
			"ARC_LOAD_RUNAROUND",
			"ARC_AUTO_LOCAL_LOADING"
		})
		set_route(signal,"Arcadius Auto Yard")
		atc_set_ars_disable(false)
		atc_send("S1D15SM")
		return
	end
	atc_set_ars_disable(false)
end