summaryrefslogtreecommitdiff
path: root/durt/nodes/(-1442,11,-2568).lua
blob: 5346db16a543ef2cdf4f2be16446aa53dfaea57b (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
--S27 Export Arrivals
if not atc_arrow then return end
if not F.has_rc("S27_SHUNTER") then return end
if train_length() == 1 then --return loco to storage via N headshunt (backwards)
	F.add_rc({
		"S27_EXP_LOCOSTORE",
		"S27_EXP_HS_N",
	})
	atc_send("S0WD3RS3")
	return
end
if not F.has_rc("S27_EXPORT_ACTIVE") then --train has just arrived. run around
	split_off_locomotive("A0B0",1)
	F.add_rc({
		"S27_EXPORT_ACTIVE",
		"S27_EXP_HS_S",
		"S27_EXP_AROUND",
		"S27_EXP_HS_N",
		"S27_EXP_HS_N_AC",
		"S27_EXP_DIR_ARRIVALS"
	})
	return
end
F.remove_rc("S27_EXP_AROUND")
atc_send("S0WD3RS1") --bounce the train