diff options
Diffstat (limited to 'durt/nodes')
-rw-r--r-- | durt/nodes/(-1373,10,-2507).lua | 3 | ||||
-rw-r--r-- | durt/nodes/(-1419,11,-2545).lua | 5 | ||||
-rw-r--r-- | durt/nodes/(-1426,11,-2548).lua | 2 | ||||
-rw-r--r-- | durt/nodes/(-1439,11,-2551).lua | 7 | ||||
-rw-r--r-- | durt/nodes/(-1442,11,-2568).lua | 4 | ||||
-rw-r--r-- | durt/nodes/(-1444,11,-2546).lua | 8 | ||||
-rw-r--r-- | durt/nodes/(-1444,11,-2556).lua | 7 | ||||
-rw-r--r-- | durt/nodes/(-572,27,2515).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-743,18,2424).lua | 45 |
9 files changed, 72 insertions, 10 deletions
diff --git a/durt/nodes/(-1373,10,-2507).lua b/durt/nodes/(-1373,10,-2507).lua index b811ea0..b48996c 100644 --- a/durt/nodes/(-1373,10,-2507).lua +++ b/durt/nodes/(-1373,10,-2507).lua @@ -1,7 +1,8 @@ if atc_arrow and F.has_rc("S27_EXP_EXIT_N") then F.remove_rc({ "S27_EXP_EXIT_N", - "S27_EXPORT_FINAL" + "S27_EXPORT_FINAL", + "S27_EXPORT_ACTIVE" }) step_fc() atc_send("D10SM") diff --git a/durt/nodes/(-1419,11,-2545).lua b/durt/nodes/(-1419,11,-2545).lua index 7926f0b..36c4310 100644 --- a/durt/nodes/(-1419,11,-2545).lua +++ b/durt/nodes/(-1419,11,-2545).lua @@ -6,11 +6,12 @@ if not atc_arrow then -- loco has rejoined from headshunt return end -local fc = split_at_fc("A0B0",1) or "DEPART" --should be either SAND_RAMP or DIRT_LOAD. anything else goes to departures +local fc = split_at_fc("A0B0",2) or "DEPART" --should be either SAND_RAMP or DIRT_LOAD. anything else goes to departures F.add_rc({ "S27_EXP_HS_N", "S27_EXP_DIR_"..fc }) if fc == "DEPART" then F.add_rc("S27_EXP_HS_N_AC") -end
\ No newline at end of file +end +atc_send("S3")
\ No newline at end of file diff --git a/durt/nodes/(-1426,11,-2548).lua b/durt/nodes/(-1426,11,-2548).lua index a8de413..127133d 100644 --- a/durt/nodes/(-1426,11,-2548).lua +++ b/durt/nodes/(-1426,11,-2548).lua @@ -6,7 +6,7 @@ if not atc_arrow then end if not F.has_rc("S27_EXPORT_FINAL") then --still more train to shuffle - split_off_locomotive("A0B0",1) + split_off_locomotive("A0B0",2) F.add_rc({ "S27_EXP_HS_N", "S27_EXP_HS_N_AC", diff --git a/durt/nodes/(-1439,11,-2551).lua b/durt/nodes/(-1439,11,-2551).lua index fd68288..14b91b4 100644 --- a/durt/nodes/(-1439,11,-2551).lua +++ b/durt/nodes/(-1439,11,-2551).lua @@ -2,7 +2,8 @@ if not F.has_rc("S27_SHUNTER") or not F.has_rc("S27_EXPORT_ACTIVE") then return end if atc_arrow then F.remove_rc_match("S27_EXP_DIR_%S+") - local fc = split_at_fc("A0B0",1) or "DEPART" --should be either DIRT_LOAD or DEPART. anything else goes to departures by default + step_fc() + local fc = split_at_fc("A0B0",2) or "DEPART" --should be either DIRT_LOAD or DEPART. anything else goes to departures by default F.add_rc({ "S27_EXP_HS_N", "S27_EXP_DIR_"..fc @@ -11,4 +12,6 @@ if atc_arrow then F.add_rc("S27_EXP_HS_N_AC") end atc_send("A1S3") -end
\ No newline at end of file + return +end +atc_send("S1")
\ No newline at end of file diff --git a/durt/nodes/(-1442,11,-2568).lua b/durt/nodes/(-1442,11,-2568).lua index 8a09604..5346db1 100644 --- a/durt/nodes/(-1442,11,-2568).lua +++ b/durt/nodes/(-1442,11,-2568).lua @@ -15,9 +15,11 @@ if not F.has_rc("S27_EXPORT_ACTIVE") then --train has just arrived. run around "S27_EXPORT_ACTIVE", "S27_EXP_HS_S", "S27_EXP_AROUND", + "S27_EXP_HS_N", + "S27_EXP_HS_N_AC", "S27_EXP_DIR_ARRIVALS" }) return end -F.remove("S27_EXP_AROUND") +F.remove_rc("S27_EXP_AROUND") atc_send("S0WD3RS1") --bounce the train
\ No newline at end of file diff --git a/durt/nodes/(-1444,11,-2546).lua b/durt/nodes/(-1444,11,-2546).lua index e0bf68f..aeef76b 100644 --- a/durt/nodes/(-1444,11,-2546).lua +++ b/durt/nodes/(-1444,11,-2546).lua @@ -3,15 +3,21 @@ local function send_train() local rc = { "FREIGHT", "S27_SHUNTER", + "S27_EXP_EXIT_N", "S27_EXP", + "S23", "ARC_AUTO", - "ARC_COLLECT_S27_EXPORT" + "ARC_COLLECT_S27_EXPORT", + "ARC_AUTO_S23S", + "MGGR" } set_rc(table.concat(rc," ")) atc_send("S0WRD2A1S4") + print(rwt.to_string(rwt.now()).." S27_EXPORT Send Train") F.indicator(ind,false) end if event.ext_int then + print(rwt.to_string(rwt.now()).." S27_EXPORT RX Notification") if F.indicator(ind) then return end if atc_id then send_train() diff --git a/durt/nodes/(-1444,11,-2556).lua b/durt/nodes/(-1444,11,-2556).lua index fd68288..14b91b4 100644 --- a/durt/nodes/(-1444,11,-2556).lua +++ b/durt/nodes/(-1444,11,-2556).lua @@ -2,7 +2,8 @@ if not F.has_rc("S27_SHUNTER") or not F.has_rc("S27_EXPORT_ACTIVE") then return end if atc_arrow then F.remove_rc_match("S27_EXP_DIR_%S+") - local fc = split_at_fc("A0B0",1) or "DEPART" --should be either DIRT_LOAD or DEPART. anything else goes to departures by default + step_fc() + local fc = split_at_fc("A0B0",2) or "DEPART" --should be either DIRT_LOAD or DEPART. anything else goes to departures by default F.add_rc({ "S27_EXP_HS_N", "S27_EXP_DIR_"..fc @@ -11,4 +12,6 @@ if atc_arrow then F.add_rc("S27_EXP_HS_N_AC") end atc_send("A1S3") -end
\ No newline at end of file + return +end +atc_send("S1")
\ No newline at end of file diff --git a/durt/nodes/(-572,27,2515).lua b/durt/nodes/(-572,27,2515).lua new file mode 100644 index 0000000..0f76f28 --- /dev/null +++ b/durt/nodes/(-572,27,2515).lua @@ -0,0 +1 @@ +interrupt_pos(POS(-630,26,2454), "notify")
\ No newline at end of file diff --git a/durt/nodes/(-743,18,2424).lua b/durt/nodes/(-743,18,2424).lua new file mode 100644 index 0000000..d922a42 --- /dev/null +++ b/durt/nodes/(-743,18,2424).lua @@ -0,0 +1,45 @@ +-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt +local rev_rc = "CAN_REENTER_YARD" +local rm_rc = true +-- local autocouple = "ARC_LOAD_HS_N_AC" +-- local rm_cpl_rc = true + +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + if not F.has_rc("CAN_REENTER_YARD") then return end + 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 |