diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-10-15 22:37:42 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-10-15 22:37:42 +0200 |
commit | 572b186e28ddc2a630613765c0f0780b4664380f (patch) | |
tree | e93412c97c577b04bbf12749bfe61470e001063a /durt/nodes/(-4158,12,-2742).lua | |
parent | 5c7f77725394d47ce0b907aabf885ea207a507bd (diff) | |
download | luaatc_envs-572b186e28ddc2a630613765c0f0780b4664380f.tar.gz luaatc_envs-572b186e28ddc2a630613765c0f0780b4664380f.tar.bz2 luaatc_envs-572b186e28ddc2a630613765c0f0780b4664380f.zip |
Diffstat (limited to 'durt/nodes/(-4158,12,-2742).lua')
-rw-r--r-- | durt/nodes/(-4158,12,-2742).lua | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/durt/nodes/(-4158,12,-2742).lua b/durt/nodes/(-4158,12,-2742).lua deleted file mode 100644 index b18dc7f..0000000 --- a/durt/nodes/(-4158,12,-2742).lua +++ /dev/null @@ -1 +0,0 @@ ---Still need to convert to a function rather than trackside
local hs_sig = "TheStacks_hs"
local hs_route = "Right to Wye"
local exit_sig = "TheStacks_exit"
local exit_route = "Exit to Mainline"
local siding_id = "TheStacks"
local length_prefix = "Loco"
if (event.train and atc_arrow) then
local rc = get_rc() or " "
-- the RC that controls the link to split
-- rc value: "<rc><num_wagons to shunt with>" default is single loco
-- eg "Loco2" for tenders, "Loco3" for
local loco_pos = rc:match(length_prefix.."%d+") or length_prefix.."1"
loco_pos = tonumber(loco_pos:match("%d+"))+1
if not S.runarounds[siding_id].shunting then -- train to be split
--store info for later re-insertion
S.runarounds[siding_id] = {
['shunting'] = true,
['rc'] = rc,
['line'] = get_line() or " "
}
atc_send("B0S0")
interrupt(5,{['cmd'] = "split", ['leng'] = loco_pos})
-- change int time if needed, depends on approach speed slowdown
else -- train has rejoined
--re-insert info to train
if S.runarounds[siding_id].rc then set_rc(S.runarounds[siding_id].rc) end
if S.runarounds[siding_id].line then set_line(S.runarounds[siding_id].line) end
--depart
atc_send("B0S0WD1RSM")
set_route(exit_sig,exit_route)
S.runarounds[siding_id].shunting = false
end
end
if event.int then
if event.msg.cmd=="split" then
cmd = event.msg
split_at_index(cmd.leng,"")
atc_send("S2")
set_route(hs_sig,hs_route)
end
end
\ No newline at end of file |