summaryrefslogtreecommitdiff
path: root/durt
diff options
context:
space:
mode:
Diffstat (limited to 'durt')
-rw-r--r--durt/nodes/(-1973,16,800).lua17
-rw-r--r--durt/nodes/(-4117,13,-5765).lua17
-rw-r--r--durt/nodes/(-4120,13,-5818).lua3
-rw-r--r--durt/nodes/(-4144,13,-5793).lua45
-rw-r--r--durt/nodes/(-571,26,2515).lua2
-rw-r--r--durt/nodes/(-572,27,2515).lua2
-rw-r--r--durt/nodes/(1739,17,4654).lua (renamed from durt/nodes/(1742,17,4652).lua)0
-rw-r--r--durt/nodes/(1858,17,4242).lua2
-rw-r--r--durt/nodes/(1864,17,4296).lua2
-rw-r--r--durt/nodes/(1894,23,4548).lua3
10 files changed, 86 insertions, 7 deletions
diff --git a/durt/nodes/(-1973,16,800).lua b/durt/nodes/(-1973,16,800).lua
index e6166e8..ca1446e 100644
--- a/durt/nodes/(-1973,16,800).lua
+++ b/durt/nodes/(-1973,16,800).lua
@@ -2,6 +2,7 @@ local notification_id = "ARC"
local ind = POS(-1954,16,840)
local print_notification = true
local sections ={
+ departures = "262432", -- Destined for Byard
store_4 = "032832" -- Destined for Arcadius Basement Loading Dock
}
local function send_train()
@@ -32,6 +33,22 @@ local function send_train()
"ARC_AUTO_LOCAL_LOADING", --direct to ARC Basement Loading Dock
"ARC_LOAD", --trigger the loading track
}
+ elseif #section_occupancy(sections.departrues) ~= 0 then
+ if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." send_train() has local job from STORE_4") end
+ cmd = { -- collect wagons from BYARD, and park loco in loco siding if no departures at ARC
+ "FREIGHT",
+ "ARC_LOCOSTORE",
+ "ARC_AUTO",
+ "ARC_RTS",
+ "ARC_COLLECT_ARC_SB",
+ "ARC_YARD_REENTRY",
+ "ARC_2ND_EXIT_ARC_AUTO_S23S",
+ "S23E3N",
+ "BYARD",
+ "BY_RTS",
+ "BY_COLLECT_ARC",
+ "E3S23N",
+ }
end
set_rc(table.concat(cmd," "))
atc_send("S0WRD2A1S4")
diff --git a/durt/nodes/(-4117,13,-5765).lua b/durt/nodes/(-4117,13,-5765).lua
index 599792f..f1087c7 100644
--- a/durt/nodes/(-4117,13,-5765).lua
+++ b/durt/nodes/(-4117,13,-5765).lua
@@ -2,6 +2,17 @@
local arrivals_indicator = POS(-4107, 20, -5793)
local departures_indicator = POS(-4107, 20, -5791)
local road_loco_storage = POS(-4152,13,-5840)
+
+if event.schedule then
+ if event.msg=="send_road_loco" then
+ interrupt_pos(road_loco_storage,"departures")
+ return
+ end
+ return
+end
+if not event.train then return end
+
+
if not atc_arrow then --clean up RC from directing RC's
F.remove_rc_match("DLG_DIR_%S+_N")
return
@@ -16,8 +27,12 @@ end
-- --we'll deal with the yard shunter later
if F.has_rc("DLG_SHUNTER") then
F.indicator(departures_indicator, true)
- interrupt_pos(road_loco_storage,"departures")
split_off_locomotive("B0S0A0",1)
+ schedule_in("0;20","send_road_loco")
+ local cmd = {
+ "DLG_HS_N"
+ }
+ F.add_rc(cmd)
-- if not F.indicator(arrivals_indicator) then --send shunter to its storage siding
-- F.add_rc({
-- "DLG_HS_N",
diff --git a/durt/nodes/(-4120,13,-5818).lua b/durt/nodes/(-4120,13,-5818).lua
index ae273e3..2f93993 100644
--- a/durt/nodes/(-4120,13,-5818).lua
+++ b/durt/nodes/(-4120,13,-5818).lua
@@ -25,7 +25,8 @@ if event.train then
split_off_locomotive("B0S0", 3)
local cmd = {
"DLG_HS_S",
- "DLG_HS_KICKBACK",
+ "DLG_HS_Transfer_S_N2",
+ "DLG_HS_N2",
"DLG_Loco_Storage"
}
F.add_rc(cmd) --send the road loco to collect departures or storage
diff --git a/durt/nodes/(-4144,13,-5793).lua b/durt/nodes/(-4144,13,-5793).lua
new file mode 100644
index 0000000..059c6ef
--- /dev/null
+++ b/durt/nodes/(-4144,13,-5793).lua
@@ -0,0 +1,45 @@
+-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt
+local rev_rc = "DLG_HS_N2"
+local rm_rc = true
+local autocouple = "DLG_HS_N2_AC"
+local rm_cpl_rc = true
+
+
+__approach_callback_mode = 1
+
+if event.approach and not event.has_entered then
+ atc_set_lzb_tsr(3)
+ atc_set_ars_disable(true)
+ return
+end
+
+if event.train then
+ if not atc_arrow then --train has bounced
+ if F.has_rc(autocouple) then
+ atc_send("CplS0WD2S1")
+ if rm_cpl_rc then F.remove_rc({autocouple}) end
+ end
+ return
+ end
+
+ if not F.has_rc(rev_rc) then --not our train. disregard
+ atc_set_ars_disable(false)
+ return
+ end
+ if rm_rc then F.remove_rc({rev_rc}) end
+ schedule_in(";01",atc_id)
+ return
+end
+
+if event.schedule then
+ if not atc_id then --bounce the train that just passed
+ atc_send_to_train(event.msg,"B0WRD1A1S3")
+ else
+ if atc_id == event.msg then --train hasn't fully passed yet, wait a bit longer
+ schedule_in(";01",atc_id)
+ else -- somehow another train crossed the controller before the first one returned. Unlikely but possible
+ atc_send_to_train(event.msg,"BBOL")
+ atc_send("BBOL")
+ end
+ end
+end \ No newline at end of file
diff --git a/durt/nodes/(-571,26,2515).lua b/durt/nodes/(-571,26,2515).lua
new file mode 100644
index 0000000..17d8bf3
--- /dev/null
+++ b/durt/nodes/(-571,26,2515).lua
@@ -0,0 +1,2 @@
+if not (event.name == "Maverick2797" or event.name=="Wile-E-Coyote") then return end
+interrupt_pos(POS(-630,26,2454), "notify") \ No newline at end of file
diff --git a/durt/nodes/(-572,27,2515).lua b/durt/nodes/(-572,27,2515).lua
deleted file mode 100644
index c658a14..0000000
--- a/durt/nodes/(-572,27,2515).lua
+++ /dev/null
@@ -1,2 +0,0 @@
--- if event.puncher ~= "Maverick2797" then return end
-interrupt_pos(POS(-630,26,2454), "notify") \ No newline at end of file
diff --git a/durt/nodes/(1742,17,4652).lua b/durt/nodes/(1739,17,4654).lua
index 7489acc..7489acc 100644
--- a/durt/nodes/(1742,17,4652).lua
+++ b/durt/nodes/(1739,17,4654).lua
diff --git a/durt/nodes/(1858,17,4242).lua b/durt/nodes/(1858,17,4242).lua
index 44742c4..e40678b 100644
--- a/durt/nodes/(1858,17,4242).lua
+++ b/durt/nodes/(1858,17,4242).lua
@@ -68,7 +68,7 @@ if event.schedule then
if dir == "SHOVE" then -- loco first into platform, run around to shove out
-- split_off_locomotive("S0OLA0",2) --ideally each pax wagon has a generic FC, but not likely as few people use them at all
if train_length() > 1 then
- split_at_index(2,"S0OLA0")
+ split_at_index(2,"B0S0OLA0")
atc_send("S3")
F.add_rc(movelist[dir])
else
diff --git a/durt/nodes/(1864,17,4296).lua b/durt/nodes/(1864,17,4296).lua
index 0136ea7..1f0d6ff 100644
--- a/durt/nodes/(1864,17,4296).lua
+++ b/durt/nodes/(1864,17,4296).lua
@@ -68,7 +68,7 @@ if event.schedule then
if dir == "SHOVE" then -- loco first into platform, run around to shove out
-- split_off_locomotive("S0OLA0",2) --ideally each pax wagon has a generic FC, but not likely as few people use them at all
if train_length() > 1 then
- split_at_index(2,"S0OLA0")
+ split_at_index(2,"B0S0OLA0")
atc_send("S3")
F.add_rc(movelist[dir])
else
diff --git a/durt/nodes/(1894,23,4548).lua b/durt/nodes/(1894,23,4548).lua
index 5245388..c27d386 100644
--- a/durt/nodes/(1894,23,4548).lua
+++ b/durt/nodes/(1894,23,4548).lua
@@ -7,6 +7,7 @@ end
if event.train then
if not atc_arrow then return end
if not F.has_rc("OAF_BRANCH_REVERSE") then return end
+ atc_send("S2")
schedule_in(";01",atc_id)
print("start ping")
return
@@ -18,7 +19,7 @@ if event.schedule then
return
end
print("end ping")
- atc_send_to_train(event.msg, "S0WRD2SM")
+ atc_send_to_train(event.msg, "B0WRD2SM")
local newstate = getstate(POS(1894, 21, 4548))
setstate(POS(1892, 23, 4547))
return