summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Crossroads/nodes/(-1902,2,698).lua0
-rw-r--r--Crossroads/nodes/(-1908,2,706).lua0
-rw-r--r--Crossroads/nodes/(544,11,2139).lua9
-rw-r--r--Hyard/nodes/(-2595,12,-1837).lua3
-rw-r--r--auto_yards/init_code.lua1
-rw-r--r--auto_yards/nodes/(-1902,10,-893).lua1
-rw-r--r--auto_yards/nodes/(-1909,10,-930).lua1
-rw-r--r--auto_yards/nodes/(-1909,10,-957).lua1
-rw-r--r--auto_yards/nodes/(-1909,7,-1017).lua1
-rw-r--r--auto_yards/nodes/(-1912,10,-928).lua1
-rw-r--r--auto_yards/nodes/(-1912,10,-957).lua1
-rw-r--r--auto_yards/nodes/(-1912,7,-1017).lua1
-rw-r--r--auto_yards/nodes/(-1915,10,-957).lua1
-rw-r--r--auto_yards/nodes/(-1915,7,-1017).lua1
-rw-r--r--auto_yards/nodes/(-1918,10,-957).lua1
-rw-r--r--auto_yards/nodes/(-1918,7,-1017).lua1
-rw-r--r--auto_yards/nodes/(-1932,3,-1053).lua1
-rw-r--r--auto_yards/nodes/(-1933,3,-1050).lua1
-rw-r--r--auto_yards/nodes/(-1982,3,-1079).lua1
-rw-r--r--durt/init_code.lua15
-rw-r--r--durt/nodes/(-1924,13,-1692).lua2
-rw-r--r--durt/nodes/(-1987,13,-1700).lua1
-rw-r--r--durt/nodes/(-1988,13,-1698).lua1
-rw-r--r--durt/nodes/(-2343,15,-1336).lua1
-rw-r--r--durt/nodes/(-2766,-224,-1712).lua1
-rw-r--r--durt/nodes/(-3544,8,-2277).lua2
-rw-r--r--durt/nodes/(-3553,18,-2261).lua1
-rw-r--r--durt/nodes/(-3588,8,-2277).lua2
-rw-r--r--durt/nodes/(-3590,18,-3906).lua2
-rw-r--r--durt/nodes/(-3596,18,-3920).lua1
-rw-r--r--durt/nodes/(-3596,18,-3930).lua1
-rw-r--r--durt/nodes/(-3601,18,-3961).lua2
-rw-r--r--durt/nodes/(-3604,18,-3958).lua1
-rw-r--r--durt/nodes/(-3670,12,-3742).lua2
-rw-r--r--durt/nodes/(-3764,12,-3562).lua2
-rw-r--r--durt/nodes/(-3776,11,-4340).lua1
-rw-r--r--durt/nodes/(-3820,18,-4730).lua8
-rw-r--r--durt/nodes/(-3821,18,-4761).lua24
-rw-r--r--durt/nodes/(-3824,18,-4774).lua10
-rw-r--r--durt/nodes/(-3843,20,-4372).lua1
-rw-r--r--durt/nodes/(-4002,12,-2768).lua2
-rw-r--r--durt/nodes/(-4502,12,-3179).lua9
-rw-r--r--durt/nodes/(-4511,12,-3178).lua7
-rw-r--r--durt/nodes/(-716,3,1894).lua3
-rw-r--r--il_timetable/nodes/(-631,14,-404).lua2
-rw-r--r--il_timetable/nodes/(269,13,-2049).lua1
-rw-r--r--nlvcross/init_code.lua2
-rw-r--r--subway/nodes/(-543,-5,-772).lua2
48 files changed, 103 insertions, 33 deletions
diff --git a/Crossroads/nodes/(-1902,2,698).lua b/Crossroads/nodes/(-1902,2,698).lua
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Crossroads/nodes/(-1902,2,698).lua
diff --git a/Crossroads/nodes/(-1908,2,706).lua b/Crossroads/nodes/(-1908,2,706).lua
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Crossroads/nodes/(-1908,2,706).lua
diff --git a/Crossroads/nodes/(544,11,2139).lua b/Crossroads/nodes/(544,11,2139).lua
new file mode 100644
index 0000000..69612c9
--- /dev/null
+++ b/Crossroads/nodes/(544,11,2139).lua
@@ -0,0 +1,9 @@
+--
+local interval = 900 -- Interval in seconds
+local offset = 0 -- Offset for the timing system
+if event.type == "train" then
+ if atc_arrow then
+ interrupt_time = (offset-os.time())%interval
+ atc_send(string.format("BBWD%dRSM",interrupt_time))
+ end
+end \ No newline at end of file
diff --git a/Hyard/nodes/(-2595,12,-1837).lua b/Hyard/nodes/(-2595,12,-1837).lua
index 0512e1d..85198cb 100644
--- a/Hyard/nodes/(-2595,12,-1837).lua
+++ b/Hyard/nodes/(-2595,12,-1837).lua
@@ -1,2 +1,3 @@
set_rc(S.rc)
-S.rc = nil \ No newline at end of file
+S.rc = nil
+atc_send("SM") \ No newline at end of file
diff --git a/auto_yards/init_code.lua b/auto_yards/init_code.lua
new file mode 100644
index 0000000..fc73c3a
--- /dev/null
+++ b/auto_yards/init_code.lua
@@ -0,0 +1 @@
+F.pickup = function(yard,dir,lane) local y = yard if S[y].yard_active then if atc_arrow then if S[y].dir == dir then set_route(yard..dir.."_"..lane, "HEADSHUNT") local plen = train_length() local rc = split_at_fc("B0") local trc = yard..dir.."_"..rc if plen == train_length() and (rc == "" or S[y].rc:match(trc)) then S[y].exiting = true end if rc and rc ~= "" then set_rc(yard..dir.."_"..rc) else set_rc(S[y].rc) S[y].exiting = true end else -- if S[y].dir ~= dir if S[y].RTS then -- loop around to other HS S[y].RTS = nil set_route(yard..dir.."_"..lane,"AROUND") split_off_locomotive("B0") set_rc("AROUND_"..S[y].dir) return else atc_send("B0WRS4") end end end -- nothing to do if train goes against arrow end end F.EOL = function(yard,dir,lane) local y = yard if S[y].yard_active then if S[y].dir == dir then if atc_arrow then if not S[y].exiting then --return to PICKUP via headshunt split_off_locomotive("B0") set_rc("PICKUP") set_route(yard..dir.."_"..lane, "HEADSHUNT") else --if S[y].exiting then loco has already sorted to correct lane for departure --S[y].exiting set by the pickup track set_rc(S[y].rc) set_route(yard..dir.."_"..lane, "EXIT") S[y].exiting = nil end end else -- EOL Bounce atc_send("B0WD1RS4") end end end \ No newline at end of file
diff --git a/auto_yards/nodes/(-1902,10,-893).lua b/auto_yards/nodes/(-1902,10,-893).lua
new file mode 100644
index 0000000..a878623
--- /dev/null
+++ b/auto_yards/nodes/(-1902,10,-893).lua
@@ -0,0 +1 @@
+--EXIT \ No newline at end of file
diff --git a/auto_yards/nodes/(-1909,10,-930).lua b/auto_yards/nodes/(-1909,10,-930).lua
new file mode 100644
index 0000000..90ea19a
--- /dev/null
+++ b/auto_yards/nodes/(-1909,10,-930).lua
@@ -0,0 +1 @@
+-- HEADSHUNT and EXIT \ No newline at end of file
diff --git a/auto_yards/nodes/(-1909,10,-957).lua b/auto_yards/nodes/(-1909,10,-957).lua
new file mode 100644
index 0000000..3774070
--- /dev/null
+++ b/auto_yards/nodes/(-1909,10,-957).lua
@@ -0,0 +1 @@
+F.pickup("BY","N","0") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1909,7,-1017).lua b/auto_yards/nodes/(-1909,7,-1017).lua
new file mode 100644
index 0000000..b78dee7
--- /dev/null
+++ b/auto_yards/nodes/(-1909,7,-1017).lua
@@ -0,0 +1 @@
+F.pickup("BY","S","0") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1912,10,-928).lua b/auto_yards/nodes/(-1912,10,-928).lua
new file mode 100644
index 0000000..afbdcef
--- /dev/null
+++ b/auto_yards/nodes/(-1912,10,-928).lua
@@ -0,0 +1 @@
+-- ENTRY and WAITING \ No newline at end of file
diff --git a/auto_yards/nodes/(-1912,10,-957).lua b/auto_yards/nodes/(-1912,10,-957).lua
new file mode 100644
index 0000000..68f24bb
--- /dev/null
+++ b/auto_yards/nodes/(-1912,10,-957).lua
@@ -0,0 +1 @@
+F.EOL("BY","N","1") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1912,7,-1017).lua b/auto_yards/nodes/(-1912,7,-1017).lua
new file mode 100644
index 0000000..572ed50
--- /dev/null
+++ b/auto_yards/nodes/(-1912,7,-1017).lua
@@ -0,0 +1 @@
+F.EOL("BY","S","1") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1915,10,-957).lua b/auto_yards/nodes/(-1915,10,-957).lua
new file mode 100644
index 0000000..40a85b3
--- /dev/null
+++ b/auto_yards/nodes/(-1915,10,-957).lua
@@ -0,0 +1 @@
+F.EOL("BY","N","2") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1915,7,-1017).lua b/auto_yards/nodes/(-1915,7,-1017).lua
new file mode 100644
index 0000000..217f0f4
--- /dev/null
+++ b/auto_yards/nodes/(-1915,7,-1017).lua
@@ -0,0 +1 @@
+F.EOL("BY","S","2") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1918,10,-957).lua b/auto_yards/nodes/(-1918,10,-957).lua
new file mode 100644
index 0000000..f4f335b
--- /dev/null
+++ b/auto_yards/nodes/(-1918,10,-957).lua
@@ -0,0 +1 @@
+F.EOL("BY","N","3") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1918,7,-1017).lua b/auto_yards/nodes/(-1918,7,-1017).lua
new file mode 100644
index 0000000..6c9c7d1
--- /dev/null
+++ b/auto_yards/nodes/(-1918,7,-1017).lua
@@ -0,0 +1 @@
+F.EOL("BY","S","3") \ No newline at end of file
diff --git a/auto_yards/nodes/(-1932,3,-1053).lua b/auto_yards/nodes/(-1932,3,-1053).lua
new file mode 100644
index 0000000..2970f21
--- /dev/null
+++ b/auto_yards/nodes/(-1932,3,-1053).lua
@@ -0,0 +1 @@
+--HEADSHUNT and EXIT \ No newline at end of file
diff --git a/auto_yards/nodes/(-1933,3,-1050).lua b/auto_yards/nodes/(-1933,3,-1050).lua
new file mode 100644
index 0000000..afbdcef
--- /dev/null
+++ b/auto_yards/nodes/(-1933,3,-1050).lua
@@ -0,0 +1 @@
+-- ENTRY and WAITING \ No newline at end of file
diff --git a/auto_yards/nodes/(-1982,3,-1079).lua b/auto_yards/nodes/(-1982,3,-1079).lua
new file mode 100644
index 0000000..a878623
--- /dev/null
+++ b/auto_yards/nodes/(-1982,3,-1079).lua
@@ -0,0 +1 @@
+--EXIT \ No newline at end of file
diff --git a/durt/init_code.lua b/durt/init_code.lua
index b0b017a..c264a3a 100644
--- a/durt/init_code.lua
+++ b/durt/init_code.lua
@@ -1 +1,14 @@
-S.lines = { S23 = { termini = { N = "Arc", S = "Rew" }, stations = { Rew = { name = "Redwood", doors = "L", next_station = { N = "Thc", S = false }, }, Thc = { name = "Tanh Cliffs", doors = "L", next_station = { N = "Noi", S = "Rew" }, }, Noi = { name = "No Idea", doors = "L", next_station = { N = "Lzf", S = "Thc" }, }, Lzf = { name = "Laza's Field", doors = "L", next_station = { N = "Bbh", S = "Noi" }, }, Bbh = { name = "Bamboo Hills", doors = "L", next_station = { N = "Arc", S = "Lzf" }, }, Arc = { name = "Arcadius", doors = "L", next_station = { N = false, S = "Bbh" }, } }, monitoring = { N = {}, S = {} } }, U21 = { termini = { E = "Tro", W = "Dbl" }, stations = { Dbl = { name = "Dubulti", doors = "R", next_station = { E = "Pav", W = "Ghd" } }, Pav = { name = "Pence Avenue", doors = "L", next_station = { E = "Ghd", W = "Dbl" } }, Ghd = { name = "Greenhat Mountain", doors = "L", next_station = { E = "Acm", W = "Dbl" } }, Acm = { name = "Acacia Mountains", doors = "L", next_station = { E = "Ghb", W = "Ghd" } }, Ghb = { name = "Green Hill Beach", doors = "L", next_station = { E = "Ged", W = "Acm" } }, Ged = { name = "Green Edge", doors = "L", next_station = { E = "Dri", W = "Ghb" } }, Dri = { name = "Dry Island", doors = "L", next_station = { E = "Gcl", W = "Ged" } }, Gcl = { name = "Green Cliffs", doors = "R", next_station = { E ="Sfs", W = "Dri" } }, Sfs = { name = "South Forest", doors = "R", next_station = { E = "Jms", W = "Gcl" } }, Jms = { name = "Jude Milhon Street", doors = "R", next_station = { E = "Bam", W = "Sfs" } }, Bam = { name = "Bamboo Hills", doors = "R", next_station = { E = "Cli", W = "Jms" } }, Cli = { name = "Clown Island", doors = "R", next_station = { E = "Wat", W = "Bam" } }, Wat = { name = "Something in the Water", doors = "L", next_station = { E = "Duf", W = "Cli" } }, Duf = { name = "Duff Rd", doors = "R", next_station = { E = "Tro", W = "Wat" } }, Tro = { name = "Turtle Rock", doors = "L", next_station = { E = false, W = "Duf" }, } }, monitoring = { E = {}, W = {}, S = {}, N = {} } } } S.runarounds = { ["TheStacks"] = {}, ["M27_Quarry_runaround"] = {}, ["M27_Breaker_Factory"] = {}, } --------------------------------------------------------------------- --defining the functions F.arrive = function(stn_code,dir,line) S.lines[line].monitoring[dir][stn_code] = atc_id atc_send("B0 W O"..S.lines[line].stations[stn_code].doors) atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name) end F.depart = function(stn_code,dir,line) local pos = stn_code..dir local inside_text = "Next Stop:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name if can_set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir]) then set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir]) atc_send("OC SM") S.lines[line].monitoring[dir][stn_code] = nil S.lines[line].monitoring[dir][S.lines[line].stations[stn_code].next_station[dir]] = atc_id else -- Wait another 5s before trying again inside_text = inside_text.."\nWaiting to depart..." interrupt(5, "depart") end atc_set_text_inside(inside_text) end F.set_desto = function(dir, line) atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[dir]].name) end --------------------------------------------------------------------- --LuaATC track functions F.station = function(stn_code,dir,line) -- temp until all SF LuaAtc tracks are changed------------------------- if line == nil or line == "1" then line = "U21" end --------------------------------------------------------------------- if event.train then F.arrive(stn_code,dir,line) interrupt(10,"depart") elseif event.int and event.msg=="depart" then F.depart(stn_code,dir,line) end end F.terminus = function(stn_code, newdir, line) if event.train then S.lines[line].monitoring[newdir][stn_code] = atc_id atc_send("B0 W R O"..S.lines[line].stations[stn_code].doors) atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[newdir]].name) atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[newdir]].name) interrupt(10, "depart") end if event.int and event.msg == "depart" then F.depart(stn_code, newdir,line) end end \ No newline at end of file
+S.lines = { S23 = { termini = { N = "Arc", S = "Rew" }, stations = { Rew = { name = "Redwood", doors = "L", next_station = { N = "Thc", S = false }, }, Thc = { name = "Tanh Cliffs", doors = "L", next_station = { N = "Noi", S = "Rew" }, }, Noi = { name = "No Idea", doors = "L", next_station = { N = "Lzf", S = "Thc" }, }, Lzf = { name = "Laza's Field", doors = "L", next_station = { N = "Bbh", S = "Noi" }, }, Bbh = { name = "Bamboo Hills", doors = "L", next_station = { N = "Arc", S = "Lzf" }, }, Arc = { name = "Arcadius", doors = "L", next_station = { N = false, S = "Bbh" }, } }, monitoring = { N = {}, S = {} } }, U21 = { termini = { E = "Tro", W = "Dbl" }, stations = { Dbl = { name = "Dubulti", doors = "R", next_station = { E = "Pav", W = "Ghd" } }, Pav = { name = "Pence Avenue", doors = "L", next_station = { E = "Ghd", W = "Dbl" } }, Ghd = { name = "Greenhat Mountain", doors = "L", next_station = { E = "Acm", W = "Dbl" } }, Acm = { name = "Acacia Mountains", doors = "L", next_station = { E = "Ghb", W = "Ghd" } }, Ghb = { name = "Green Hill Beach", doors = "L", next_station = { E = "Ged", W = "Acm" } }, Ged = { name = "Green Edge", doors = "L", next_station = { E = "Dri", W = "Ghb" } }, Dri = { name = "Dry Island", doors = "L", next_station = { E = "Gcl", W = "Ged" } }, Gcl = { name = "Green Cliffs", doors = "R", next_station = { E ="Sfs", W = "Dri" } }, Sfs = { name = "South Forest", doors = "R", next_station = { E = "Jms", W = "Gcl" } }, Jms = { name = "Jude Milhon Street", doors = "R", next_station = { E = "Bam", W = "Sfs" } }, Bam = { name = "Bamboo Hills", doors = "R", next_station = { E = "Cli", W = "Jms" } }, Cli = { name = "Clown Island", doors = "R", next_station = { E = "Wat", W = "Bam" } }, Wat = { name = "Something in the Water", doors = "L", next_station = { E = "Duf", W = "Cli" } }, Duf = { name = "Duff Rd", doors = "R", next_station = { E = "Tro", W = "Wat" } }, Tro = { name = "Turtle Rock", doors = "L", next_station = { E = false, W = "Duf" }, } }, monitoring = { E = {}, W = {}, S = {}, N = {} } } } S.runarounds = { ["TheStacks"] = {}, ["M27_Quarry_runaround"] = {}, ["M27_Breaker_Factory"] = {}, ["DJnc_4"] = {}, }
+
+
+---------------------------------------------------------------------
+-- M27 Tracking
+S.M27_tracking = {}
+-- tracks for the above table are located at
+-- -4003,12,-2766 Between Alieane and Trojan
+-- -3766,15,-3562 EV_Beach<->Sinensis
+-- -3592,18,-3907 Sinensis<->Willow Tunnel
+-- -3602,18,-3961 Willow Tunnel <-> Djnc -- -3602.18.-3961 Djnc<->Dcaves
+-- -2345,15,-1336 Tanh Depot -- -1986,13,-1699 x2 Foundry entry
+
+F.M27_tracking = function(id) if not event.train then return end local rc = get_rc() or "" if not rc:match("M27_tracking") then return end S.M27_tracking.last = S.M27_tracking.now S.M27_tracking.now = id end --------------------------------------------------------------------- --defining the functions F.arrive = function(stn_code,dir,line) S.lines[line].monitoring[dir][stn_code] = atc_id atc_send("B0 W O"..S.lines[line].stations[stn_code].doors) atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name) end F.depart = function(stn_code,dir,line) local pos = stn_code..dir local inside_text = "Next Stop:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name if can_set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir]) then set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir]) atc_send("OC SM") S.lines[line].monitoring[dir][stn_code] = nil S.lines[line].monitoring[dir][S.lines[line].stations[stn_code].next_station[dir]] = atc_id else -- Wait another 5s before trying again inside_text = inside_text.."\nWaiting to depart..." interrupt(5, "depart") end atc_set_text_inside(inside_text) end F.set_desto = function(dir, line) atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[dir]].name) end --------------------------------------------------------------------- --LuaATC track functions F.station = function(stn_code,dir,line) -- temp until all SF LuaAtc tracks are changed------------------------- if line == nil or line == "1" then line = "U21" end --------------------------------------------------------------------- if event.train then F.arrive(stn_code,dir,line) interrupt(10,"depart") elseif event.int and event.msg=="depart" then F.depart(stn_code,dir,line) end end F.terminus = function(stn_code, newdir, line) if event.train then S.lines[line].monitoring[newdir][stn_code] = atc_id atc_send("B0 W R O"..S.lines[line].stations[stn_code].doors) atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[newdir]].name) atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[newdir]].name) interrupt(10, "depart") end if event.int and event.msg == "depart" then F.depart(stn_code, newdir,line) end end \ No newline at end of file
diff --git a/durt/nodes/(-1924,13,-1692).lua b/durt/nodes/(-1924,13,-1692).lua
index 6b92378..9d2f57f 100644
--- a/durt/nodes/(-1924,13,-1692).lua
+++ b/durt/nodes/(-1924,13,-1692).lua
@@ -1 +1 @@
-signal = "foundry_roads_sorting" if (event.train and atc_arrow) or (event.int and event.message == "check_signal") then if can_set_route(signal,"In Road (Fuel In)") then set_route(signal,"In Road (Fuel In)") elseif can_set_route(signal,"Out Road (Loadout)") then set_route(signal,"Out Road (Loadout)") else if atc_speed > 0 then atc_send("S0") else atc_send("B0") end interrupt(5,"check_signal") return end atc_send("S1") return end \ No newline at end of file
+signal = "foundry_roads_sorting" if (event.train and atc_arrow) or (event.int and event.message == "check_signal" and atc_id) then if can_set_route(signal,"Out Road (Loadout)") then set_route(signal,"Out Road (Loadout)") elseif can_set_route(signal,"In Road (Fuel In)") then set_route(signal,"In Road (Fuel In)") else if atc_speed > 0 then atc_send("S0") else atc_send("B0") end interrupt(5,"check_signal") return end atc_send("S1") return end \ No newline at end of file
diff --git a/durt/nodes/(-1987,13,-1700).lua b/durt/nodes/(-1987,13,-1700).lua
new file mode 100644
index 0000000..00818fd
--- /dev/null
+++ b/durt/nodes/(-1987,13,-1700).lua
@@ -0,0 +1 @@
+F.M27_tracking("Exit Foundry") \ No newline at end of file
diff --git a/durt/nodes/(-1988,13,-1698).lua b/durt/nodes/(-1988,13,-1698).lua
new file mode 100644
index 0000000..3ca3126
--- /dev/null
+++ b/durt/nodes/(-1988,13,-1698).lua
@@ -0,0 +1 @@
+F.M27_tracking("Enter Foundry") \ No newline at end of file
diff --git a/durt/nodes/(-2343,15,-1336).lua b/durt/nodes/(-2343,15,-1336).lua
new file mode 100644
index 0000000..c8dc75c
--- /dev/null
+++ b/durt/nodes/(-2343,15,-1336).lua
@@ -0,0 +1 @@
+F.M27_tracking("Tanh Depot") \ No newline at end of file
diff --git a/durt/nodes/(-2766,-224,-1712).lua b/durt/nodes/(-2766,-224,-1712).lua
new file mode 100644
index 0000000..15ed25f
--- /dev/null
+++ b/durt/nodes/(-2766,-224,-1712).lua
@@ -0,0 +1 @@
+if event.train then if atc_arrow then atc_send("S1B1") F.M27_tracking("U_mine Load") else atc_send("SM") F.M27_tracking("U_mine Helix") end end-- \ No newline at end of file
diff --git a/durt/nodes/(-3544,8,-2277).lua b/durt/nodes/(-3544,8,-2277).lua
index 20c7298..e6d9f27 100644
--- a/durt/nodes/(-3544,8,-2277).lua
+++ b/durt/nodes/(-3544,8,-2277).lua
@@ -1 +1 @@
--- Loading Road Control info = { line = "Maverick2797_diamonds", rc = "autorun FREIGHT", outside = "DURT Logs to Diamonds Conversion Train", inside = "Cargo: Logs and Leaves\nOrigin: Auto Logging Plantation\nDestination: Icebreaker Factory", } accelerator_loop_diverge_sig = POS(-3602,9,-2282) loading_exit_sig = POS(-3539,9,-2279) control_interface = POS(-3530,8,-2267) depart = function() if not atc_arrow then atc_send("R") end if can_set_route(loading_exit_sig,"Train Accelerator Loop") then set_route(loading_exit_sig,"Train Accelerator Loop") atc_send("SM") set_line(info.line) set_rc(info.rc) atc_set_text_inside(info.inside) atc_set_text_outside(info.outside) return else interrupt(2,"depart") return end end if event.type=="ext_int" then if not atc_id then interrupt_pos(control_interface,"No Train at Signal") return elseif atc_speed ~= 0 then interrupt_pos(control_interface,"Train Still Moving") return end if event.message == "split_around" then atc_send("I+S0B0WRS3 E S3;") set_rc("split_around") return end if event.message == "depart" then depart() return end if event.message=="shuffle" then if can_set_route(loading_exit_sig,"Loop Around") then set_route(loading_exit_sig,"Loop Around") set_route(accelerator_loop_diverge_sig,"Loading Road") atc_send("S8D30S5") return else interrupt_pos(control_interface,"Unable to set routes") return end return end return end if event.type=="int" then if event.message=="depart" then depart() return end return end \ No newline at end of file
+ --East End of Loading Road local siding_id = "TreeFarm" local control_interface = POS(-3553,18,-2261) local loading_sig = POS(-3539,9,-2279) local exit_route = "Exit to Mainline" local accelerator_loop_diverge_sig = POS(-3602,9,-2282) if event.type=="ext_int" then if not atc_id then interrupt_pos(control_interface,"No Train at Signal") return elseif atc_speed ~= 0 then interrupt_pos(control_interface,"Train Still Moving") return end if event.message == "shuffle" then if can_set_route(loading_sig,"Loop Around") then set_route(loading_sig,"Loop Around") set_route(accelerator_loop_diverge_sig,"Loading Road") atc_send("S8") else interrupt_pos(control_interface,"Unable to set route") end elseif event.message == "depart" then atc_set_text_outside("Preparing to Depart") interrupt_pos(control_interface,"Preparing to Depart") interrupt(5,"depart") else interrupt_pos(control_interface,"Unknown Command:||"..tostring(event.msg)) end end if event.type=="int" then if event.message == "depart" then set_route(loading_sig,"Exit to Mainline") atc_send("SM") atc_set_text_inside("-- Manifest --\nCargo: Logs and Leaves\nOrigin: Auto Logging Plantation") atc_set_text_outside("") end end \ No newline at end of file
diff --git a/durt/nodes/(-3553,18,-2261).lua b/durt/nodes/(-3553,18,-2261).lua
new file mode 100644
index 0000000..d0acbc0
--- /dev/null
+++ b/durt/nodes/(-3553,18,-2261).lua
@@ -0,0 +1 @@
+--control interface loading_road_control_track = POS(-3544,8,-2277) entry_exit_road_control = nil --still need to add a track for traffic balancing if event.ext_int then digiline_send("train_control_screen",tostring(event.message)) return end if event.digiline then if event.channel ~= "train_control" then return end if event.msg=="rehead" then digiline_send("train_control_screen","Loco Change Ends") interrupt_pos(loading_road_control_track,"split_around") return end if event.msg=="depart" then digiline_send("train_control_screen","Depart") interrupt_pos(loading_road_control_track,"depart") return end if event.msg=="shuffle_loading" then digiline_send("train_control_screen","Loading Shuffle") interrupt_pos(loading_road_control_track,"shuffle") return end return end \ No newline at end of file
diff --git a/durt/nodes/(-3588,8,-2277).lua b/durt/nodes/(-3588,8,-2277).lua
index 4e7fb2e..cc91e4a 100644
--- a/durt/nodes/(-3588,8,-2277).lua
+++ b/durt/nodes/(-3588,8,-2277).lua
@@ -1 +1 @@
---train splitter track mainline_line = "Maverick2797_diamonds" mainline_rc = "autorun FREIGHT" text_outside = "DURT Logs to Diamonds Conversion Train" loading_stopper_sig = POS(-3594,9,-2277) split_around = function() if ((atc_speed==0) and can_set_route(loading_stopper_sig,"Shunt Around Via Loop")) then set_autocouple() split_at_index(2,"S0") atc_send("S4") set_route(loading_stopper_sig,"Shunt Around Via Loop") return else interrupt(2,"split_around") return end end if event.train then if not atc_arrow then atc_send("B1S1") return end if get_rc() == "split_around" then atc_send("B0") split_around() return else --rejoined from splitting or arriving train atc_send("B0S0WD2RS1") set_line(mainline_line) set_rc(mainline_rc) atc_set_text_outside(text_outside) atc_set_text_inside("Loading Cargo") unset_autocouple() return end end if event.type=="int" then if event.message=="split_around" then split_around() return end return end \ No newline at end of file
+ --West End of Loading Road local siding_id = "TreeFarm" local control_interface = POS(-3553,18,-2261) local hs_sig = POS(-3594,9,-2277) local hs_route = "Shunt Around Via Loop" if not S[siding_id] then S[siding_id] = {} end if not atc_arrow then atc_send("B1") end if not S[siding_id].yard_active then if atc_arrow then S[siding_id].yard_active = true S[siding_id].info = { ['rc'] = get_rc() or "", ['line'] = get_line() or "" } -- set_rc("AROUND") split_off_locomotive("B0WR") set_autocouple() set_route(hs_sig,hs_route) end else if atc_arrow then -- train has rejoined atc_send("B0WD2RS1") -- reverse and load train set_rc(S[siding_id].info.rc) set_line(S[siding_id].info.line) unset_autocouple() interrupt_pos(control_interface,"Train Shunted||Now Loading") S[siding_id].info.rc = nil S[siding_id].info.line = nil S[siding_id].yard_active = nil end end \ No newline at end of file
diff --git a/durt/nodes/(-3590,18,-3906).lua b/durt/nodes/(-3590,18,-3906).lua
new file mode 100644
index 0000000..f13c279
--- /dev/null
+++ b/durt/nodes/(-3590,18,-3906).lua
@@ -0,0 +1,2 @@
+--
+F.M27_tracking("DJNC<-->Willow Tunnel") \ No newline at end of file
diff --git a/durt/nodes/(-3596,18,-3920).lua b/durt/nodes/(-3596,18,-3920).lua
new file mode 100644
index 0000000..30e4f47
--- /dev/null
+++ b/durt/nodes/(-3596,18,-3920).lua
@@ -0,0 +1 @@
+if (event.train and atc_arrow) then setstate(POS(-3596,18,-3927),"cr") setstate(POS(-3599,18,-3951),"cr") atc_send("B0WRD2S4") end \ No newline at end of file
diff --git a/durt/nodes/(-3596,18,-3930).lua b/durt/nodes/(-3596,18,-3930).lua
new file mode 100644
index 0000000..731b66e
--- /dev/null
+++ b/durt/nodes/(-3596,18,-3930).lua
@@ -0,0 +1 @@
+local id = "DJnc_4" --change here if (event.train and atc_arrow) then setstate(POS(-3596,18,-3927),"st") if not S.runarounds[id].active then S.runarounds[id].active = true atc_set_text_outside("Please Wait\nTrain Changing Ends") --change here split_off_locomotive("B0WROL") set_autocouple() set_rc("runaround") --change here return else S.runarounds[id].active = nil atc_send("OCB0WRD1SM") set_rc("sfh_service") --change here atc_set_text_outside("Sulfur Hills Branch Line -> Sulfur Hills") set_line("SHBL") unset_autocouple() setstate(POS(-3596,18,-3945),"st") end end \ No newline at end of file
diff --git a/durt/nodes/(-3601,18,-3961).lua b/durt/nodes/(-3601,18,-3961).lua
new file mode 100644
index 0000000..84387eb
--- /dev/null
+++ b/durt/nodes/(-3601,18,-3961).lua
@@ -0,0 +1,2 @@
+--
+F.M27_tracking("DJNC<-->Dcaves") \ No newline at end of file
diff --git a/durt/nodes/(-3604,18,-3958).lua b/durt/nodes/(-3604,18,-3958).lua
new file mode 100644
index 0000000..fa7c445
--- /dev/null
+++ b/durt/nodes/(-3604,18,-3958).lua
@@ -0,0 +1 @@
+if (event.train and atc_arrow) then setstate(POS(-3599,18,-3951),"st") setstate(POS(-3596,18,-3945),"cr") atc_send("B0WRD2S1") end \ No newline at end of file
diff --git a/durt/nodes/(-3670,12,-3742).lua b/durt/nodes/(-3670,12,-3742).lua
new file mode 100644
index 0000000..df19540
--- /dev/null
+++ b/durt/nodes/(-3670,12,-3742).lua
@@ -0,0 +1,2 @@
+--
+F.M27_tracking("Sinensis<-->Willow Tunnel") \ No newline at end of file
diff --git a/durt/nodes/(-3764,12,-3562).lua b/durt/nodes/(-3764,12,-3562).lua
new file mode 100644
index 0000000..118b1c4
--- /dev/null
+++ b/durt/nodes/(-3764,12,-3562).lua
@@ -0,0 +1,2 @@
+--
+F.M27_tracking("EV_S<-->Sinensis") \ No newline at end of file
diff --git a/durt/nodes/(-3776,11,-4340).lua b/durt/nodes/(-3776,11,-4340).lua
new file mode 100644
index 0000000..25cab54
--- /dev/null
+++ b/durt/nodes/(-3776,11,-4340).lua
@@ -0,0 +1 @@
+if event.train then if atc_arrow then atc_send("B1") atc_set_text_outside("Unloading Cargo") F.M27_tracking("Storage Entry") else atc_send("SM") atc_set_text_outside("M27 Foundries Inc.") --set_rc("FREIGHT M27 Tanh_loop M27_Foundry autorun M27_tracking") set_rc("FREIGHT M27 M27_Quarry autorun M27_tracking") F.M27_tracking("Storage Exit") end end \ No newline at end of file
diff --git a/durt/nodes/(-3820,18,-4730).lua b/durt/nodes/(-3820,18,-4730).lua
index cd90f80..41396be 100644
--- a/durt/nodes/(-3820,18,-4730).lua
+++ b/durt/nodes/(-3820,18,-4730).lua
@@ -1,7 +1,3 @@
-if (atc_arrow and event.type == "train" and get_rc() == "sfh_shunt") then
- setstate("SFH-T1-N", "st")
- atc_send("B0")
- interrupt(8, "proceed")
-elseif (event.type == "interrupt") then
- atc_send("R S2")
+if event.train and atc_arrow and get_rc() == "sfh_shunt" then
+ setstate("SFH-T1-N", "st") atc_send("B0WRD1S3")
end \ No newline at end of file
diff --git a/durt/nodes/(-3821,18,-4761).lua b/durt/nodes/(-3821,18,-4761).lua
index 14c0d7c..64f31ae 100644
--- a/durt/nodes/(-3821,18,-4761).lua
+++ b/durt/nodes/(-3821,18,-4761).lua
@@ -1,14 +1,10 @@
-if atc_arrow then
- if (event.type == "train") then
- atc_send("B0")
- setstate("SFH-T2-S", "cr")
- set_rc("sfh_shunt")
- interrupt(5, "proceed")
- elseif (event.type == "int") then
- set_route("sfh-T1-headshunt", "Enter Headshunt")
- split_at_index(2, "")
- atc_send("S2")
- end
-else
- atc_send("B0WRS1")
-end \ No newline at end of file
+if (event.type == "train") then
+ local rc = get_rc()
+ if rc == "sfh_service" then
+ set_autocouple() atc_send("B0") set_rc("sfh_shunt") interrupt(5, "proceed")
+ else atc_send("B0WD3OCRSM")
+ unset_autocouple()
+ set_rc("sfh_service")
+ set_line("SHBL")
+ atc_set_text_outside("Sulfur Hills Branch Line -> Desert Junction") end elseif (event.type == "int") then set_route("sfh-T1-headshunt", "Enter Headshunt") split_off_locomotive("B0OL")
+ setstate("SFH-T2-S", "cr") atc_send("S2") end \ No newline at end of file
diff --git a/durt/nodes/(-3824,18,-4774).lua b/durt/nodes/(-3824,18,-4774).lua
index 5ac8a65..65a3edf 100644
--- a/durt/nodes/(-3824,18,-4774).lua
+++ b/durt/nodes/(-3824,18,-4774).lua
@@ -1,7 +1,7 @@
if ((event.type == "train") and atc_arrow) then
- atc_send("B0")
- setstate("SFH-T2-S", "st")
- interrupt(3, "proceed")
-elseif (event.type == "int") then
- atc_send("R S4")
+ atc_send("B0WRS4")
+--setstate("SFH-T2-S", "st")
+-- interrupt(3, "proceed")
+--elseif (event.type == "int") then
+-- atc_send("R S4")
end \ No newline at end of file
diff --git a/durt/nodes/(-3843,20,-4372).lua b/durt/nodes/(-3843,20,-4372).lua
new file mode 100644
index 0000000..fa4d49f
--- /dev/null
+++ b/durt/nodes/(-3843,20,-4372).lua
@@ -0,0 +1 @@
+if (event.punch or event.channel=="clock") then --digiline_send("lcd","test") digiline_send("lcd"," --Foundry Train Status-- \nPrevious: ".. tostring(S.M27_tracking.last or "No Data").."\nCurrent :" ..tostring(S.M27_tracking.now or "No Data")) end \ No newline at end of file
diff --git a/durt/nodes/(-4002,12,-2768).lua b/durt/nodes/(-4002,12,-2768).lua
new file mode 100644
index 0000000..7d5ef08
--- /dev/null
+++ b/durt/nodes/(-4002,12,-2768).lua
@@ -0,0 +1,2 @@
+--
+F.M27_tracking("Iceberg On Bamboo") \ No newline at end of file
diff --git a/durt/nodes/(-4502,12,-3179).lua b/durt/nodes/(-4502,12,-3179).lua
new file mode 100644
index 0000000..27ed074
--- /dev/null
+++ b/durt/nodes/(-4502,12,-3179).lua
@@ -0,0 +1,9 @@
+if event.type == "train" then
+ local rc = get_rc()
+ if rc:find("apprentice_unload") ~= nil then
+ rc = rc:gsub("apprentice_unload", "apprentice_load")
+ elseif rc:find("apprentice_load") ~= nil then
+ rc = rc:gsub("apprentice_load", "apprentice_leave")
+ end
+ set_rc(rc)
+end \ No newline at end of file
diff --git a/durt/nodes/(-4511,12,-3178).lua b/durt/nodes/(-4511,12,-3178).lua
new file mode 100644
index 0000000..467f0f9
--- /dev/null
+++ b/durt/nodes/(-4511,12,-3178).lua
@@ -0,0 +1,7 @@
+if event.type == "train" then
+ rc = get_rc()
+ if rc:find("apprentice_leave") ~= nil then
+ rc = rc:gsub("apprentice_leave", "apprentice_unload")
+ end
+ set_rc(rc)
+end \ No newline at end of file
diff --git a/durt/nodes/(-716,3,1894).lua b/durt/nodes/(-716,3,1894).lua
index 0cdb8fd..7345c4a 100644
--- a/durt/nodes/(-716,3,1894).lua
+++ b/durt/nodes/(-716,3,1894).lua
@@ -1 +1,4 @@
+if event then return end
+--temporarily disable the track
+-------------------------------------------------------------------------------------------
factory_exit_sig = "icebreaker_factory_exit" inside_maniest = "Cargo: Empty\nOrigin: Icebreaker Factory\nDestination: Auto Plantation" outside_naming = "DURT Logs to Diamond Conversion Train" mainline_rc = "autorun FREIGHT" mainline_ln = "Maverick2797_diamonds" if event.train then digiline_send("train_response","Train "..atc_id.." ready||Entered factory:||Speed: "..atc_speed) set_line(mainline_ln) set_rc(mainline_rc) atc_set_text_outside(outside_naming) atc_set_text_inside(inside_maniest) end if event.digiline then if event.channel=="train_control" then if not atc_id then digiline_send("train_response","No Train Detected") return end if event.msg=="shuffle" then if atc_speed > 0 then digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed) return elseif not can_set_route(factory_exit_sig,"Reverse to Breaker-side Siding") then digiline_send("train_response","Unable to set route to:||Breaker-side Siding") return else set_route(factory_exit_sig,"Reverse to Breaker-side Siding") atc_send("R S1 D5 SM D13 S0 W R S1") digiline_send("train_response","Refilling Input Chests||Shuffling Train") return end return elseif event.msg=="exit" then if atc_speed > 0 then digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed) return elseif not can_set_route(factory_exit_sig,"Exit to Mainline South") then digiline_send("train_response","Unable to set route to:||Mainline South") return else set_route(factory_exit_sig,"Exit to Mainline South") atc_send("R SM") digiline_send("train_response","Train Departing") return end return elseif event.msg=="rehead" then if atc_speed > 0 then digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed) return elseif not can_set_route(factory_exit_sig,"Reverse for loco run-around") then digiline_send("train_response","Unable to set route to:||Loco Run Around Sequence") return else set_route(factory_exit_sig,"Reverse for loco run-around") set_rc("split_around") atc_send("R SM D15 S0 W R S1") digiline_send("train_response","Loco Changind Ends") return end return end return end return end \ No newline at end of file
diff --git a/il_timetable/nodes/(-631,14,-404).lua b/il_timetable/nodes/(-631,14,-404).lua
index 750d82a..62ea1fc 100644
--- a/il_timetable/nodes/(-631,14,-404).lua
+++ b/il_timetable/nodes/(-631,14,-404).lua
@@ -1,4 +1,4 @@
-- d_int: Departure every n seconds (epoch modulo)
-- d_off: Departure time offset
-- function F.stop_sd(st_name, doors, departcommand, minstoptime, d_int, d_off)
-F.stop_sd_sched("Main Station", "L", "SM", 10, 120, 0) \ No newline at end of file
+--F.stop_sd_sched("Main Station", "L", "SM", 10, 120, 0) \ No newline at end of file
diff --git a/il_timetable/nodes/(269,13,-2049).lua b/il_timetable/nodes/(269,13,-2049).lua
new file mode 100644
index 0000000..a51cd73
--- /dev/null
+++ b/il_timetable/nodes/(269,13,-2049).lua
@@ -0,0 +1 @@
+set_line("XN") \ No newline at end of file
diff --git a/nlvcross/init_code.lua b/nlvcross/init_code.lua
index 73dabbd..6dccede 100644
--- a/nlvcross/init_code.lua
+++ b/nlvcross/init_code.lua
@@ -14,7 +14,7 @@ F.crossings={
SF1West = 2,
SF1SouthWest = 4,
Snb=3,
- LovelaceAve = 6,
+ LovelaceAve = 5,
Onionland = 2,
PH_West = 4,
PH_WestS = 2,
diff --git a/subway/nodes/(-543,-5,-772).lua b/subway/nodes/(-543,-5,-772).lua
index 6fc7189..ce124b7 100644
--- a/subway/nodes/(-543,-5,-772).lua
+++ b/subway/nodes/(-543,-5,-772).lua
@@ -1,3 +1,3 @@
depart=false
F.stn("Wbb3N", "Rsi3N", "Leo3N", "L")
-F.stat("Line 3", false) \ No newline at end of file
+-- F.stat("Line 3", false) \ No newline at end of file