summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auto_yards/nodes/(-586,26,2504).lua3
-rw-r--r--auto_yards/nodes/(-588,26,2504).lua18
-rw-r--r--auto_yards/nodes/(-588,26,2534).lua3
-rw-r--r--auto_yards/nodes/(-630,26,2454).lua15
-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
14 files changed, 121 insertions, 11 deletions
diff --git a/auto_yards/nodes/(-586,26,2504).lua b/auto_yards/nodes/(-586,26,2504).lua
index c8fd2cb..e5831fc 100644
--- a/auto_yards/nodes/(-586,26,2504).lua
+++ b/auto_yards/nodes/(-586,26,2504).lua
@@ -35,8 +35,7 @@ if F.has_rc("CAN_INTRA_SHUFFLE") then
"CAN_HS_W", --departures track has Cpl function built in
"CAN_CLASS_DEPARTURES"
})
- step_fc()
- F.indicator(sand_indicator, false) --ensure the sand indicator is off to allow the wagons to load
+ F.indicator(sand_indicator, false) -- Loaded wagons have been sent to departures track. Disable the request indicator
return
end
return
diff --git a/auto_yards/nodes/(-588,26,2504).lua b/auto_yards/nodes/(-588,26,2504).lua
new file mode 100644
index 0000000..8b1f38e
--- /dev/null
+++ b/auto_yards/nodes/(-588,26,2504).lua
@@ -0,0 +1,18 @@
+-- Cannery Dirt Loading Lane Modified
+local ind = POS(-594,26,2488) --notification indicator
+local clay_indicator = POS(-570,26,2515) --clay loaded indicator
+
+if F.has_rc("CAN_INTRA_SHUFFLE") then
+ if not atc_arrow then return end
+ if F.has_rc("CAN_CLASS_CLAY_LOAD") then -- remove wagons, step the fc, move wagons to departures
+ F.remove_rc("CAN_CLASS_CLAY_LOAD")
+ F.add_rc({
+ "CAN_HS_W", --departures track has Cpl function built in
+ "CAN_CLASS_DEPARTURES"
+ })
+ F.indicator(clay_indicator, false) -- Loaded wagons have been sent to departures track. Disable the request indicator
+ return
+ end
+ return
+end
+F.lane_EOL("CAN",true) \ No newline at end of file
diff --git a/auto_yards/nodes/(-588,26,2534).lua b/auto_yards/nodes/(-588,26,2534).lua
new file mode 100644
index 0000000..d783815
--- /dev/null
+++ b/auto_yards/nodes/(-588,26,2534).lua
@@ -0,0 +1,3 @@
+if F.has_rc("CAN_INTRA_SHUFFLE") then atc_send("A0S0WRD5S3A1") return end
+-- EOL
+F.lane_EOL("CAN",false) \ No newline at end of file
diff --git a/auto_yards/nodes/(-630,26,2454).lua b/auto_yards/nodes/(-630,26,2454).lua
index 4e69484..d968800 100644
--- a/auto_yards/nodes/(-630,26,2454).lua
+++ b/auto_yards/nodes/(-630,26,2454).lua
@@ -1,10 +1,12 @@
-- Cannery Loco Storage
local notification_id = "CAN"
local ind = POS(-594,26,2488) --notification indicator
-local sand_indicator = POS(-572,26,2515) --sand indicator
+local sand_indicator = POS(-572,26,2515) --sand loaded indicator
+local clay_indicator = POS(-570,26,2515) --clay loaded indicator
local print_notification = true
local sections = {
+ clay_loading = "769966",
sand_loading = "199126",
dirt_unloading = "541313",
departures = "484515"
@@ -29,18 +31,27 @@ local function send_train()
"CANNERY",
"CAN_COLLECT_DEPARTURES"
}
- if section_occupancy(sections.sand_loading)[1] and F.indicator(sand_indicator) then -- move the loaded sand wagons to the departures track when requested
+ if section_occupancy(sections.clay_loading)[1] and F.indicator(clay_indicator) then -- move the loaded clay wagons to the departures track when requested
+ base_rc[#base_rc+1] = "CAN_INTRA_SHUFFLE"
+ base_rc[#base_rc+1] = "CAN_HS_W"
+ base_rc[#base_rc+1] = "CAN_HS_W_AC"
+ base_rc[#base_rc+1] = "CAN_CLASS_CLAY_LOAD"
+ F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around
+ print("Collecting loaded clay wagons")
+ elseif section_occupancy(sections.sand_loading)[1] and F.indicator(sand_indicator) then -- move the loaded sand wagons to the departures track when requested
base_rc[#base_rc+1] = "CAN_INTRA_SHUFFLE"
base_rc[#base_rc+1] = "CAN_HS_W"
base_rc[#base_rc+1] = "CAN_HS_W_AC"
base_rc[#base_rc+1] = "CAN_CLASS_SAND_LOAD"
F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around
+ print("Collecting loaded sand wagons")
elseif section_occupancy(sections.dirt_unloading)[1] and not section_occupancy(sections.sand_loading)[1] then -- move the unloaded dirt wagons to the sand track if there's room
base_rc[#base_rc+1] = "CAN_INTRA_SHUFFLE"
base_rc[#base_rc+1] = "CAN_HS_W"
base_rc[#base_rc+1] = "CAN_HS_W_AC"
base_rc[#base_rc+1] = "CAN_CLASS_DIRT_UNLOAD"
F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around
+ print("Respotting unloaded dirt wagons to sand loading area")
elseif section_occupancy(sections.departures)[1] then --collect departures wagons before departing proper
base_rc[#base_rc+1] = "CAN_REENTER_YARD"
F.indicator(ind, false)
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