blob: bc9734850d84b079dd91137f12182abd4440c3d4 (
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
|
local indicator = POS(-2080,6,826)
local rc = (get_rc or "")
local shunting_rc = {"ArcLoad_split","ArcLoad_around","ArcLoad_rejoin"}
if type(rc) == "string" then rc = function() return "" end end
if rc():match("ArcLoad_NOSHUNT") then return end
if event.train and atc_arrow then
if getstate(indicator) == "green" then
F.remove_rc(shunting_rc,true)
atc_send("S0WRD1A1S2D10SM")
setstate(indicator,"red")
set_rc(rc().." ArcLoad_exit")
print("Arcload departing")
else
print("Arcload arrived")
local o_text = atc_get_text_outside() or ""
atc_set_text_outside("Waiting for Locomotive")
split_off_locomotive("A0B0",1)
atc_set_text_outside(o_text)
set_rc(rc().." "..table.concat(shunting_rc," "))
setstate(indicator,"green")
end
print(get_rc())
end
|