From d8689cfa2dce341c032caa9a5882946d8470ed23 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Sun, 1 Dec 2024 00:00:02 +0100 Subject: State at 2024-12-01 --- auto_yards/nodes/(-586,26,2504).lua | 2 ++ auto_yards/nodes/(-586,26,2534).lua | 3 +++ auto_yards/nodes/(-590,26,2504).lua | 1 + durt/nodes/(-572,27,2515).lua | 2 +- durt/nodes/(1858,17,4242).lua | 26 ++++++++++++++++++++------ durt/nodes/(1864,17,4296).lua | 26 ++++++++++++++++++++------ ywang/nodes/(-586,26,2534).lua | 3 --- 7 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 auto_yards/nodes/(-586,26,2534).lua delete mode 100644 ywang/nodes/(-586,26,2534).lua diff --git a/auto_yards/nodes/(-586,26,2504).lua b/auto_yards/nodes/(-586,26,2504).lua index 0823436..c8fd2cb 100644 --- a/auto_yards/nodes/(-586,26,2504).lua +++ b/auto_yards/nodes/(-586,26,2504).lua @@ -1,4 +1,5 @@ -- Cannery Dirt Loading Lane Modified +local ind = POS(-594,26,2488) --notification indicator local sand_indicator = POS(-572,26,2515) --sand indicator if F.has_rc("CAN_INTRA_SHUFFLE") then @@ -35,6 +36,7 @@ if F.has_rc("CAN_INTRA_SHUFFLE") then "CAN_CLASS_DEPARTURES" }) step_fc() + F.indicator(sand_indicator, false) --ensure the sand indicator is off to allow the wagons to load return end return diff --git a/auto_yards/nodes/(-586,26,2534).lua b/auto_yards/nodes/(-586,26,2534).lua new file mode 100644 index 0000000..d783815 --- /dev/null +++ b/auto_yards/nodes/(-586,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/(-590,26,2504).lua b/auto_yards/nodes/(-590,26,2504).lua index 0823436..7632bd2 100644 --- a/auto_yards/nodes/(-590,26,2504).lua +++ b/auto_yards/nodes/(-590,26,2504).lua @@ -1,4 +1,5 @@ -- Cannery Dirt Loading Lane Modified +local ind = POS(-594,26,2488) --notification indicator local sand_indicator = POS(-572,26,2515) --sand indicator if F.has_rc("CAN_INTRA_SHUFFLE") then diff --git a/durt/nodes/(-572,27,2515).lua b/durt/nodes/(-572,27,2515).lua index e84b01b..c658a14 100644 --- a/durt/nodes/(-572,27,2515).lua +++ b/durt/nodes/(-572,27,2515).lua @@ -1,2 +1,2 @@ -if event.puncher ~= "Maverick2797" then return end +-- 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/(1858,17,4242).lua b/durt/nodes/(1858,17,4242).lua index 4f60fe8..44742c4 100644 --- a/durt/nodes/(1858,17,4242).lua +++ b/durt/nodes/(1858,17,4242).lua @@ -67,14 +67,28 @@ if event.schedule then if not F.has_rc("OAF_BRANCH_REVERSE_RECOUPLED") 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 - split_at_index(2,"S0OLA0") - atc_send("S3") - F.add_rc(movelist[dir]) + if train_length() > 1 then + split_at_index(2,"S0OLA0") + atc_send("S3") + F.add_rc(movelist[dir]) + else + -- don't bother splitting, there's nothing to split anyway! + -- depart light (fallback) + F.add_rc("OAF_BRANCH_REVERSE_DONE") --triggers the ARS to depart + atc_send("SM") + print("DEPARTING LIGHT") + end else --dir == "HEAD" --shoved into platform, run around to put loco first F.add_rc(movelist[dir]) - split_at_index(train_length(),"S0WRA1S3") - F.remove_rc(movelist[dir]) - atc_send("S0WROR") + if train_length() > 1 then + split_at_index(train_length(),"S0WRA1S3") + F.remove_rc(movelist[dir]) + atc_send("S0WROR") + else --don't bother splitting, there's nothing to split anyway! + F.add_rc("OAF_BRANCH_REVERSE_DONE") --triggers the ARS to depart + atc_send("SM") + print("DEPARTING LIGHT") + end end print("SPLIT") return diff --git a/durt/nodes/(1864,17,4296).lua b/durt/nodes/(1864,17,4296).lua index b0f62d1..0136ea7 100644 --- a/durt/nodes/(1864,17,4296).lua +++ b/durt/nodes/(1864,17,4296).lua @@ -67,14 +67,28 @@ if event.schedule then if not F.has_rc("OAF_BRANCH_REVERSE_RECOUPLED") 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 - split_at_index(2,"S0OLA0") - atc_send("S3") - F.add_rc(movelist[dir]) + if train_length() > 1 then + split_at_index(2,"S0OLA0") + atc_send("S3") + F.add_rc(movelist[dir]) + else + -- don't bother splitting, there's nothing to split anyway! + -- depart light (fallback) + F.add_rc("OAF_BRANCH_REVERSE_DONE") --triggers the ARS to depart + atc_send("SM") + print("DEPARTING LIGHT") + end else --dir == "HEAD" --shoved into platform, run around to put loco first F.add_rc(movelist[dir]) - split_at_index(train_length(),"S0WRA1S3") - F.remove_rc(movelist[dir]) - atc_send("S0WROR") + if train_length() > 1 then + split_at_index(train_length(),"S0WRA1S3") + F.remove_rc(movelist[dir]) + atc_send("S0WROR") + else --don't bother splitting, there's nothing to split anyway! + F.add_rc("OAF_BRANCH_REVERSE_DONE") --triggers the ARS to depart + atc_send("SM") + print("DEPARTING LIGHT") + end end print("SPLIT") return diff --git a/ywang/nodes/(-586,26,2534).lua b/ywang/nodes/(-586,26,2534).lua deleted file mode 100644 index d783815..0000000 --- a/ywang/nodes/(-586,26,2534).lua +++ /dev/null @@ -1,3 +0,0 @@ -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 -- cgit v1.2.3