diff options
Diffstat (limited to 'durt/nodes')
-rw-r--r-- | durt/nodes/(-3530,8,-2267).lua | 7 | ||||
-rw-r--r-- | durt/nodes/(-3544,8,-2277).lua | 2 | ||||
-rw-r--r-- | durt/nodes/(-3588,8,-2277).lua | 2 | ||||
-rw-r--r-- | durt/nodes/(-73,2,-1984).lua | 2 | ||||
-rw-r--r-- | durt/nodes/(430,17,19).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(430,17,7).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(839,6,-1864).lua | 2 |
7 files changed, 7 insertions, 10 deletions
diff --git a/durt/nodes/(-3530,8,-2267).lua b/durt/nodes/(-3530,8,-2267).lua index cef1cec..40c32b6 100644 --- a/durt/nodes/(-3530,8,-2267).lua +++ b/durt/nodes/(-3530,8,-2267).lua @@ -1,6 +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",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 via Accelerator")
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 - -if event.msg=="emergency_ext_int" then
interrupt_pos(POS(-73,2,-1984),"go")
return
end - - -
return
end
\ No newline at end of file +--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",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 via Accelerator")
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/(-3544,8,-2277).lua b/durt/nodes/(-3544,8,-2277).lua index ba6c2bf..20c7298 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
set_rc("split_around")
if atc_arrow == true then atc_send("S0WR") end
atc_send("S0WS3")
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 +-- 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 diff --git a/durt/nodes/(-3588,8,-2277).lua b/durt/nodes/(-3588,8,-2277).lua index 9077f3c..0858265 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
split_at_index(2,"")
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("S0WRS1")
set_line(mainline_line)
set_rc(mainline_rc)
atc_set_text_outside(text_outside)
atc_set_text_inside("Loading Cargo")
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 +--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
split_at_index(2,"")
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")
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 diff --git a/durt/nodes/(-73,2,-1984).lua b/durt/nodes/(-73,2,-1984).lua index 569eab1..8c67c6d 100644 --- a/durt/nodes/(-73,2,-1984).lua +++ b/durt/nodes/(-73,2,-1984).lua @@ -1,2 +1,2 @@ -F.set_desto("E", 21) +F.set_desto("E", "U21") F.station("Dbl", "E")
\ No newline at end of file diff --git a/durt/nodes/(430,17,19).lua b/durt/nodes/(430,17,19).lua new file mode 100644 index 0000000..ed65c79 --- /dev/null +++ b/durt/nodes/(430,17,19).lua @@ -0,0 +1 @@ +local line = "S23"
if event.punch or (event.channel=="clock" and event.msg=="pulse")then
digiline_send("status_update",S.lines[line].monitoring)
end
\ No newline at end of file diff --git a/durt/nodes/(430,17,7).lua b/durt/nodes/(430,17,7).lua new file mode 100644 index 0000000..07c8260 --- /dev/null +++ b/durt/nodes/(430,17,7).lua @@ -0,0 +1 @@ +local line = "U21"
if event.punch or (event.channel=="clock" and event.msg=="pulse")then
digiline_send("status_update",S.lines[line].monitoring)
end
\ No newline at end of file diff --git a/durt/nodes/(839,6,-1864).lua b/durt/nodes/(839,6,-1864).lua index 85f60e1..6029c42 100644 --- a/durt/nodes/(839,6,-1864).lua +++ b/durt/nodes/(839,6,-1864).lua @@ -1 +1 @@ -F.terminus("Tro", "W", 21)
\ No newline at end of file +F.terminus("Tro", "W", "U21")
\ No newline at end of file |