summaryrefslogtreecommitdiff
path: root/durt
diff options
context:
space:
mode:
Diffstat (limited to 'durt')
-rw-r--r--durt/nodes/(-1373,10,-2507).lua6
-rw-r--r--durt/nodes/(-1433,11,-2563).lua25
-rw-r--r--durt/nodes/(-1442,11,-2568).lua17
-rw-r--r--durt/nodes/(-1444,11,-2546).lua24
-rw-r--r--durt/nodes/(-1446,11,-2568).lua7
-rw-r--r--durt/nodes/(-1457,11,-2573).lua35
-rw-r--r--durt/nodes/(-1468,11,-2561).lua5
-rw-r--r--durt/nodes/(-1515,7,-2621).lua5
-rw-r--r--durt/nodes/(-1515,7,-2625).lua22
-rw-r--r--durt/nodes/(-2120,21,869).lua5
-rw-r--r--durt/nodes/(-2141,21,865).lua3
-rw-r--r--durt/nodes/(-4129,13,-5726).lua1
-rw-r--r--durt/nodes/(-4224,18,-5973).lua11
-rw-r--r--durt/nodes/(-4224,18,-5985).lua41
-rw-r--r--durt/nodes/(-4227,18,-5926).lua41
-rw-r--r--durt/nodes/(-4227,18,-5936).lua7
-rw-r--r--durt/nodes/(1906,7,9136).lua2
-rw-r--r--durt/nodes/(1907,0,9142).lua5
-rw-r--r--durt/nodes/(1907,8,9129).lua3
-rw-r--r--durt/nodes/(1949,7,9112).lua2
20 files changed, 257 insertions, 10 deletions
diff --git a/durt/nodes/(-1373,10,-2507).lua b/durt/nodes/(-1373,10,-2507).lua
index 7489acc..450ca4a 100644
--- a/durt/nodes/(-1373,10,-2507).lua
+++ b/durt/nodes/(-1373,10,-2507).lua
@@ -1 +1,5 @@
--- \ No newline at end of file
+if atc_arrow and F.has_rc("S27_EXP_EXIT") then
+ F.remove_rc("S27_EXP_EXIT")
+ atc_send("D10SM")
+ return
+end \ No newline at end of file
diff --git a/durt/nodes/(-1433,11,-2563).lua b/durt/nodes/(-1433,11,-2563).lua
new file mode 100644
index 0000000..7ac821e
--- /dev/null
+++ b/durt/nodes/(-1433,11,-2563).lua
@@ -0,0 +1,25 @@
+__approach_callback_mode = 1
+
+if event.approach and not event.has_entered then
+ atc_set_ars_disable(true)
+ atc_set_lzb_tsr(1)
+ return
+end
+
+if event.train and atc_arrow then
+ if not F.has_rc("S27_EXP_WAIT") then
+ atc_set_ars_disable(false)
+ return
+ end
+ atc_send("S0")
+ return
+end
+
+if event.ext_int and atc_id then
+ F.remove_rc("S27_REV_West S27_EXP_WAIT")
+ F.add_rc("S27_REV_East S27_EXP_DEPART")
+ atc_send("S3")
+ atc_set_ars_disable(false)
+ set_autocouple()
+ return
+end \ No newline at end of file
diff --git a/durt/nodes/(-1442,11,-2568).lua b/durt/nodes/(-1442,11,-2568).lua
new file mode 100644
index 0000000..6888f6b
--- /dev/null
+++ b/durt/nodes/(-1442,11,-2568).lua
@@ -0,0 +1,17 @@
+local ind = POS(-1444,10,-2546)
+if event.train and atc_arrow then
+ if not F.has_rc("S27_SHUNTER") then
+ step_fc()
+ split_off_locomotive("BBA0")
+ F.add_rc("S27_REV_West S27_EXP_WAIT S27_EXP_COLLECT")
+ F.indicator(ind,true)
+ return
+ end
+ unset_autocouple()
+ atc_send("A0BB")
+ if train_length() > 2 then -- if length > 2 it would try to discouple the nose
+ split_at_index(train_length()-1,"BBWRD2S3A1")
+ return
+ end
+ atc_send("BBWRD2S3A1")
+end \ No newline at end of file
diff --git a/durt/nodes/(-1444,11,-2546).lua b/durt/nodes/(-1444,11,-2546).lua
new file mode 100644
index 0000000..235e7d3
--- /dev/null
+++ b/durt/nodes/(-1444,11,-2546).lua
@@ -0,0 +1,24 @@
+local ind = POS(-1444,10,-2546)
+local function send_train()
+ set_rc("S27_SHUNTER S27_REV_East S27")
+ atc_send("S0WRD2A1S4")
+ F.indicator(ind,false)
+end
+if event.ext_int then
+ if F.indicator(ind) then return end
+ if atc_id then
+ send_train()
+ return
+ else
+ F.indicator(ind,true)
+ return
+ end
+end
+if event.train then
+ if F.indicator(ind) then
+ send_train()
+ return
+ end
+ atc_send("B0")
+ return
+end \ No newline at end of file
diff --git a/durt/nodes/(-1446,11,-2568).lua b/durt/nodes/(-1446,11,-2568).lua
new file mode 100644
index 0000000..bca38cc
--- /dev/null
+++ b/durt/nodes/(-1446,11,-2568).lua
@@ -0,0 +1,7 @@
+if event.train and atc_arrow then
+ if not F.has_rc("S27_SHUNTER") then return end
+ atc_reset()
+ atc_set_ars_disable(true)
+ atc_send("BB")
+ split_at_index(train_length(),"S0WRD1S3A1")
+end \ No newline at end of file
diff --git a/durt/nodes/(-1457,11,-2573).lua b/durt/nodes/(-1457,11,-2573).lua
index 7489acc..8f984b2 100644
--- a/durt/nodes/(-1457,11,-2573).lua
+++ b/durt/nodes/(-1457,11,-2573).lua
@@ -1 +1,34 @@
--- \ No newline at end of file
+local rev_rc = "S27_REV_West"
+local rm_rc = false
+
+
+__approach_callback_mode = 1
+
+if event.approach and not event.has_entered then
+ atc_set_lzb_tsr(1)
+ atc_set_ars_disable(true)
+ return
+end
+
+if event.train and atc_arrow then
+ if not F.has_rc(rev_rc) then
+ 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/(-1468,11,-2561).lua b/durt/nodes/(-1468,11,-2561).lua
new file mode 100644
index 0000000..df410b9
--- /dev/null
+++ b/durt/nodes/(-1468,11,-2561).lua
@@ -0,0 +1,5 @@
+if event.train and atc_arrow then
+ F.remove_rc({"S27_slag_shed"})
+ F.add_rc({"S27_main_yard"})
+ atc_send("A0S0WRD50S3A1")
+end
diff --git a/durt/nodes/(-1515,7,-2621).lua b/durt/nodes/(-1515,7,-2621).lua
new file mode 100644
index 0000000..0abb68d
--- /dev/null
+++ b/durt/nodes/(-1515,7,-2621).lua
@@ -0,0 +1,5 @@
+if event.train and atc_arrow then
+ F.remove_rc({"S27_main_yard"})
+ F.add_rc({"S27_slag_shed"})
+ atc_send("A0S0WRD100S3A1")
+end
diff --git a/durt/nodes/(-1515,7,-2625).lua b/durt/nodes/(-1515,7,-2625).lua
index c12db21..2fd2155 100644
--- a/durt/nodes/(-1515,7,-2625).lua
+++ b/durt/nodes/(-1515,7,-2625).lua
@@ -1,17 +1,29 @@
+local notification_id = "S27"
local ind = POS(-1513,8,-2613)
+local print_notification = true
local function send_train()
- set_rc("FREIGHT S23 TanhX_NBS23toE3 BYARD BY_COLLECT_S27 MGGRatHYARD S27 S27_UNLOAD S27_Overburden BY_RTS S27_EXIT")
+ set_rc("FREIGHT S23 ARCAUTO ARC_RTS ARC_COLLECT_S27 ARC_AUTO_S23S TanhX_SBS23toE3 MGGRatHYARD S27 S27_UNLOAD S27_Overburden S27_EXIT")
atc_send("S0WRD2A1S4")
- set_route(POS(-1504,8,-2622),"Through to Lead")
F.indicator(ind,false)
end
-if event.ext_int and atc_id then
- send_train()
+if event.ext_int then
+ if event.message == "notify" then
+ if print_notification then print(rwt.to_string(rwt.now()) .. " "..notification_id.." RX Notification") end
+ if F.indicator(ind) then return end
+ if atc_id then
+ send_train()
+ return
+ else
+ F.indicator(ind,true)
+ return
+ end
+ end
end
-
if event.train then
if F.indicator(ind) then
send_train()
+ return
end
+ atc_send("B0")
return
end \ No newline at end of file
diff --git a/durt/nodes/(-2120,21,869).lua b/durt/nodes/(-2120,21,869).lua
new file mode 100644
index 0000000..b9831ee
--- /dev/null
+++ b/durt/nodes/(-2120,21,869).lua
@@ -0,0 +1,5 @@
+--
+if event.train and atc_arrow and get_line() == "S20" then
+ local current_text = atc_get_text_outside() or ""
+ atc_set_text_outside("Service Ends At Arcadius\n No Access to Trap City\n \n"..current_text)
+end \ No newline at end of file
diff --git a/durt/nodes/(-2141,21,865).lua b/durt/nodes/(-2141,21,865).lua
new file mode 100644
index 0000000..2750c52
--- /dev/null
+++ b/durt/nodes/(-2141,21,865).lua
@@ -0,0 +1,3 @@
+if event.train and atc_arrow and get_line() == "S20" then
+ atc_set_text_outside("S20 - Euler Street <-> Trap City")
+end \ No newline at end of file
diff --git a/durt/nodes/(-4129,13,-5726).lua b/durt/nodes/(-4129,13,-5726).lua
index d5aa4b1..2f179db 100644
--- a/durt/nodes/(-4129,13,-5726).lua
+++ b/durt/nodes/(-4129,13,-5726).lua
@@ -13,7 +13,6 @@ if event.train then
atc_send("CplD1S2")
return
end
- atc_send("B4")
end
end
diff --git a/durt/nodes/(-4224,18,-5973).lua b/durt/nodes/(-4224,18,-5973).lua
new file mode 100644
index 0000000..8f6490a
--- /dev/null
+++ b/durt/nodes/(-4224,18,-5973).lua
@@ -0,0 +1,11 @@
+if not F.has_rc("CORN_SHUNT") then return end
+if not F.has_rc("CORN_rejoin") then
+ F.add_rc("CORN_rejoin")
+ split_off_locomotive("S0A0")
+ F.add_rc("CORN_HS_S CORN_AROUND CORN_HS_N")
+ return
+else
+ F.remove_rc("CORN_rejoin")
+ F.add_rc("CORN_HS_S")
+ unset_autocouple()
+end \ No newline at end of file
diff --git a/durt/nodes/(-4224,18,-5985).lua b/durt/nodes/(-4224,18,-5985).lua
new file mode 100644
index 0000000..aacd93f
--- /dev/null
+++ b/durt/nodes/(-4224,18,-5985).lua
@@ -0,0 +1,41 @@
+local rev_rc = "CORN_HS_S"
+local rm_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 atc_arrow then
+ if not F.has_rc(rev_rc) then
+ atc_set_ars_disable(false)
+ return
+ end
+ if rm_rc then F.remove_rc(rev_rc) end
+ schedule_in(";01",atc_id)
+ return
+ else
+ if not F.has_rc("CORN_rejoin") then
+ F.add_rc("CORN_EXIT")
+ end
+ return
+ end
+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/(-4227,18,-5926).lua b/durt/nodes/(-4227,18,-5926).lua
new file mode 100644
index 0000000..b640ec9
--- /dev/null
+++ b/durt/nodes/(-4227,18,-5926).lua
@@ -0,0 +1,41 @@
+local rev_rc = "CORN_HS_N"
+local rm_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 atc_arrow then
+ if not F.has_rc(rev_rc) then
+ atc_set_ars_disable(false)
+ return
+ end
+ if rm_rc then F.remove_rc(rev_rc) end
+ schedule_in(";01",atc_id)
+ return
+ else
+ if F.has_rc("CORN_rejoin") then
+ set_autocouple()
+ end
+ return
+ end
+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/(-4227,18,-5936).lua b/durt/nodes/(-4227,18,-5936).lua
new file mode 100644
index 0000000..b11f8a1
--- /dev/null
+++ b/durt/nodes/(-4227,18,-5936).lua
@@ -0,0 +1,7 @@
+if not F.has_rc("CORN_SHUNT") then return end
+if not atc_arrow then return end
+if F.has_rc("CORN_EXIT") then
+ F.remove_rc("CORN_EXIT CORN_AROUND")
+ atc_send("D10SM")
+ return
+end \ No newline at end of file
diff --git a/durt/nodes/(1906,7,9136).lua b/durt/nodes/(1906,7,9136).lua
index 03ae1a0..f83e4fc 100644
--- a/durt/nodes/(1906,7,9136).lua
+++ b/durt/nodes/(1906,7,9136).lua
@@ -16,7 +16,7 @@ if event.approach and not event.has_entered then
end
if event.train and atc_arrow then
- digiline_send("mine_counter_lcd",S.yards.WOA.mine_counter)
+ digiline_send("mine_counter_lcd",S.yards.WOA.mine_count)
if F.has_rc("WOA_mine_around") then
if F.has_rc("WOA_around_active") then
F.remove_rc(around_rc_list)
diff --git a/durt/nodes/(1907,0,9142).lua b/durt/nodes/(1907,0,9142).lua
new file mode 100644
index 0000000..0a2edad
--- /dev/null
+++ b/durt/nodes/(1907,0,9142).lua
@@ -0,0 +1,5 @@
+if event.channel=="auth" then
+ S.yards.WOA.mine_count = 0
+ print("WOA Mine: reset counter")
+ digiline_send("train_ctl","send")
+end \ No newline at end of file
diff --git a/durt/nodes/(1907,8,9129).lua b/durt/nodes/(1907,8,9129).lua
new file mode 100644
index 0000000..b18ad84
--- /dev/null
+++ b/durt/nodes/(1907,8,9129).lua
@@ -0,0 +1,3 @@
+if event.punch then
+ digiline_send("mine_counter_lcd",tostring(S.yards.WOA.mine_count))
+end \ No newline at end of file
diff --git a/durt/nodes/(1949,7,9112).lua b/durt/nodes/(1949,7,9112).lua
index 8fd61c9..164a253 100644
--- a/durt/nodes/(1949,7,9112).lua
+++ b/durt/nodes/(1949,7,9112).lua
@@ -14,7 +14,7 @@ if event.train and atc_arrow then
end
if (event.ext_int and event.message == "notify") or (event.schedule and event.message == "send") or (event.channel=="train_ctl" and event.msg=="send") then
- print("WOA RX Notification")
+ print(rwt.to_string(rwt.now()) .. " WOA RX Notification")
if not atc_id then
F.indicator(ind,true)
return