Module:Road data/strings/USA/NY explained

--[==[ To inspect the content of this data module, use [[Special:ExpandTemplates]]and enter the following input text:

To inspect the content of this data module when editing, enter the followinginto the Debug console: local util = require("Module:Road data/util") print(util.arrayToString(p))To inspect a particular route type, change `p` above to include the route type,e.g., `p.I` and `p["US-Hist"]`.]

]

-- New Yorklocal NY =

local util = require("Module:Road data/util")local format = mw.ustring.formatutil.addAll(NY, require("Module:Road data/strings/USA"))

local suffix = " ([dab||%dab%, |]New York)"

NY.I.link = "Interstate %route% (New York)"

for k, v in pairs(NY) do if k:find ("^I") then v.link = NY.I.link endend NY.BL.link = "Interstate %route% Business ([dab||%dab%, |]New York)"

for k, v in pairs(NY) do if k:find ("^BL") then v.link = NY.BL.link endend

NY.US.shield = NY.US.shieldmain = NY.US.shieldNY.US.link = "U.S. Route %route% in New York"

for k, v in pairs(NY) do if k:find ("^US %d") then v.name = NY.US.name v.link = NY.US.link endend

for _,auxType in ipairs do local spec = NY[" aux "][auxType] for k, v in pairs(NY) do if k:find (auxType) then if k:find ("^US") then v.shield = NY.US.shield v.shieldmain = NY.US.shieldmain v.link = NY.US.base .. " " .. spec.name .. " ([dab||%dab%, |]New York)" end end endend

for _,year in ipairs do for _,auxType in ipairs do local type = "US " .. year local spec = NY[" aux "][auxType] NY[type .. "-" .. auxType] = endend

NY.NY = NY.SR = NY.NY

NY.Ref = for _,year in ipairs do NY["NY " .. year] = end

for _,type in ipairs do for _,auxType in ipairs do local spec = NY[" aux "][auxType] NY["NY-" .. auxType] = endend

local pkwys = local pkwyShields = local pkwyAbbrs = local pkwyLIPkwys = local pkwyLIStatePkwys = for _,pkwy in ipairs(pkwyLIStatePkwys) do table.insert(pkwyLIPkwys, pkwy) table.insert(pkwys["State Parkway"], pkwy)endlocal pkwyPIPPkwys = for _,pkwy in ipairs(pkwys.Road) do table.insert(pkwyPIPPkwys, pkwy)endNY.Parkway = for suffix,list in pairs(pkwys) do local abbrSuffix = pkwyAbbrs[suffix] or suffix for abbr,pkwy in pairs(list) do if type(abbr)

"number" then abbr = pkwy end if suffix

"" then NY.Parkway.name[abbr] = pkwy NY.Parkway.link[abbr] = pkwy NY.Parkway.abbr[abbr] = pkwy else NY.Parkway.name[abbr] = pkwy .. " " .. suffix NY.Parkway.link[abbr] = pkwy .. " " .. suffix if abbrSuffix ~= "Parkway" then NY.Parkway.abbr[abbr] = abbr .. " " .. abbrSuffix end end endendfor _,pkwy in ipairs(pkwyLIPkwys) do NY.Parkway.bannersuffix[pkwy] = ""endfor _,pkwy in ipairs(pkwyPIPPkwys) do NY.Parkway.bannersuffix[pkwy] = "brown"end

NY.SBR =

NY.LSEX =

NY.STE =

-- add new types above this line if you want it to have the state highway browsefor k, v in pairs(NY) do if k:find ("^%a") then v.maint = "NYSDOT" endend

for k, v in pairs(NY) do if k:find ("^%a+ %d") then v.maint = "NYSDH" endend NY.NYST =

NY.NYBC =

NY.CR.name = NY.CR.shield = NY.CR.shieldmain = NY.CR.link = "County Route %route% (%county% County, New York)" --ifexistNY.CR.width = NY.CR.bannersuffix = NY.CR.browse = "County Routes in New York"NY.CR.browselinks = "County Routes in %county% County"

NY["CR-Truck"] =

NY["CR-Old"] =

-- add new types above this line if you want it to have the state highway browsefor k, v in pairs(NY) do if k:find ("CR") then v.maint = "%county% County Highway Department" endend NY.ILR =

NY.GSP = NY.CT = NY.MATP = NY.NJ = NY.PA = NY.VT = NY["I-VT"] = NY["QC-A"] = NY.ON =

return NY