summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2080,3,832).lua
blob: 9a71d8371963e4f9b8ab0e6e87e39e18f14496e1 (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
local dir_indicator = POS(-2079,7,803)
local this_dir = true

if event.schedule then
	if not atc_id then
		atc_send_to_train(event.msg,"B0WRD1S1")
		return
	end
	if event.msg == atc_id then 
		schedule_in(";01",atc_id)
		return
	else
		atc_send("BB")
		atc_send_to_train("BB")
		return
	end
	return
end

if event.train and atc_arrow then
	if F.has_rc("ARC_LOAD_reverse") and F.dir(dir_indicator) == this_dir then
		set_autocouple()
		schedule_in(";01",atc_id)
		return
	end
	if F.has_rc("ARC_LOAD_exit") then
		F.remove_rc({"ARC_LOAD_exit"})
		atc_send("D5SM")
		return
	end
end