summaryrefslogtreecommitdiff
path: root/Tyard/nodes/(-4011,12,-2642).lua
blob: 56b94141f043557914662c94aadff9f53e92bda3 (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
-- Yard arrival checker
-- F.dir = true if entering from south
local function enter_yard()
	F.dir(false)
	F.yard_active(true)
	atc_set_ars_disable(false)
	atc_send("S6")
	return
end

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

if event.train then
	if F.yard_active() then
		schedule_in(";10","recheck")
		return
	else
		enter_yard()
	end		
end

if event.schedule then
	if F.yard_active() then
		schedule_in(";10","recheck")
		return
	else
		enter_yard()
	end
end