From 6f8f7684acd4835b802255ca19af396b11a73eed Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:53:58 +0200 Subject: State at 2021-08-11 --- Crossroads/init_code.lua | 20 ++++++++++++++++---- Crossroads/nodes/(1573,6,7985).lua | 1 + Crossroads/nodes/(1580,6,7943).lua | 1 + Crossroads/nodes/(1625,6,7988).lua | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 Crossroads/nodes/(1573,6,7985).lua create mode 100644 Crossroads/nodes/(1580,6,7943).lua create mode 100644 Crossroads/nodes/(1625,6,7988).lua diff --git a/Crossroads/init_code.lua b/Crossroads/init_code.lua index 02fe6b6..68a56ff 100644 --- a/Crossroads/init_code.lua +++ b/Crossroads/init_code.lua @@ -119,7 +119,7 @@ function F.brk(dir) end -- Second version of the station function -function F.stn2gen(stn, trk, door, ret, chout) +function F.stn2gen(stn, trk, door, ret, chout, depspeed) __approach_callback_mode = 1 if not stn then return end if not trk then return end @@ -161,7 +161,7 @@ function F.stn2gen(stn, trk, door, ret, chout) else interval = 15 end - atc_send(string.format("A0B0WO%sD%dOCD1%sA1SM", door, interval, (ret and "R" or ""))) + atc_send(string.format("A0B0WO%sD%dOCD1%sA1S%s", door, interval, (ret and "R" or ""), tostring(depspeed or "M"))) local nxt = t[i][2] local intext_nxt = "" local nxtdisp = "" @@ -189,7 +189,7 @@ function F.stn2gen(stn, trk, door, ret, chout) end end if (not stop) then - atc_send(ret and "BBWRSM" or "SM") + atc_send((ret and "BBWR" or "").."S"..(depspeed or "M")) end elseif event.type == "schedule" then if atc_id then @@ -197,11 +197,15 @@ function F.stn2gen(stn, trk, door, ret, chout) if msg.intext then atc_set_text_inside(msg.intext) end - atc_send("OCD1"..(((not ret) == (not atc_arrow)) and "R" or "").."A1SM") + atc_send("OCD1"..(((not ret) == (not atc_arrow)) and "R" or "").."A1S"..(depspeed or "M")) end end end +function F.tram2gen(stn,trk,ret) + return F.stn2gen(stn,trk,"C",ret,true,4) +end + function F.disp2gen(stn) if not stn then return end if not F.stndet[stn] then return end @@ -340,6 +344,9 @@ F.stnlist = { nvbcentral = "Neverbuild Central", nvbold = "Neverbuild Old Terminus", nvboutskirts = "Neverbuild Outskirts", + ["NRG-museum"] = "Museum", + ["NRG-south"] = "New Roses Gardens South", + ["NRG-townhall"] = "Town Hall", oc = "Ocean City", occh = "Ocean City City Hall", occrt = "Ocean City CRT Office", @@ -399,6 +406,11 @@ F.lines = { [1] = { {'crch', 'U6'}, {'crbfsw', 'E'}, {'crnsw', 'R1'} }, [2] = { {'crnsw', 'R1'}, {'crbfsw', 'W'}, {'crch', 'U6'} }, }, + ["NRG1"] = { + name = "1", + ring = "counterclockwise", + [1] = { {"NRG-townhall","E"}, {"NRG-south", "N"}, {"NRG-museum","S"} }, + } } for k, v in pairs{["B"] = {6, 5, 3, 20},} do diff --git a/Crossroads/nodes/(1573,6,7985).lua b/Crossroads/nodes/(1573,6,7985).lua new file mode 100644 index 0000000..aaa21e4 --- /dev/null +++ b/Crossroads/nodes/(1573,6,7985).lua @@ -0,0 +1 @@ +F.tram2gen("NRG-museum","S",false) \ No newline at end of file diff --git a/Crossroads/nodes/(1580,6,7943).lua b/Crossroads/nodes/(1580,6,7943).lua new file mode 100644 index 0000000..34fab83 --- /dev/null +++ b/Crossroads/nodes/(1580,6,7943).lua @@ -0,0 +1 @@ +F.tram2gen("NRG-townhall","E",false) \ No newline at end of file diff --git a/Crossroads/nodes/(1625,6,7988).lua b/Crossroads/nodes/(1625,6,7988).lua new file mode 100644 index 0000000..8072a09 --- /dev/null +++ b/Crossroads/nodes/(1625,6,7988).lua @@ -0,0 +1 @@ +F.tram2gen("NRG-south","N",false) \ No newline at end of file -- cgit v1.2.3