diff options
-rw-r--r-- | durt/nodes/(-1199,13,-2147).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-1264,10,-2366).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-1267,10,-2395).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-1549,11,-2597).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-1552,11,-2628).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(-1941,13,-2752).lua | 1 | ||||
-rw-r--r-- | durt/nodes/(1865,17,9141).lua | 2 | ||||
-rw-r--r-- | ers/nodes/(1655,6,1260).lua | 6 | ||||
-rw-r--r-- | il_timetable/init_code.lua | 6 | ||||
-rw-r--r-- | il_timetable/nodes/(1020,11,1021).lua | 8 | ||||
-rw-r--r-- | il_timetable/nodes/(662,14,1014).lua | 2 | ||||
-rw-r--r-- | il_timetable/nodes/(981,15,1041).lua | 9 |
12 files changed, 34 insertions, 5 deletions
diff --git a/durt/nodes/(-1199,13,-2147).lua b/durt/nodes/(-1199,13,-2147).lua new file mode 100644 index 0000000..ef42fb4 --- /dev/null +++ b/durt/nodes/(-1199,13,-2147).lua @@ -0,0 +1 @@ +if get_line() ~= "MGGR" then return end
local stop_delay = "05;00" --5 minutes
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_ars_disable(true)
atc_set_lzb_tsr(2)
atc_set_text_inside("Arriving at: Mom Junction West (TERMINUS)\n"..
"Change Here for: E1, E10, S23")
end
if event.train then
atc_send("B0 W OR")
atc_set_text_outside("MGGR to Hawking Memorial")
schedule_in(stop_delay,"depart")
end
if event.schedule then
if event.msg == "depart" then
atc_send("OC D1 R SM")
atc_set_text_inside(""..
"~~~~---~~~========~~~---~~~~\n"..
"Manaugh Great Griefing Railway\n"..
"~~~~---~~~========~~~---~~~~")
atc_set_ars_disable(false)
return
end
end
\ No newline at end of file diff --git a/durt/nodes/(-1264,10,-2366).lua b/durt/nodes/(-1264,10,-2366).lua new file mode 100644 index 0000000..dfa8179 --- /dev/null +++ b/durt/nodes/(-1264,10,-2366).lua @@ -0,0 +1 @@ +if event.train then
if get_line() ~= "MGGR" then return end
end
local stop_delay = "01;00" --1 minutes
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_ars_disable(true)
atc_set_lzb_tsr(2)
atc_set_text_inside("Arriving at: Shroomsbury")
end
if event.train then
atc_send("B0 W OR")
atc_set_text_outside("MGGR to Mom Junction West")
schedule_in(stop_delay,"depart")
end
if event.schedule then
if event.msg == "depart" then
atc_send("OC SM")
atc_set_text_inside(""..
"~~~~---~~~========~~~---~~~~\n"..
"Manaugh Great Griefing Railway\n"..
"~~~~---~~~========~~~---~~~~")
atc_set_ars_disable(false)
return
end
end
\ No newline at end of file diff --git a/durt/nodes/(-1267,10,-2395).lua b/durt/nodes/(-1267,10,-2395).lua new file mode 100644 index 0000000..d6992ab --- /dev/null +++ b/durt/nodes/(-1267,10,-2395).lua @@ -0,0 +1 @@ +if get_line() ~= "MGGR" then return end
local stop_delay = "01;00" --1 minute
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_ars_disable(true)
atc_set_lzb_tsr(2)
atc_set_text_inside("Arriving at: Shroomsbury")
end
if event.train then
atc_send("B0 W OR")
atc_set_text_outside("MGGR to Hawking Memorial")
schedule_in(stop_delay,"depart")
end
if event.schedule then
if event.msg == "depart" then
atc_send("OC SM")
atc_set_text_inside(""..
"~~~~---~~~========~~~---~~~~\n"..
"Manaugh Great Griefing Railway\n"..
"~~~~---~~~========~~~---~~~~")
atc_set_ars_disable(false)
return
end
end
\ No newline at end of file diff --git a/durt/nodes/(-1549,11,-2597).lua b/durt/nodes/(-1549,11,-2597).lua new file mode 100644 index 0000000..2de1cca --- /dev/null +++ b/durt/nodes/(-1549,11,-2597).lua @@ -0,0 +1 @@ +if event.train then
if get_line() ~= "MGGR" then return end
end
local stop_delay = "01;00" --1 minutes
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_ars_disable(true)
atc_set_lzb_tsr(1)
atc_set_text_inside("Arriving at: East Bend")
end
if event.train then
atc_send("B0 W OR")
atc_set_text_outside("MGGR to Mom Junction")
schedule_in(stop_delay,"depart")
end
if event.schedule then
if event.msg == "depart" then
atc_send("OC SM")
atc_set_text_inside(""..
"~~~~---~~~========~~~---~~~~\n"..
"Manaugh Great Griefing Railway\n"..
"~~~~---~~~========~~~---~~~~")
atc_set_ars_disable(false)
return
end
end
\ No newline at end of file diff --git a/durt/nodes/(-1552,11,-2628).lua b/durt/nodes/(-1552,11,-2628).lua new file mode 100644 index 0000000..5d0c843 --- /dev/null +++ b/durt/nodes/(-1552,11,-2628).lua @@ -0,0 +1 @@ +if get_line() ~= "MGGR" then return end
local stop_delay = "01;00" --1 minutes
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_ars_disable(true)
atc_set_lzb_tsr(1)
atc_set_text_inside("Arriving at: East Bend")
end
if event.train then
atc_send("B0 W OR")
atc_set_text_outside("MGGR to Hawking Memorial")
schedule_in(stop_delay,"depart")
end
if event.schedule then
if event.msg == "depart" then
atc_send("OC SM")
atc_set_text_inside(""..
"~~~~---~~~========~~~---~~~~\n"..
"Manaugh Great Griefing Railway\n"..
"~~~~---~~~========~~~---~~~~")
atc_set_ars_disable(false)
return
end
end
\ No newline at end of file diff --git a/durt/nodes/(-1941,13,-2752).lua b/durt/nodes/(-1941,13,-2752).lua new file mode 100644 index 0000000..063a4b7 --- /dev/null +++ b/durt/nodes/(-1941,13,-2752).lua @@ -0,0 +1 @@ +if event.train then
if get_line() ~= "MGGR" then return end
end
local stop_delay = "05;00" --5 minutes
__approach_callback_mode = 1
if event.approach and not event.has_entered then
atc_set_ars_disable(true)
atc_set_lzb_tsr(2)
atc_set_text_inside("Arriving at: Hawking Memorial\n"..
"Change Here for: E31")
end
if event.train then
atc_send("B0 W OR")
atc_set_text_outside("MGGR to Mom Junction West")
schedule_in(stop_delay,"depart")
end
if event.schedule then
if event.msg == "depart" then
atc_send("OC D1 R SM")
atc_set_text_inside(""..
"~~~~---~~~========~~~---~~~~\n"..
"Manaugh Great Griefing Railway\n"..
"~~~~---~~~========~~~---~~~~")
atc_set_ars_disable(false)
return
end
end
\ No newline at end of file diff --git a/durt/nodes/(1865,17,9141).lua b/durt/nodes/(1865,17,9141).lua index ab7f545..288f91b 100644 --- a/durt/nodes/(1865,17,9141).lua +++ b/durt/nodes/(1865,17,9141).lua @@ -1 +1 @@ -turnouts = {
{1870,11,9122},-- Southern headshunt/Goods Shed
{1863,11,9122},--Southern Roads
{1857,11,9122},
{1851,11,9122},
{1845,11,9122},
{1782,11,9222},--NW Roads
{1782,11,9216},
{1782,11,9210},
{1782,11,9204},
{1868,11,9157}, --Eastern Assembly Roads
{1860,11,9161},
{1817,11,9237},
{1817,11,9231},
{1822,11,9251}, --Northern Wye
{1817,11,9238},
{1806,11,9243},
}
routes = {
-- max# of routes = 32 (1-31 + R0)
--southern headshunt
{['matrix']={"1st"}, ['name']="Goods Shed Headshunt"}, --1
{['matrix']={"1cr"}, ['name']="West Assembly Yard"}, --2
--southern road access
{['matrix']={"2cr"}, ['name']="East S1"}, --3
{['matrix']={"2st","3cr"}, ['name']="East S2"}, --4
{['matrix']={"2st","3st","4cr"}, ['name']="East S3"}, --5
{['matrix']={"2st","3st","4st","5cr"}, ['name']="East S4"}, --6
{['matrix']={"2st","3st","4st","5st"}, ['name']="East S5"}, --7
--NW road access
{['matrix']={"6cr"}, ['name']="East N1"}, --8
{['matrix']={"6st","7cr"}, ['name']="East N2"}, --9
{['matrix']={"6st","7st","8cr"}, ['name']="East N3"}, --10
{['matrix']={"6st","7st","8st","9cr"}, ['name']="East N4"}, --11
{['matrix']={"6st","7st","8st","9st"}, ['name']="East N5"}, --12
--Eastern Assembly Roads
{['matrix']={"10st","12cr"}, ['name']="Assembly East"}, --13
{['matrix']={"10cr","11cr","12st","13cr"}, ['name']="Assembly Central"}, --14
{['matrix']={"10cr","11st","12st","13st"}, ['name']="Assembly West"}, --15
--Norther Wye
{['matrix']={"15st","14cr"}, ['name']="Assembly<->Station"}, --16
{['matrix']={"15cr","16cr"}, ['name']="Yard Loopback"}, --17
{['matrix']={"14st","16st"}, ['name']="Bypass Yard"}, --18
--testing routes
{['matrix']={"1cr","2cr","3cr","4cr","5cr"}, ['name']="[TEST]Southern Cr"}, --19
{['matrix']={"1st","2st","3st","4st","5st"}, ['name']="[TEST]Southern St"}, --20
{['matrix']={"6st","7st","8st","9st"}, ['name']="[TEST]Northern St"}, --21
{['matrix']={"6cr","7cr","8cr","9cr"}, ['name']="[TEST]Northern Cr"}, --22
}
local display = "tl1"
local debug_screen = "tl2"
function tableLength(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count
end
if event.type=="digiline" then
if event.channel=="track_control" then
local r = event.msg
if r > tableLength(routes) then
digiline_send(display,"Input ["..r.."] exceeds #routes||"..tableLength(routes))
-- digiline_send(debug_screen,"Input ["..r.."] exceeds #routes ("..tableLength(routes)..")")
return
elseif r == 0 then
digiline_send(display,"Input 0 is not defined")
-- digiline_send(debug_screen,"Input 0 is not defined")
return
end
route = routes[r]
-- a = ""
for _,v in pairs(route.matrix) do
local tid = tonumber(v:match("%d+"))
local tpos = turnouts[tid]
local turnout = {}
turnout.x = tpos[1]
turnout.y = tpos[2]
turnout.z = tpos[3]
local cmd = v:match("%a+")
-- a = a..string.format("%s %d,%d,%d\n",cmd,turnout.x,turnout.y,turnout.z)
setstate(turnout,cmd)
end
local verbose = table.concat(route.matrix," ")
digiline_send(display,"Route "..r.." set||"..verbose.."||"..route.name)
-- digiline_send(debug_screen,a)
return
end
if event.channel=="input" then --show debug info
if event.msg=="rwt_get" then
digiline_send("rwt_get",rwt.now())
elseif event.msg=="debug" then
digiline_send(debug_screen,"#turnouts: "..tableLength(turnouts).."\n#routes: "..tableLength(routes))
elseif event.msg=="occupancy_refresh" then
local m = ""
for k,v in pairs(S.yards.WOA) do
m = m..k..": "..v.car_count.."||"
end
digiline_send(debug_screen,m)
end
end
end
\ No newline at end of file +turnouts = {
{1870,11,9122},-- Southern headshunt/Goods Shed
{1863,11,9122},--Southern Roads
{1857,11,9122},
{1851,11,9122},
{1845,11,9122},
{1782,11,9222},--NW Roads
{1782,11,9216},
{1782,11,9210},
{1782,11,9204},
{1868,11,9157}, --Eastern Assembly Roads
{1860,11,9161},
{1817,11,9237},
{1817,11,9231},
{1822,11,9251}, --Northern Wye
{1817,11,9238},
{1806,11,9243},
}
routes = {
-- max# of routes = 32 (1-31 + R0)
--southern headshunt
{['matrix']={"1st"}, ['name']="Goods Shed Headshunt"}, --1
{['matrix']={"1cr"}, ['name']="West Assembly Yard"}, --2
--southern road access
{['matrix']={"2cr"}, ['name']="East S1"}, --3
{['matrix']={"2st","3cr"}, ['name']="East S2"}, --4
{['matrix']={"2st","3st","4cr"}, ['name']="East S3"}, --5
{['matrix']={"2st","3st","4st","5cr"}, ['name']="East S4"}, --6
{['matrix']={"2st","3st","4st","5st"}, ['name']="East S5"}, --7
--NW road access
{['matrix']={"6cr"}, ['name']="East N1"}, --8
{['matrix']={"6st","7cr"}, ['name']="East N2"}, --9
{['matrix']={"6st","7st","8cr"}, ['name']="East N3"}, --10
{['matrix']={"6st","7st","8st","9cr"}, ['name']="East N4"}, --11
{['matrix']={"6st","7st","8st","9st"}, ['name']="East N5"}, --12
--Eastern Assembly Roads
{['matrix']={"10st","12cr"}, ['name']="Assembly East"}, --13
{['matrix']={"10cr","11cr","12st","13cr"}, ['name']="Assembly Central"}, --14
{['matrix']={"10cr","11st","12st","13st"}, ['name']="Assembly West"}, --15
--Norther Wye
{['matrix']={"15st","14cr"}, ['name']="Assembly<->Station"}, --16
{['matrix']={"15cr","16cr"}, ['name']="Yard Loopback"}, --17
{['matrix']={"14st","16st"}, ['name']="Bypass Yard"}, --18
--testing routes
{['matrix']={"1cr","2cr","3cr","4cr","5cr"}, ['name']="[TEST]Southern Cr"}, --19
{['matrix']={"1st","2st","3st","4st","5st"}, ['name']="[TEST]Southern St"}, --20
{['matrix']={"6st","7st","8st","9st"}, ['name']="[TEST]Northern St"}, --21
{['matrix']={"6cr","7cr","8cr","9cr"}, ['name']="[TEST]Northern Cr"}, --22
}
local display = "tl1"
local debug_screen = "tl2"
function tableLength(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count
end
if event.type=="digiline" then
if event.channel=="track_control" then
local r = event.msg
if r > tableLength(routes) then
digiline_send(display,"Input ["..r.."] exceeds #routes||"..tableLength(routes))
-- digiline_send(debug_screen,"Input ["..r.."] exceeds #routes ("..tableLength(routes)..")")
return
elseif r == 0 then
digiline_send(display,"Input 0 is not defined")
-- digiline_send(debug_screen,"Input 0 is not defined")
return
end
route = routes[r]
-- a = ""
for _,v in pairs(route.matrix) do
local tid = tonumber(v:match("%d+"))
local tpos = turnouts[tid]
local turnout = {}
turnout.x = tpos[1]
turnout.y = tpos[2]
turnout.z = tpos[3]
local cmd = v:match("%a+")
-- a = a..string.format("%s %d,%d,%d\n",cmd,turnout.x,turnout.y,turnout.z)
setstate(turnout,cmd)
end
local verbose = table.concat(route.matrix," ")
digiline_send(display,"Route "..r.." set||"..verbose.."||"..route.name)
-- digiline_send(debug_screen,a)
return
end
if event.channel=="input" then --show debug info
if event.msg=="rwt_get" then
digiline_send("rwt_get",rwt.now())
elseif event.msg=="debug" then
digiline_send(debug_screen,"#turnouts: "..tableLength(turnouts).."\n#routes: "..tableLength(routes))
elseif event.msg=="occupancy_refresh" then
local m = ""
for k,v in pairs(S.yards.WOA) do
if type(v) == "table" then
m = m..k..": "..tostring(v.car_count).."||"
end
end
digiline_send(debug_screen,m)
end
end
end
\ No newline at end of file diff --git a/ers/nodes/(1655,6,1260).lua b/ers/nodes/(1655,6,1260).lua new file mode 100644 index 0000000..0cb6ef7 --- /dev/null +++ b/ers/nodes/(1655,6,1260).lua @@ -0,0 +1,6 @@ +-- luaoperatingpanel_depot_01.lua +local show_print = false +if event.type == "punch" then + F.train_info("RESETALL", show_print) + return +end
\ No newline at end of file diff --git a/il_timetable/init_code.lua b/il_timetable/init_code.lua index 2cda3a3..c9acd9e 100644 --- a/il_timetable/init_code.lua +++ b/il_timetable/init_code.lua @@ -435,7 +435,7 @@ local function is_past_station(tstn, stnorder) end return true end -local function add_train(deptime, line, train) +local function add_train(deptime, line, train, tid) local tent = {dep = deptime, text = rwt.to_string(deptime,true).." "..F.ttp[line].stn_display .." +"..train.last_delay} @@ -456,7 +456,7 @@ for _,line in ipairs(p.lines) do if train.timetable == line then if train.location == p.station and not train.actual_dep then -- the train is currently standing at this station - add_train(train.planned_dep, line, train) + add_train(train.planned_dep, line, train, id) elseif not is_past_station(train.location, sttp.station_order) then -- train is still approaching, calculate arrival time local trav_dep = rwt.add(train.initial_dep, (sttp.travel_times[p.station] or 0) + STOP_TIME) @@ -467,7 +467,7 @@ for _,line in ipairs(p.lines) do act_dep = plan_dep end end - add_train(act_dep, line, train) + add_train(act_dep, line, train, id) end end end diff --git a/il_timetable/nodes/(1020,11,1021).lua b/il_timetable/nodes/(1020,11,1021).lua new file mode 100644 index 0000000..dc3083a --- /dev/null +++ b/il_timetable/nodes/(1020,11,1021).lua @@ -0,0 +1,8 @@ +F.ttp_station_display({ + lines = {"S12_S"}, + departure = {}, + station = "Ehlodex", + title = "Ehlodex", + interval = 30, + display1 = "d", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(662,14,1014).lua b/il_timetable/nodes/(662,14,1014).lua index 4a62729..0ed504e 100644 --- a/il_timetable/nodes/(662,14,1014).lua +++ b/il_timetable/nodes/(662,14,1014).lua @@ -1,5 +1,5 @@ F.ttp_stop({ stn = "Gardon Street", - doorside = "L", + doorside = "R", only_lines={S12=true}, })
\ No newline at end of file diff --git a/il_timetable/nodes/(981,15,1041).lua b/il_timetable/nodes/(981,15,1041).lua new file mode 100644 index 0000000..ac1112f --- /dev/null +++ b/il_timetable/nodes/(981,15,1041).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"S12_S", "E1_S"}, + departure = {}, + station = "Ehlodex", + title = "Ehlodex", + interval = 30, + display1 = "d1", + display2 = "d2", +})
\ No newline at end of file |