summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2025-08-26 00:00:02 +0200
committerautocommitter <autocommitter@linux-forks.de>2025-08-26 00:00:02 +0200
commit98ee5a1df5a6cd70fe57175c5ff8fc7b99add245 (patch)
treeb1d1f25b1fec8217ba7f451a1c5bfee7fe2fea66
parent951dc4d254c941f0e519ff5183e65883eb4b6938 (diff)
downloadluaatc_envs-98ee5a1df5a6cd70fe57175c5ff8fc7b99add245.tar.gz
luaatc_envs-98ee5a1df5a6cd70fe57175c5ff8fc7b99add245.tar.bz2
luaatc_envs-98ee5a1df5a6cd70fe57175c5ff8fc7b99add245.zip
State at 2025-08-26
-rw-r--r--m4/init_code.lua17
-rw-r--r--m4/nodes/(-1746,-7,-4392).lua5
-rw-r--r--m4/nodes/(-570,8,-3809).lua5
3 files changed, 20 insertions, 7 deletions
diff --git a/m4/init_code.lua b/m4/init_code.lua
index b7c58a3..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,7 +94,6 @@ function F.cpl_looparound(ln)
set_rc("")
return
end
-
end
--end of new cpl functions
@@ -101,6 +103,7 @@ function F.print_length()
F.print(F.get_train_length_safe())
end
+
--[[ Utility Functions
]]--
F.indicator = function(indicator,set)
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/(-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