summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/init_code.lua23
-rw-r--r--m4/nodes/(-1524,-11,-4611).lua3
-rw-r--r--m4/nodes/(-1746,-7,-4392).lua5
-rw-r--r--m4/nodes/(-1921,13,-4576).lua5
-rw-r--r--m4/nodes/(-1967,-11,-4415).lua3
-rw-r--r--m4/nodes/(-570,8,-3809).lua5
-rw-r--r--m4/nodes/(1345,3,-5637).lua5
-rw-r--r--m4/nodes/(1734,26,2901).lua7
-rw-r--r--m4/nodes/(4045,24,5650).lua (renamed from m4/nodes/(4049,24,5652).lua)0
-rw-r--r--m4/nodes/(4536,11,6814).lua (renamed from m4/nodes/(4542,11,6809).lua)2
-rw-r--r--m4/nodes/(4538,11,6814).lua6
-rw-r--r--m4/nodes/(4539,11,6809).lua2
-rw-r--r--m4/nodes/(4579,11,6814).lua (renamed from m4/nodes/(4568,11,6809).lua)0
-rw-r--r--m4/nodes/(5397,13,6916).lua4
14 files changed, 59 insertions, 11 deletions
diff --git a/m4/init_code.lua b/m4/init_code.lua
index d32be9f..65e58bb 100644
--- a/m4/init_code.lua
+++ b/m4/init_code.lua
@@ -53,33 +53,36 @@ function F.cpllooparound(ln)
end
--new ones
+--these work with train going forward with engine in front! :D
function F.split_looparound(ln)
if not (event.train) then return end
if not (F.get_line_safe() == ln) then return end
+ if not (F.get_train_length_safe() >= 2) then return end -- no wagons? do nothing! :D
- split_at_index(F.get_train_length_safe()-1,"A0S0OC") --Stopping the wagons is handled here by SO
+ --split_at_index(F.get_train_length_safe()-1,"A0S0OC") --Stopping the wagons is handled here by SO
+ split_at_index(2,"A0S0OC") --Stopping the wagons is handled here by SO
set_rc("ENGINE")
atc_send("A1")
-
end
function F.split_looparound_left(ln)
if not (event.train) then return end
if not (F.get_line_safe() == ln) then return end
+ if not (F.get_train_length_safe() >= 2) then return end -- no wagons? do nothing! :D
- split_at_index(F.get_train_length_safe()-1,"A0S0OL") --Stopping the wagons is handled here by SO
+ split_at_index(2,"A0S0OL") --Stopping the wagons is handled here by SO
set_rc("ENGINE")
atc_send("A1")
-
end
+
function F.split_looparound_right(ln)
if not (event.train) then return end
if not (F.get_line_safe() == ln) then return end
+ if not (F.get_train_length_safe() >= 2) then return end -- no wagons? do nothing! :D
- split_at_index(F.get_train_length_safe()-1,"A0S0OR") --Stopping the wagons is handled here by SO
+ split_at_index(2,"A0S0OR") --Stopping the wagons is handled here by SO
set_rc("ENGINE")
atc_send("A1")
-
end
function F.cpl_looparound(ln)
@@ -91,10 +94,16 @@ function F.cpl_looparound(ln)
set_rc("")
return
end
-
end
--end of new cpl functions
+--[[ testing functions for train length print
+]]--
+function F.print_length()
+ F.print(F.get_train_length_safe())
+end
+
+
--[[ Utility Functions
]]--
F.indicator = function(indicator,set)
diff --git a/m4/nodes/(-1524,-11,-4611).lua b/m4/nodes/(-1524,-11,-4611).lua
new file mode 100644
index 0000000..6272a7b
--- /dev/null
+++ b/m4/nodes/(-1524,-11,-4611).lua
@@ -0,0 +1,3 @@
+if get_line()=="52" then
+ atc_set_text_outside("Line 52 - Olo Beach")
+end \ No newline at end of file
diff --git a/m4/nodes/(-1746,-7,-4392).lua b/m4/nodes/(-1746,-7,-4392).lua
new file mode 100644
index 0000000..6a121ec
--- /dev/null
+++ b/m4/nodes/(-1746,-7,-4392).lua
@@ -0,0 +1,5 @@
+if event.train then
+ if get_line()=="01" then
+ atc_set_text_outside("ALL01 - Luanti Institute\nvia Daston, Zengus, Rawhide, Vovanium ")
+ end
+end \ No newline at end of file
diff --git a/m4/nodes/(-1921,13,-4576).lua b/m4/nodes/(-1921,13,-4576).lua
new file mode 100644
index 0000000..eb9b943
--- /dev/null
+++ b/m4/nodes/(-1921,13,-4576).lua
@@ -0,0 +1,5 @@
+if event.train then
+ if get_line()=="E36" then
+ atc_set_text_outside("[E36] Souford\nSouthbound Express (SBX)")
+ end
+end \ No newline at end of file
diff --git a/m4/nodes/(-1967,-11,-4415).lua b/m4/nodes/(-1967,-11,-4415).lua
new file mode 100644
index 0000000..afb0335
--- /dev/null
+++ b/m4/nodes/(-1967,-11,-4415).lua
@@ -0,0 +1,3 @@
+if get_line()=="52" then
+ atc_set_text_outside("Line 52 - Merliansas Ruins")
+end \ No newline at end of file
diff --git a/m4/nodes/(-570,8,-3809).lua b/m4/nodes/(-570,8,-3809).lua
new file mode 100644
index 0000000..ebe4a8e
--- /dev/null
+++ b/m4/nodes/(-570,8,-3809).lua
@@ -0,0 +1,5 @@
+if event.train then
+ if get_line()=="01" then
+ atc_set_text_outside("ALL01 - Town of Abyss\n via Vovanium, Rawhide, Zengus, Daston")
+ end
+end \ No newline at end of file
diff --git a/m4/nodes/(1345,3,-5637).lua b/m4/nodes/(1345,3,-5637).lua
new file mode 100644
index 0000000..b34a162
--- /dev/null
+++ b/m4/nodes/(1345,3,-5637).lua
@@ -0,0 +1,5 @@
+if event.train then
+ if get_line()=="E36" then
+ atc_set_text_outside("[E36] Melinka\nSouthbound Express (SBX)")
+ end
+end \ No newline at end of file
diff --git a/m4/nodes/(1734,26,2901).lua b/m4/nodes/(1734,26,2901).lua
index 66ba746..f10234c 100644
--- a/m4/nodes/(1734,26,2901).lua
+++ b/m4/nodes/(1734,26,2901).lua
@@ -1 +1,6 @@
-F.split_looparound_left("E16") \ No newline at end of file
+if (event.train) then
+-- F.print_length()
+ atc_set_text_outside("[E16] Line Ends Here")
+ atc_set_text_inside("Personhood Main\nTerminus, please get off!")
+ F.split_looparound_left("E16")
+end \ No newline at end of file
diff --git a/m4/nodes/(4049,24,5652).lua b/m4/nodes/(4045,24,5650).lua
index 037b135..037b135 100644
--- a/m4/nodes/(4049,24,5652).lua
+++ b/m4/nodes/(4045,24,5650).lua
diff --git a/m4/nodes/(4542,11,6809).lua b/m4/nodes/(4536,11,6814).lua
index 67b31a2..dceeeea 100644
--- a/m4/nodes/(4542,11,6809).lua
+++ b/m4/nodes/(4536,11,6814).lua
@@ -1,4 +1,4 @@
-- Poor Man's ARS
-if event.train and get_rc() == "E16_poor_mans_ars" then
+if event.train and get_line() == "E16" then
set_route("Btw-E16-behelf", "E16Turnback")
end \ No newline at end of file
diff --git a/m4/nodes/(4538,11,6814).lua b/m4/nodes/(4538,11,6814).lua
new file mode 100644
index 0000000..1c5af49
--- /dev/null
+++ b/m4/nodes/(4538,11,6814).lua
@@ -0,0 +1,6 @@
+if (event.train) and (F.get_line_safe() == "E16") then
+-- F.print_length()
+ atc_set_text_outside("[E16] Line Ends Here")
+ atc_set_text_inside("By The Way\nTerminus, please get off!")
+ F.split_looparound_right("E16")
+end \ No newline at end of file
diff --git a/m4/nodes/(4539,11,6809).lua b/m4/nodes/(4539,11,6809).lua
deleted file mode 100644
index c42277b..0000000
--- a/m4/nodes/(4539,11,6809).lua
+++ /dev/null
@@ -1,2 +0,0 @@
-atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail")
-F.split_looparound_left("E16") \ No newline at end of file
diff --git a/m4/nodes/(4568,11,6809).lua b/m4/nodes/(4579,11,6814).lua
index 0e0dc9c..0e0dc9c 100644
--- a/m4/nodes/(4568,11,6809).lua
+++ b/m4/nodes/(4579,11,6814).lua
diff --git a/m4/nodes/(5397,13,6916).lua b/m4/nodes/(5397,13,6916).lua
new file mode 100644
index 0000000..59bcdf6
--- /dev/null
+++ b/m4/nodes/(5397,13,6916).lua
@@ -0,0 +1,4 @@
+if event.train and get_line()=="E16" then
+return
+--atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail")
+end \ No newline at end of file