diff options
Diffstat (limited to 'durt/nodes')
-rw-r--r-- | durt/nodes/(-1226,13,-2135).lua | 9 | ||||
-rw-r--r-- | durt/nodes/(-1924,13,-1692).lua | 2 | ||||
-rw-r--r-- | durt/nodes/(-2084,21,851).lua | 4 | ||||
-rw-r--r-- | durt/nodes/(-2734,10,-1693).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-3820,18,-4730).lua | 7 | ||||
-rw-r--r-- | durt/nodes/(-3820,18,-4743).lua | 3 | ||||
-rw-r--r-- | durt/nodes/(-3821,18,-4761).lua | 14 | ||||
-rw-r--r-- | durt/nodes/(-3824,18,-4774).lua | 7 | ||||
-rw-r--r-- | durt/nodes/(-4158,12,-2742).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(180,20,1256).lua | 3 |
10 files changed, 48 insertions, 3 deletions
diff --git a/durt/nodes/(-1226,13,-2135).lua b/durt/nodes/(-1226,13,-2135).lua new file mode 100644 index 0000000..ccf5d5d --- /dev/null +++ b/durt/nodes/(-1226,13,-2135).lua @@ -0,0 +1,9 @@ +if get_line() == "S23" or get_line() == "BH" then + if atc_arrow then + atc_set_text_inside("S23 -> Arcadius") + atc_set_text_outside("S23 -> Arcadius") + else + atc_set_text_inside("Terminus: Mom Junction/nChange here for E1, E10 and Mom Express") + atc_set_text_outside("S23") + end +end
\ No newline at end of file diff --git a/durt/nodes/(-1924,13,-1692).lua b/durt/nodes/(-1924,13,-1692).lua index 88ad8a6..6b92378 100644 --- a/durt/nodes/(-1924,13,-1692).lua +++ b/durt/nodes/(-1924,13,-1692).lua @@ -1 +1 @@ -signal = "foundry_roads_sorting"
if (event.train and atc_arrow) or (event.int and event.message == "check_signal") then
if can_set_route(signal,"In Road") then
set_route(signal,"In Road")
elseif can_set_route(signal,"Out Road") then
set_route(signal,"Out Road")
else
if atc_speed > 0 then
atc_send("S0")
else
atc_send("B0")
end
interrupt(5,"check_signal")
return
end
atc_send("S1")
return
end
\ No newline at end of file +signal = "foundry_roads_sorting"
if (event.train and atc_arrow) or (event.int and event.message == "check_signal") then
if can_set_route(signal,"In Road (Fuel In)") then
set_route(signal,"In Road (Fuel In)")
elseif can_set_route(signal,"Out Road (Loadout)") then
set_route(signal,"Out Road (Loadout)")
else
if atc_speed > 0 then
atc_send("S0")
else
atc_send("B0")
end
interrupt(5,"check_signal")
return
end
atc_send("S1")
return
end
\ No newline at end of file diff --git a/durt/nodes/(-2084,21,851).lua b/durt/nodes/(-2084,21,851).lua index 18e9eef..555a3ed 100644 --- a/durt/nodes/(-2084,21,851).lua +++ b/durt/nodes/(-2084,21,851).lua @@ -1,7 +1,7 @@ if get_line() == "S23" or get_line() == "BH" then if atc_arrow then - atc_set_text_inside("S23 -> Redwood") - atc_set_text_outside("S23 -> Redwood") + atc_set_text_inside("S23 -> Mom Junction") + atc_set_text_outside("S23 -> Mom Junction") else atc_set_text_inside("Terminus: Arcadius/nChange here for S20") atc_set_text_outside("S23") diff --git a/durt/nodes/(-2734,10,-1693).lua b/durt/nodes/(-2734,10,-1693).lua new file mode 100644 index 0000000..8043b8c --- /dev/null +++ b/durt/nodes/(-2734,10,-1693).lua @@ -0,0 +1 @@ +--Still need to convert to a function rather than trackside
local hs_sig = "M27_Quarry_Headshunt"
local hs_route = "Headshunt"
local exit_sig = "M27_Quarry_Exit"
local exit_route = "Exit to Mainline"
local siding_id = "M27_Quarry_runaround"
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("B0WD3RSM")
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,"")
set_rc(S.runarounds[siding_id].rc .. " shunt_limit")
atc_send("S2")
set_route(hs_sig,hs_route)
end
end
\ No newline at end of file diff --git a/durt/nodes/(-3820,18,-4730).lua b/durt/nodes/(-3820,18,-4730).lua new file mode 100644 index 0000000..cd90f80 --- /dev/null +++ b/durt/nodes/(-3820,18,-4730).lua @@ -0,0 +1,7 @@ +if (atc_arrow and event.type == "train" and get_rc() == "sfh_shunt") then + setstate("SFH-T1-N", "st") + atc_send("B0") + interrupt(8, "proceed") +elseif (event.type == "interrupt") then + atc_send("R S2") +end
\ No newline at end of file diff --git a/durt/nodes/(-3820,18,-4743).lua b/durt/nodes/(-3820,18,-4743).lua new file mode 100644 index 0000000..3f5d585 --- /dev/null +++ b/durt/nodes/(-3820,18,-4743).lua @@ -0,0 +1,3 @@ +if atc_arrow and get_rc() == "sfh_shunt" then + set_rc("sfh_service") +end
\ No newline at end of file diff --git a/durt/nodes/(-3821,18,-4761).lua b/durt/nodes/(-3821,18,-4761).lua new file mode 100644 index 0000000..14c0d7c --- /dev/null +++ b/durt/nodes/(-3821,18,-4761).lua @@ -0,0 +1,14 @@ +if atc_arrow then + if (event.type == "train") then + atc_send("B0") + setstate("SFH-T2-S", "cr") + set_rc("sfh_shunt") + interrupt(5, "proceed") + elseif (event.type == "int") then + set_route("sfh-T1-headshunt", "Enter Headshunt") + split_at_index(2, "") + atc_send("S2") + end +else + atc_send("B0WRS1") +end
\ No newline at end of file diff --git a/durt/nodes/(-3824,18,-4774).lua b/durt/nodes/(-3824,18,-4774).lua new file mode 100644 index 0000000..5ac8a65 --- /dev/null +++ b/durt/nodes/(-3824,18,-4774).lua @@ -0,0 +1,7 @@ +if ((event.type == "train") and atc_arrow) then + atc_send("B0") + setstate("SFH-T2-S", "st") + interrupt(3, "proceed") +elseif (event.type == "int") then + atc_send("R S4") +end
\ No newline at end of file diff --git a/durt/nodes/(-4158,12,-2742).lua b/durt/nodes/(-4158,12,-2742).lua new file mode 100644 index 0000000..b18dc7f --- /dev/null +++ b/durt/nodes/(-4158,12,-2742).lua @@ -0,0 +1 @@ +--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 diff --git a/durt/nodes/(180,20,1256).lua b/durt/nodes/(180,20,1256).lua new file mode 100644 index 0000000..e3b6223 --- /dev/null +++ b/durt/nodes/(180,20,1256).lua @@ -0,0 +1,3 @@ +if atc_arrow then + setstate("EWLF-N", "cr") +end
\ No newline at end of file |