blob: 6cc1eadaa654f9b271c06031e29f6094e232c788 (
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
37
38
39
40
41
42
43
44
45
|
if not atc_arrow then return end
if not F.has_rc("OAF_SHUNTER") then return end
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_lzb_tsr(1)
atc_set_ars_disable(true)
return
end
if not event.train then return end
local cmd = {}
if train_length() == 1 then
cmd = {
"OAF_HS_S",
"OAF_LocoStore"
}
F.add_rc(cmd)
atc_send("S0WD2RA1S4")
return
end
cmd = {
"OAF_HS_N",
"OAF_HS_TRANSFER_SB",
"OAF_HS_S",
"OAF_HS_S_AC",
"OAF_NB_TK3_SHUNT",
"OAF_SHUTNER_REJOIN"
}
if not F.has_rc("OAF_SHUTNER_REJOIN") then
split_off_locomotive("A0B0", 1)
F.add_rc(cmd)
atc_send("A1S3")
return
end
--else loco has run around and rejoined
F.remove_rc(cmd)
F.add_rc({
"OAF_HS_S",
"OAF_HS_S_AC",
"OAF_INBOUND"
})
atc_send("S0WRD3A1S4")
|