summaryrefslogtreecommitdiff
path: root/durt/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'durt/nodes')
-rw-r--r--durt/nodes/(-2077,3,788).lua24
-rw-r--r--durt/nodes/(-2077,3,821).lua26
-rw-r--r--durt/nodes/(-2080,19,731).lua32
-rw-r--r--durt/nodes/(-2080,3,787).lua37
-rw-r--r--durt/nodes/(-2080,3,822).lua49
-rw-r--r--durt/nodes/(-2080,3,832).lua32
6 files changed, 171 insertions, 29 deletions
diff --git a/durt/nodes/(-2077,3,788).lua b/durt/nodes/(-2077,3,788).lua
index 26580c1..669248a 100644
--- a/durt/nodes/(-2077,3,788).lua
+++ b/durt/nodes/(-2077,3,788).lua
@@ -1,17 +1,25 @@
-__approach_callback_method == 1
+local dir_indicator = POS(-2079,7,803)
+local this_dir = false
+
+__approach_callback_mode = 2
if event.approach and not event.has_entered then
- if not F.has_rc("ARC_load_reverse") then return end
- atc_set_lzb_tsr(1)
+ atc_set_lzb_tsr(2)
atc_set_ars_disable(true)
return
end
if event.train then
- if atc_arrow then
- if F.has_rc("ARC_load_reverse") then
- atc_send("S0WRD1A1S3")
- F.add_rc("ARC_load_rejoin")
- return
+ if not atc_arrow then
+ if F.dir(dir_indicator) == this_dir then
+ atc_send("B1")
+ end -- no else, should never happen
+ else
+ if F.has_rc("ARC_LOAD_load") and (F.dir(dir_indicator) == not this_dir) then
+ F.remove_rc({"ARC_LOAD_load"})
+ F.add_rc("ARC_LOAD_rejoin")
+ atc_send("B0WRD1S2")
+ else
+ atc_send("A1S2")
end
end
end \ No newline at end of file
diff --git a/durt/nodes/(-2077,3,821).lua b/durt/nodes/(-2077,3,821).lua
index 7489acc..eceb40a 100644
--- a/durt/nodes/(-2077,3,821).lua
+++ b/durt/nodes/(-2077,3,821).lua
@@ -1 +1,25 @@
--- \ No newline at end of file
+local dir_indicator = POS(-2079,7,803)
+local this_dir = true
+
+__approach_callback_mode = 2
+if event.approach and not event.has_entered then
+ atc_set_lzb_tsr(2)
+ atc_set_ars_disable(true)
+ return
+end
+
+if event.train then
+ if not atc_arrow then
+ if F.dir(dir_indicator) == this_dir then
+ atc_send("B1")
+ end -- no else, should never happen
+ else
+ if F.has_rc("ARC_LOAD_load") and (F.dir(dir_indicator) == not this_dir) then
+ F.remove_rc({"ARC_LOAD_load"})
+ F.add_rc("ARC_LOAD_rejoin")
+ atc_send("B0WRD1S2")
+ else
+ atc_send("A1S2")
+ end
+ end
+end \ No newline at end of file
diff --git a/durt/nodes/(-2080,19,731).lua b/durt/nodes/(-2080,19,731).lua
new file mode 100644
index 0000000..440ca17
--- /dev/null
+++ b/durt/nodes/(-2080,19,731).lua
@@ -0,0 +1,32 @@
+local dir_indicator = POS(-2079,7,803)
+local this_dir = false
+
+if event.schedule then
+ if not atc_id then
+ atc_send_to_train(event.msg,"B0WRD1S1")
+ return
+ end
+ if event.msg == atc_id then
+ schedule_in(";01",atc_id)
+ return
+ else
+ atc_send("BB")
+ atc_send_to_train("BB")
+ return
+ end
+ return
+end
+
+if event.train and atc_arrow then
+ if F.has_rc("ARC_LOAD_reverse") and F.dir(dir_indicator) == this_dir then
+ set_autocouple()
+ schedule_in(";01",atc_id)
+ return
+ end
+ if F.has_rc("ARC_LOAD_exit") then
+ F.remove_rc({"ARC_LOAD_exit"})
+ atc_send("D5SM")
+ return
+ end
+end
+
diff --git a/durt/nodes/(-2080,3,787).lua b/durt/nodes/(-2080,3,787).lua
index 7489acc..79ffde6 100644
--- a/durt/nodes/(-2080,3,787).lua
+++ b/durt/nodes/(-2080,3,787).lua
@@ -1 +1,36 @@
--- \ No newline at end of file
+local dir_indicator = POS(-2079,7,803)
+local this_dir = false
+
+__approach_callback_mode = 2
+if event.approach and not event.has_entered then
+ atc_set_lzb_tsr(2)
+ atc_set_ars_disable(true)
+ return
+end
+
+if event.train then
+ if not F.has_rc("ARC_LOAD") then
+ atc_set_ars_disable(false)
+ return
+ end
+ if F.has_rc("ARC_LOAD_exit") then
+ atc_set_ars_disable(false)
+ return
+ end
+ if not atc_arrow then
+ atc_send("S2")
+ return
+ end
+
+ if not F.has_rc("ARC_LOAD_rejoin") then
+ split_at_fc("B0")
+ F.add_rc("ARC_LOAD_reverse ARC_LOAD_load")
+ atc_send("A1S2")
+ F.dir(dir_indicator,this_dir)
+ else
+ unset_autocouple()
+ F.remove_rc({"ARC_LOAD_reverse","ARC_LOAD_rejoin"})
+ F.add_rc("ARC_LOAD_exit")
+ atc_send("B0WRD1S6A1")
+ end
+end \ No newline at end of file
diff --git a/durt/nodes/(-2080,3,822).lua b/durt/nodes/(-2080,3,822).lua
index 202a5d7..b068713 100644
--- a/durt/nodes/(-2080,3,822).lua
+++ b/durt/nodes/(-2080,3,822).lua
@@ -1,25 +1,36 @@
-__approach_callback_method = 2
+local dir_indicator = POS(-2079,7,803)
+local this_dir = true
+
+__approach_callback_mode = 2
if event.approach and not event.has_entered then
- if atc_arrow then
- atc_set_lzb_tsr(1)
- else
- atc_set_lzb_tsr(2)
- end
+ atc_set_lzb_tsr(2)
+ atc_set_ars_disable(true)
+ return
end
if event.train then
- if atc_arrow then
- if F.has_rc("ARC_load") then
- if F.has_rc("ARC_load_rejoin") then
- F.remove_rc({"Arc_load_reverse","ARC_load_rejoin"})
- atc_send("SM")
- return
- else
- split_at_fc("S0",5)
- F.add_rc({"ARC_load_reverse"})
- atc_send("S2")
- return
- end
- end
+ if not F.has_rc("ARC_LOAD") then
+ atc_set_ars_disable(false)
+ return
+ end
+ if F.has_rc("ARC_LOAD_exit") then
+ atc_set_ars_disable(false)
+ return
+ end
+ if not atc_arrow then
+ atc_send("S2")
+ return
+ end
+
+ if not F.has_rc("ARC_LOAD_rejoin") then
+ split_at_fc("B0")
+ F.add_rc("ARC_LOAD_reverse ARC_LOAD_load")
+ atc_send("A1S2")
+ F.dir(dir_indicator,this_dir)
+ else
+ unset_autocouple()
+ F.remove_rc({"ARC_LOAD_reverse","ARC_LOAD_rejoin"})
+ F.add_rc("ARC_LOAD_exit")
+ atc_send("B0WRD1S6A1")
end
end \ No newline at end of file
diff --git a/durt/nodes/(-2080,3,832).lua b/durt/nodes/(-2080,3,832).lua
new file mode 100644
index 0000000..9a71d83
--- /dev/null
+++ b/durt/nodes/(-2080,3,832).lua
@@ -0,0 +1,32 @@
+local dir_indicator = POS(-2079,7,803)
+local this_dir = true
+
+if event.schedule then
+ if not atc_id then
+ atc_send_to_train(event.msg,"B0WRD1S1")
+ return
+ end
+ if event.msg == atc_id then
+ schedule_in(";01",atc_id)
+ return
+ else
+ atc_send("BB")
+ atc_send_to_train("BB")
+ return
+ end
+ return
+end
+
+if event.train and atc_arrow then
+ if F.has_rc("ARC_LOAD_reverse") and F.dir(dir_indicator) == this_dir then
+ set_autocouple()
+ schedule_in(";01",atc_id)
+ return
+ end
+ if F.has_rc("ARC_LOAD_exit") then
+ F.remove_rc({"ARC_LOAD_exit"})
+ atc_send("D5SM")
+ return
+ end
+end
+