summaryrefslogtreecommitdiff
path: root/Hyard
diff options
context:
space:
mode:
Diffstat (limited to 'Hyard')
-rw-r--r--Hyard/init_code.lua1
-rw-r--r--Hyard/nodes/(-2585,7,-1632).lua2
-rw-r--r--Hyard/nodes/(-2594,12,-1721).lua28
-rw-r--r--Hyard/nodes/(-2594,12,-1780).lua28
-rw-r--r--Hyard/nodes/(-2594,12,-1784).lua3
-rw-r--r--Hyard/nodes/(-2594,12,-1802).lua9
-rw-r--r--Hyard/nodes/(-2595,12,-1837).lua2
-rw-r--r--Hyard/nodes/(-2596,12,-1721).lua17
-rw-r--r--Hyard/nodes/(-2596,12,-1780).lua14
-rw-r--r--Hyard/nodes/(-2596,12,-1784).lua3
-rw-r--r--Hyard/nodes/(-2596,12,-1830).lua15
-rw-r--r--Hyard/nodes/(-2597,12,-1708).lua4
-rw-r--r--Hyard/nodes/(-2598,12,-1708).lua4
-rw-r--r--Hyard/nodes/(-2598,12,-1721).lua17
-rw-r--r--Hyard/nodes/(-2598,12,-1780).lua14
-rw-r--r--Hyard/nodes/(-2598,12,-1784).lua3
-rw-r--r--Hyard/nodes/(-2600,12,-1708).lua4
-rw-r--r--Hyard/nodes/(-2600,12,-1721).lua17
-rw-r--r--Hyard/nodes/(-2600,12,-1780).lua14
-rw-r--r--Hyard/nodes/(-2600,12,-1784).lua3
-rw-r--r--Hyard/nodes/(-2602,12,-1708).lua4
-rw-r--r--Hyard/nodes/(-2602,12,-1721).lua17
-rw-r--r--Hyard/nodes/(-2602,12,-1780).lua14
-rw-r--r--Hyard/nodes/(-2602,12,-1784).lua3
-rw-r--r--Hyard/nodes/(-2603,12,-1784).lua3
-rw-r--r--Hyard/nodes/(-2603,9,-1659).lua9
-rw-r--r--Hyard/nodes/(-2604,12,-1708).lua4
-rw-r--r--Hyard/nodes/(-2604,12,-1721).lua17
-rw-r--r--Hyard/nodes/(-2604,12,-1780).lua14
-rw-r--r--Hyard/nodes/(-2609,13,-1724).lua1
-rw-r--r--Hyard/nodes/(-2642,10,-1700).lua8
31 files changed, 296 insertions, 0 deletions
diff --git a/Hyard/init_code.lua b/Hyard/init_code.lua
new file mode 100644
index 0000000..e8e6d28
--- /dev/null
+++ b/Hyard/init_code.lua
@@ -0,0 +1 @@
+S.dir = 2
diff --git a/Hyard/nodes/(-2585,7,-1632).lua b/Hyard/nodes/(-2585,7,-1632).lua
new file mode 100644
index 0000000..0512e1d
--- /dev/null
+++ b/Hyard/nodes/(-2585,7,-1632).lua
@@ -0,0 +1,2 @@
+set_rc(S.rc)
+S.rc = nil \ No newline at end of file
diff --git a/Hyard/nodes/(-2594,12,-1721).lua b/Hyard/nodes/(-2594,12,-1721).lua
new file mode 100644
index 0000000..952b979
--- /dev/null
+++ b/Hyard/nodes/(-2594,12,-1721).lua
@@ -0,0 +1,28 @@
+local dir = 2
+local lane = 6
+if S.dir == dir and atc_arrow then
+ set_route("HYE"..lane, "HEADSHUNT")
+ local plen = train_length()
+ local rc = split_at_fc("B0")
+ local trc = "HY"..rc..dir
+ S.cars = plen - train_length()
+ if plen == train_length() and (rc == "" or S.rc:match(trc)) and not (S.rc:match("HYREVERSE")) then
+ S.exiting = true
+ end
+ if rc and rc ~= "" then
+ set_rc("HY"..rc..dir)
+ else
+ set_rc(S.rc)
+ S.reversing = false
+ S.exiting = true
+ end
+elseif S.dir == 1 and atc_arrow then
+if S.rc:match("HYREVERSE") and S.cars == 0 then
+ set_route("HYE"..lane, "HEADSHUNT")
+S.reversing = true
+S.dir = 2
+end
+if not S.reversing then
+atc_send("B0WD1RS4")
+end
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2594,12,-1780).lua b/Hyard/nodes/(-2594,12,-1780).lua
new file mode 100644
index 0000000..7a257db
--- /dev/null
+++ b/Hyard/nodes/(-2594,12,-1780).lua
@@ -0,0 +1,28 @@
+
+local dir = 1
+local lane = 6
+if S.dir == dir and atc_arrow then
+ set_route("HYD"..lane, "HEADSHUNT1")
+ local plen = train_length()
+ local rc = split_at_fc("B0")
+ local trc = "HY"..rc..dir
+ S.cars = plen - train_length()
+ if plen == train_length() and (rc == "" or S.rc:match(trc)) and not (S.rc:match("HYREVERSE")) then
+ S.exiting = true
+ end
+ if rc and rc ~= "" then
+ set_rc("HY"..rc..dir)
+ else
+ set_rc(S.rc)
+ S.exiting = true
+ end
+elseif S.dir == 2 and atc_arrow then
+if S.rc:match("HYREVERSE") and S.cars == 0 then
+ set_route("HYD"..lane, "HEADSHUNT1")
+S.reversing = true
+S.dir = 1
+end
+if not S.reversing then
+atc_send("B0WD1RS4")
+end
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2594,12,-1784).lua b/Hyard/nodes/(-2594,12,-1784).lua
new file mode 100644
index 0000000..31d73ca
--- /dev/null
+++ b/Hyard/nodes/(-2594,12,-1784).lua
@@ -0,0 +1,3 @@
+if not atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2594,12,-1802).lua b/Hyard/nodes/(-2594,12,-1802).lua
new file mode 100644
index 0000000..cfca16e
--- /dev/null
+++ b/Hyard/nodes/(-2594,12,-1802).lua
@@ -0,0 +1,9 @@
+atc_send("B0")
+if S.rc then
+interrupt(10, "recheck")
+else
+atc_send("S4")
+S.dir = 2
+S.rc = get_rc()
+set_route("HYENTRY2", "PICKUP")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2595,12,-1837).lua b/Hyard/nodes/(-2595,12,-1837).lua
new file mode 100644
index 0000000..0512e1d
--- /dev/null
+++ b/Hyard/nodes/(-2595,12,-1837).lua
@@ -0,0 +1,2 @@
+set_rc(S.rc)
+S.rc = nil \ No newline at end of file
diff --git a/Hyard/nodes/(-2596,12,-1721).lua b/Hyard/nodes/(-2596,12,-1721).lua
new file mode 100644
index 0000000..cc285f9
--- /dev/null
+++ b/Hyard/nodes/(-2596,12,-1721).lua
@@ -0,0 +1,17 @@
+local dir = 2
+local lane = 5
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+set_route("HYE"..lane, "HEADSHUNT")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+ set_route("HYE"..lane, "EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2596,12,-1780).lua b/Hyard/nodes/(-2596,12,-1780).lua
new file mode 100644
index 0000000..aaf4293
--- /dev/null
+++ b/Hyard/nodes/(-2596,12,-1780).lua
@@ -0,0 +1,14 @@
+local dir = 1
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2596,12,-1784).lua b/Hyard/nodes/(-2596,12,-1784).lua
new file mode 100644
index 0000000..31d73ca
--- /dev/null
+++ b/Hyard/nodes/(-2596,12,-1784).lua
@@ -0,0 +1,3 @@
+if not atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2596,12,-1830).lua b/Hyard/nodes/(-2596,12,-1830).lua
new file mode 100644
index 0000000..0b5e1ac
--- /dev/null
+++ b/Hyard/nodes/(-2596,12,-1830).lua
@@ -0,0 +1,15 @@
+if S.reversing and atc_arrow then
+set_rc(S.rc)
+S.exiting = true
+S.reversing = false
+elseif atc_arrow and S.exiting and S.rc:match("HYREVERSE") then
+set_rc("PICKUP")
+S.dir = 2
+S.reversing = true
+elseif get_rc():match("EXIT") and not S.reversing then
+ if S.rc:match("HIP") then
+ set_route("HYEXIT1", "Hippodrome")
+ else
+ set_route("HYEXIT1", "Trisiston")
+end
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2597,12,-1708).lua b/Hyard/nodes/(-2597,12,-1708).lua
new file mode 100644
index 0000000..d87f3f9
--- /dev/null
+++ b/Hyard/nodes/(-2597,12,-1708).lua
@@ -0,0 +1,4 @@
+
+if atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2598,12,-1708).lua b/Hyard/nodes/(-2598,12,-1708).lua
new file mode 100644
index 0000000..d87f3f9
--- /dev/null
+++ b/Hyard/nodes/(-2598,12,-1708).lua
@@ -0,0 +1,4 @@
+
+if atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2598,12,-1721).lua b/Hyard/nodes/(-2598,12,-1721).lua
new file mode 100644
index 0000000..d19e777
--- /dev/null
+++ b/Hyard/nodes/(-2598,12,-1721).lua
@@ -0,0 +1,17 @@
+local dir = 2
+local lane = 4
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+set_route("HYE"..lane, "HEADSHUNT")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+ set_route("HYE"..lane, "EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2598,12,-1780).lua b/Hyard/nodes/(-2598,12,-1780).lua
new file mode 100644
index 0000000..aaf4293
--- /dev/null
+++ b/Hyard/nodes/(-2598,12,-1780).lua
@@ -0,0 +1,14 @@
+local dir = 1
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2598,12,-1784).lua b/Hyard/nodes/(-2598,12,-1784).lua
new file mode 100644
index 0000000..31d73ca
--- /dev/null
+++ b/Hyard/nodes/(-2598,12,-1784).lua
@@ -0,0 +1,3 @@
+if not atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2600,12,-1708).lua b/Hyard/nodes/(-2600,12,-1708).lua
new file mode 100644
index 0000000..d87f3f9
--- /dev/null
+++ b/Hyard/nodes/(-2600,12,-1708).lua
@@ -0,0 +1,4 @@
+
+if atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2600,12,-1721).lua b/Hyard/nodes/(-2600,12,-1721).lua
new file mode 100644
index 0000000..8766946
--- /dev/null
+++ b/Hyard/nodes/(-2600,12,-1721).lua
@@ -0,0 +1,17 @@
+local dir = 2
+local lane = 3
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+set_route("HYE"..lane, "HEADSHUNT")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+ set_route("HYE"..lane, "EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2600,12,-1780).lua b/Hyard/nodes/(-2600,12,-1780).lua
new file mode 100644
index 0000000..aaf4293
--- /dev/null
+++ b/Hyard/nodes/(-2600,12,-1780).lua
@@ -0,0 +1,14 @@
+local dir = 1
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2600,12,-1784).lua b/Hyard/nodes/(-2600,12,-1784).lua
new file mode 100644
index 0000000..31d73ca
--- /dev/null
+++ b/Hyard/nodes/(-2600,12,-1784).lua
@@ -0,0 +1,3 @@
+if not atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2602,12,-1708).lua b/Hyard/nodes/(-2602,12,-1708).lua
new file mode 100644
index 0000000..d87f3f9
--- /dev/null
+++ b/Hyard/nodes/(-2602,12,-1708).lua
@@ -0,0 +1,4 @@
+
+if atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2602,12,-1721).lua b/Hyard/nodes/(-2602,12,-1721).lua
new file mode 100644
index 0000000..3d3cb4e
--- /dev/null
+++ b/Hyard/nodes/(-2602,12,-1721).lua
@@ -0,0 +1,17 @@
+local dir = 2
+local lane = 2
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+set_route("HYE"..lane, "HEADSHUNT")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+ set_route("HYE"..lane, "EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2602,12,-1780).lua b/Hyard/nodes/(-2602,12,-1780).lua
new file mode 100644
index 0000000..aaf4293
--- /dev/null
+++ b/Hyard/nodes/(-2602,12,-1780).lua
@@ -0,0 +1,14 @@
+local dir = 1
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2602,12,-1784).lua b/Hyard/nodes/(-2602,12,-1784).lua
new file mode 100644
index 0000000..31d73ca
--- /dev/null
+++ b/Hyard/nodes/(-2602,12,-1784).lua
@@ -0,0 +1,3 @@
+if not atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2603,12,-1784).lua b/Hyard/nodes/(-2603,12,-1784).lua
new file mode 100644
index 0000000..31d73ca
--- /dev/null
+++ b/Hyard/nodes/(-2603,12,-1784).lua
@@ -0,0 +1,3 @@
+if not atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2603,9,-1659).lua b/Hyard/nodes/(-2603,9,-1659).lua
new file mode 100644
index 0000000..6ef94f8
--- /dev/null
+++ b/Hyard/nodes/(-2603,9,-1659).lua
@@ -0,0 +1,9 @@
+atc_send("B0")
+if S.rc then
+interrupt(10, "recheck")
+else
+atc_send("S4")
+S.dir = 1
+S.rc = get_rc()
+set_route("HYENTRY1", "PICKUP")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2604,12,-1708).lua b/Hyard/nodes/(-2604,12,-1708).lua
new file mode 100644
index 0000000..d87f3f9
--- /dev/null
+++ b/Hyard/nodes/(-2604,12,-1708).lua
@@ -0,0 +1,4 @@
+
+if atc_arrow then
+set_autocouple()
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2604,12,-1721).lua b/Hyard/nodes/(-2604,12,-1721).lua
new file mode 100644
index 0000000..1d2aaa9
--- /dev/null
+++ b/Hyard/nodes/(-2604,12,-1721).lua
@@ -0,0 +1,17 @@
+local dir = 2
+local lane = 1
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+set_route("HYE"..lane, "HEADSHUNT")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+ set_route("HYE"..lane, "EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2604,12,-1780).lua b/Hyard/nodes/(-2604,12,-1780).lua
new file mode 100644
index 0000000..aaf4293
--- /dev/null
+++ b/Hyard/nodes/(-2604,12,-1780).lua
@@ -0,0 +1,14 @@
+local dir = 1
+if S.dir == dir then
+if atc_arrow and not S.exiting then
+split_off_locomotive("B0")
+set_rc("PICKUP")
+end
+
+if atc_arrow and S.exiting then
+set_rc("EXIT")
+S.exiting = false
+end
+elseif atc_arrow then
+atc_send("B0WD1RS4")
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2609,13,-1724).lua b/Hyard/nodes/(-2609,13,-1724).lua
new file mode 100644
index 0000000..c4bad90
--- /dev/null
+++ b/Hyard/nodes/(-2609,13,-1724).lua
@@ -0,0 +1 @@
+digiline_send("lcd", "Direction: "..S.dir.."\nCurrent FC:"..(S.fc or "").."\nCars in Pickup: "..(S.cars or 0).."\nRC: "..(S.rc or "")) \ No newline at end of file
diff --git a/Hyard/nodes/(-2642,10,-1700).lua b/Hyard/nodes/(-2642,10,-1700).lua
new file mode 100644
index 0000000..653af4d
--- /dev/null
+++ b/Hyard/nodes/(-2642,10,-1700).lua
@@ -0,0 +1,8 @@
+if S.reversing and atc_arrow then
+S.reversing = false
+set_rc(S.rc)
+elseif atc_arrow and S.exiting and S.rc:match("HYREVERSE") then
+--set_rc("PICKUP")
+--S.dir = 1
+--S.reversing = true
+end \ No newline at end of file