diff options
Diffstat (limited to 'durt/nodes/(-3588,8,-2277).lua')
-rw-r--r-- | durt/nodes/(-3588,8,-2277).lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/durt/nodes/(-3588,8,-2277).lua b/durt/nodes/(-3588,8,-2277).lua index 4e7fb2e..cc91e4a 100644 --- a/durt/nodes/(-3588,8,-2277).lua +++ b/durt/nodes/(-3588,8,-2277).lua @@ -1 +1 @@ ---train splitter track
mainline_line = "Maverick2797_diamonds"
mainline_rc = "autorun FREIGHT"
text_outside = "DURT Logs to Diamonds Conversion Train"
loading_stopper_sig = POS(-3594,9,-2277)
split_around = function()
if ((atc_speed==0) and can_set_route(loading_stopper_sig,"Shunt Around Via Loop")) then
set_autocouple()
split_at_index(2,"S0")
atc_send("S4")
set_route(loading_stopper_sig,"Shunt Around Via Loop")
return
else
interrupt(2,"split_around")
return
end
end
if event.train then
if not atc_arrow then atc_send("B1S1") return end
if get_rc() == "split_around" then
atc_send("B0")
split_around()
return
else --rejoined from splitting or arriving train
atc_send("B0S0WD2RS1")
set_line(mainline_line)
set_rc(mainline_rc)
atc_set_text_outside(text_outside)
atc_set_text_inside("Loading Cargo")
unset_autocouple()
return
end
end
if event.type=="int" then
if event.message=="split_around" then split_around() return end
return
end
\ No newline at end of file +
--West End of Loading Road
local siding_id = "TreeFarm"
local control_interface = POS(-3553,18,-2261)
local hs_sig = POS(-3594,9,-2277)
local hs_route = "Shunt Around Via Loop"
if not S[siding_id] then S[siding_id] = {} end
if not atc_arrow then atc_send("B1") end
if not S[siding_id].yard_active then
if atc_arrow then
S[siding_id].yard_active = true
S[siding_id].info = {
['rc'] = get_rc() or "",
['line'] = get_line() or ""
}
-- set_rc("AROUND")
split_off_locomotive("B0WR")
set_autocouple()
set_route(hs_sig,hs_route)
end
else
if atc_arrow then -- train has rejoined
atc_send("B0WD2RS1") -- reverse and load train
set_rc(S[siding_id].info.rc)
set_line(S[siding_id].info.line)
unset_autocouple()
interrupt_pos(control_interface,"Train Shunted||Now Loading")
S[siding_id].info.rc = nil
S[siding_id].info.line = nil
S[siding_id].yard_active = nil
end
end
\ No newline at end of file |