summaryrefslogtreecommitdiff
path: root/durt/nodes/(-4120,13,-5818).lua
blob: ae273e38acf33170a33cbd5eb0693e9b56b76521 (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
--[[ARRIVALS SOUTH END]]--
local departures_section = "242871"
local arrival_indicator = POS(-4107, 20, -5793)
if F.has_rc("DLG_NOSHUNT") then return end
__approach_callback_mode = 1

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

if event.train then
	if not F.has_rc("DLG_FREIGHT") then --not road loco
		if not F.has_rc("DLG_SHUNTER") then --not yard shunter, do everything else here
			atc_set_ars_disable(false)
			return
		end
		--do yard shunter stuff here
		atc_send("B0WRD1A1S3") --bounce to north end for classification
		return
	end
	
	--road loco arriving from TYARD. Send to storage for servicing/redeployment
	split_off_locomotive("B0S0", 3)
	local cmd = {
		"DLG_HS_S",
		"DLG_HS_KICKBACK",
		"DLG_Loco_Storage"
	}
	F.add_rc(cmd) --send the road loco to collect departures or storage
	atc_set_ars_disable(false)
	F.indicator(arrival_indicator, true) --send the signal to then yard shunter
	return
end