summaryrefslogtreecommitdiff
path: root/durt
diff options
context:
space:
mode:
Diffstat (limited to 'durt')
-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
25 files changed, 73 insertions, 29 deletions
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