summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2080,3,787).lua
blob: 79ffde6877957cd38c6bd16abf1f6cbae4c8d2b5 (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
local dir_indicator = POS(-2079,7,803)
local this_dir = false

__approach_callback_mode = 2
if event.approach and not event.has_entered then
	atc_set_lzb_tsr(2)
	atc_set_ars_disable(true)
	return
end

if event.train then
	if not F.has_rc("ARC_LOAD") then
		atc_set_ars_disable(false)
		return
	end
	if F.has_rc("ARC_LOAD_exit") then
		atc_set_ars_disable(false)
		return
	end
	if not atc_arrow then 
		atc_send("S2")
		return
	end
	
	if not F.has_rc("ARC_LOAD_rejoin") then
		split_at_fc("B0")
		F.add_rc("ARC_LOAD_reverse ARC_LOAD_load")
		atc_send("A1S2")
		F.dir(dir_indicator,this_dir)
	else
		unset_autocouple()
		F.remove_rc({"ARC_LOAD_reverse","ARC_LOAD_rejoin"})
		F.add_rc("ARC_LOAD_exit")
		atc_send("B0WRD1S6A1")
	end
end