summaryrefslogtreecommitdiff
path: root/durt
diff options
context:
space:
mode:
Diffstat (limited to 'durt')
-rw-r--r--durt/nodes/(-1419,11,-2545).lua12
-rw-r--r--durt/nodes/(-1426,11,-2548).lua0
-rw-r--r--durt/nodes/(-1433,11,-2563).lua26
-rw-r--r--durt/nodes/(-1442,11,-2568).lua30
-rw-r--r--durt/nodes/(-1446,11,-2568).lua7
-rw-r--r--durt/nodes/(-1457,11,-2573).lua22
-rw-r--r--durt/nodes/(-1468,15,-2551).lua0
7 files changed, 48 insertions, 49 deletions
diff --git a/durt/nodes/(-1419,11,-2545).lua b/durt/nodes/(-1419,11,-2545).lua
new file mode 100644
index 0000000..c17e7b9
--- /dev/null
+++ b/durt/nodes/(-1419,11,-2545).lua
@@ -0,0 +1,12 @@
+-- S27 Export Arrivals Splitter
+if event.train and atc_arrow then
+ if not F.has_rc("S27_EXPORT_ACTIVE") then return end
+ local fc = split_at_fc("A0B0",1) or "DEPART"
+ F.add_rc({
+ "S27_EXP_HS_N",
+ "S27_"..fc
+ })
+ if fc == "DEPART" then
+ F.add_rc("S27_EXP_HS_N_AC")
+ end
+end \ No newline at end of file
diff --git a/durt/nodes/(-1426,11,-2548).lua b/durt/nodes/(-1426,11,-2548).lua
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/durt/nodes/(-1426,11,-2548).lua
diff --git a/durt/nodes/(-1433,11,-2563).lua b/durt/nodes/(-1433,11,-2563).lua
index 7ac821e..9bccb9e 100644
--- a/durt/nodes/(-1433,11,-2563).lua
+++ b/durt/nodes/(-1433,11,-2563).lua
@@ -1,25 +1 @@
-__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
+F.remove_rc("S27_EXP_AROUND") \ No newline at end of file
diff --git a/durt/nodes/(-1442,11,-2568).lua b/durt/nodes/(-1442,11,-2568).lua
index 6888f6b..6b7502e 100644
--- a/durt/nodes/(-1442,11,-2568).lua
+++ b/durt/nodes/(-1442,11,-2568).lua
@@ -1,17 +1,25 @@
-local ind = POS(-1444,10,-2546)
+--S27 Export Arrivals
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)
+ if not F.has_rc("S27_SHUNTER") then return end
+ if train_length() == 1 then
+ F.add_rc({
+ "S27_LOCOSTORE",
+ "S27_EXP_HS_N",
+ "S27_EXP_AROUND",
+ "S27_EXP_HS_S"
+ })
+ atc_send("S0WD3RS3")
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")
+ if not F.has_rc("S27_EXPORT_ACTIVE") then
+ split_off_locomotive("A0B0",1)
+ F.add_rc({
+ "S27_EXPORT_ACTIVE",
+ "S27_EXP_HS_S",
+ "S27_EXP_AROUND",
+ })
return
end
- atc_send("BBWRD2S3A1")
+ atc_send("S0WD3RS1")
+ return
end \ No newline at end of file
diff --git a/durt/nodes/(-1446,11,-2568).lua b/durt/nodes/(-1446,11,-2568).lua
index bca38cc..e69de29 100644
--- a/durt/nodes/(-1446,11,-2568).lua
+++ b/durt/nodes/(-1446,11,-2568).lua
@@ -1,7 +0,0 @@
-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 8f984b2..cb9eb3c 100644
--- a/durt/nodes/(-1457,11,-2573).lua
+++ b/durt/nodes/(-1457,11,-2573).lua
@@ -1,17 +1,27 @@
-local rev_rc = "S27_REV_West"
-local rm_rc = false
-
+-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt
+local rev_rc = "S27_EXP_HS_S"
+local rm_rc = true
+local autocouple = "S27_EXP_HS_S_AC"
+local rm_cpl_rc = true
__approach_callback_mode = 1
if event.approach and not event.has_entered then
- atc_set_lzb_tsr(1)
+ atc_set_lzb_tsr(3)
atc_set_ars_disable(true)
return
end
-if event.train and atc_arrow then
- if not F.has_rc(rev_rc) then
+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
diff --git a/durt/nodes/(-1468,15,-2551).lua b/durt/nodes/(-1468,15,-2551).lua
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/durt/nodes/(-1468,15,-2551).lua