diff options
Diffstat (limited to 'Crossroads/init_code.lua')
-rw-r--r-- | Crossroads/init_code.lua | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/Crossroads/init_code.lua b/Crossroads/init_code.lua index d1333fc..692f0c5 100644 --- a/Crossroads/init_code.lua +++ b/Crossroads/init_code.lua @@ -177,7 +177,13 @@ function F.stn2gen(stn, trk, door, ret, chout, depspeed) t[i][6] = t[i][6] and (t[i][6]+timenow-t[i][5]+30)/2 or (timenow-t[i][5]) t[i][5] = timenow atc_set_text_inside(intext) - if chout then atc_set_text_outside(outtext) end + if chout then + if type(chout) == "string" then + atc_set_text_outside(chout) + else + atc_set_text_outside(outtext) + end + end S.trains[atc_id] = { v = 2, l = (get_line() or ""), @@ -328,11 +334,13 @@ F.stnlist = { crch = "Crossroads City Hall", crchs = "City Hall South", crmtrail = "Mountain Railway Terminus", + crshelter1 = "Shelter I", + crsfterm = "South Forest St. Terminal", crsmacker = "Smacker's Station", - crwm = "CR West Mountains", - elchateau = "Erstaziland-Chateau d'Erstazi", - elgp = "Erstaziland-Greener Pastures", - elsf = "Erstaziland-Salt Factory", + crwm = "West Mountains", + elchateau = "Chateau d'Erstazi", + elgp = "Greener Pastures", + elsf = "Salt Factory", evo = "EVO", grsc = "Grassy Scarp", mushroom = "Mushroom Land", @@ -387,8 +395,8 @@ F.lines = { name = "ATL-Z", short = "ATL-Z", ring = false, interval = 480, - [1] = { {"Bts","3"}, {"evo","N/A"}, {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"oc","N"}, {"elgp","N"}, {"elsf","E"}, {"elchateau","S"} }, - [2] = { {"elchateau","S"}, {"elsf","W"}, {"elgp","S"}, {"oc","S"}, {"scn","S1"}, {"scc", "S1"}, {"scs","S1"}, {"evo","N/A"}, {"Bts","3"}, }, + [1] = { {"Bts","3"}, {"evo","N/A"}, {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"oc","K1"}, --[[{"elgp","N"}, {"elsf","E"}, {"elchateau","S"}]] }, + [2] = { --[[{"elchateau","S"}, {"elsf","W"}, {"elgp","S"},]] {"oc","K1"}, {"scn","S1"}, {"scc", "S1"}, {"scs","S1"}, {"evo","N/A"}, {"Bts","3"}, }, }, ["CRT1"] = { name = "1", @@ -396,6 +404,28 @@ F.lines = { [1] = { {"crsmacker", "R3"}, --[[{"crch", "U1"},]] {"crchs", "W"}, {"cras", "N"} }, [2] = { {"cras", "N"}, {"crchs", "E"}, --[[{"crch", "U2"},]] {"crsmacker", "R3"} }, }, + ["CRT4"] = { + name = "4", + ring = false, + rtt = 120, + interval = 60, + [1] = { {"crch", "11", 0}, {"crsfterm", "1N", 0}, }, + [2] = { {"crsfterm", "1N", 0}, {"crch", "11", 0}, }, + }, + ["CRT12"] = { + name = "12", + ring = false, + [1] = {{"crch", "M"}, {"crwm", "3"}}, + [2] = {{"crwm", "3"}, {"crch", "M"}}, + }, + ["CRT21"] = { + name = "21", + ring = false, + rtt = 120, + interval = 120, + [1] = { {"crch", "12", 15}, {"crshelter1", "T", 75}, }, + [2] = { {"crshelter1", "T", 75}, {"crch", "12", 15}, }, + }, ["NRG1"] = { name = "1", ring = "counterclockwise", @@ -425,12 +455,15 @@ end for k, v in pairs{["A"] = {5}, ["B"]={6}, ["C"]={7}, ["D"]={8}} do local t = {} local u = {} + local phase = ((v[1]-5)%2)*15 + t[1] = {"crsfterm", (v[1]-4).."S", phase} for i = 1, 5, 2 do t[#t+1] = {string.format("crs_%d_%d",v[1],i), "E", 0} end for i = 5, 1, -2 do u[#u+1] = {string.format("crs_%d_%d",v[1],i), "W", 0} end + u[#u+1] = {"crsfterm", (v[1]-4).."S", phase} F.lines["CRT3"..k] = { name = "3"..k, ring = false, rtt = 30, interval = 30, [1] = t, [2] = u, |