Module:Road data/strings/USA/NC: Difference between revisions

Content deleted Content added
Undid revision 1031874542 by Fredddie (talk)
+INC type
 
(19 intermediate revisions by 3 users not shown)
Line 13:
 
-- North Carolina
local NC = {}require("Module:Road data/strings/USA")
 
local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(NC, require("Module:Road data/strings/USA"))
 
local suffix = " [dab||(%dab%, North Carolina)|]"
local suffix2 = " [dab||(%dab%)|]"
local maint = "[[North Carolina Department of Transportation|NCDOT]]"
 
NC.I.link = {
["87"] = "Interstate 87 (North Carolina)",
["485"] = "Interstate 485",
["540"] = "Interstate 540 and (North Carolina Highway 540)",
["785"] = "Interstate 785",
default = {
Line 34:
}
 
for k, v in pairs(NC) do if k:find ("^I") then
NC["I-Future"].shield = "I-%route%.svg"
NC["I-Future"] v.link = NC.I.link
end
end
NC["Future"].shield = "I-%route%.svg"
NC["I-Future"].shield = NC["Future"].shield
NC["Future"].shieldmain = NC["Future"].shield
NC["I-Future"].shieldmain = NC["Future"].shield
NC["I-Future"].banner = "Future plate blue.svg"
 
NC.Future = NC["I-Future"]
 
NC.BL.link = "Interstate %route% Business ([dab||%dab%, |]North Carolina)"
 
for k, v in pairs(NC) do if k:find ("^BL") then
v.link = NC.BL.link
end
end
 
NC.US.name = "U.S. Highway %route%"
Line 60 ⟶ 69:
}
 
for k, v in pairs(NC) do if k:find ("^US %d") then
NC["US 1926"].shieldmain = "US %route% North Carolina 1926.svg"
NC["US 1926"] v.name = NC.US.name
NC["US 1926"] v.link = NC.US.link
end
NC["US 1948"].shieldmain = "US %route% North Carolina 1948.svg"
end
NC["US 1948"].name = NC.US.name
NC["US 1948"].link = NC.US.link
NC["US 1961"].shield = "US %route% North Carolina 1950.svg"
NC["US 1961"].name = NC.US.name
NC["US 1961"].link = NC.US.link
NC["US 1950"] = NC["US 1961"]
 
NC["US-Toll 1950"] = {
shield = NC."US %route% North Carolina 1950.shieldsvg",
name = NC.US.name,
link = NC.US.link,
abbr = NC.US.abbr,
bannerwidth = "Toll plate yellow.svgsquare",
width = "expand"
}
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = NC[" aux "][auxType]
for k, v in pairs(NC) do if k:find (auxType) then if k:find ("^US") then
v.name = NC.US.name .. " " .. spec.name
v.link = NC.US.base .. " " .. spec.name .. " ([dab||%dab%, |]North Carolina)"
end
end
end
end
 
NC["US-Toll-Byp"] = {
shield = NC.US.shield,
name = NC.["US-Byp"].name .. " Bypass",
link = NC["US-Byp"].link,
abbr = NC["US-Byp"].abbr,
banner = "By-pass plate white and toll plate yellow.svg",
width = "expand",
aux = NC[" aux "].Byp
}
 
NC["US-Bus-Truck"] = {
shield = NC.US.shield,
name = NC["US-Bus"].name .. " Truck",
link = NC["US-Bus"].link,
abbr = NC["US-Bus"].abbr.. " Truck",
banner = "Truck business plate.svg",
width = "expand",
aux = NC[" aux "].Truck
}
 
for _,year in ipairs({'1926', '1948', '1961'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local type = "US " .. year
local spec = NC[" aux "][auxType]
NC[type .. "-" .. auxType] = {
shield = NC[type].shield,
shieldmain = NC[type].shieldmain,
name = NC[type].name .. " " .. spec.name,
link = NC[type].base .. " " .. spec.name .. suffix,
abbr = NC[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate " .. year .. ".svg",
aux = spec.aux,
width = "square",
nbrowse = NC.US.nbrowse,
nbrowselinks = NC.US.nbrowselinks
}
end
end
 
for _,type in ipairs({'US 1950'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = NC[" aux "][auxType]
NC[type .. "-" .. auxType] = {
shield = NC[type].shield,
shieldmain = NC[type].shieldmain,
name = NC[type].name .. " " .. spec.name,
link = NC.US.base .. " " .. spec.name .. suffix,
abbr = NC[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate 1948.svg",
aux = spec.aux,
width = "square",
nbrowse = NC.US.nbrowse,
nbrowselinks = NC.US.nbrowselinks
}
end
end
 
NC.NC = {
Line 97 ⟶ 158:
},
name = {
["106"] = "Georgia State Route 246 and<br>North Carolina Highway %route%",
default = "North Carolina Highway %route%",
["106"] = "Georgia State Route 246 and<br>North Carolina Highway %route%"
},
link = "North Carolina Highway %route% [dab||(%dab%)|]",
Line 105 ⟶ 166:
}
 
for _,type in ipairs({"NC"}) do
NC["NC 1921"] = {
for _,year in ipairs({"1945", "1957"}) do
shield = "NC %route% 1945.svg",
NC["NC " .. year] = {
name = NC.NC.base,
shield = format("NC %%route%% %s.svg", year),
link = NC.NC.link,
abbr name = NC.NC.abbrbase,
name = NC.NC.name,
}
NC["NC 1945"] link = NC[".NC 1921"] .link,
abbr = NC.NC.abbr,
width = "square"
NC["NC 1949"] = {
}
shield = "NC %route% 1957.svg",
end
name = NC.NC.base,
end
link = NC.NC.link,
abbrNC["NC 1921"] = NC.["NC.abbr 1945"]
NC["NC 1949"] = NC["NC 1957"]
}
NC["NC 1957"] = NC["NC 1949"]
 
for _,type in ipairs({'US', 'NC'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = NC[" aux "][auxType]
NC[type .. "NC-" .. auxType] = {
shield = NC[type].NC.shield,
shieldmain = NC[type].shieldNC.shieldmain,
name = NC[type].base"North Carolina Highway %route%" .. " " .. spec.name,
link = NC[type].NC.base .. " " .. spec.name .. NC[" dab "]suffix2,
abbr = NC[type].NC.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = NC[type].NC.width
}
end
end
NC["NC-Toll"].banner = "Toll plate yellow.svg"
 
NC.NCBR = {
NC["US-Alt"].link = NC.US.base .. " Alternate" .. suffix
shield = "US Bike %route% (M1-8).svg",
NC["US-Bus"].link = NC.US.base .. " Business" .. suffix
name = {
NC["US-Conn"].link = NC.US.base .. " Connector" .. suffix
["LN"] = "Lake Norman Bicycle Route",
NC["US-Truck"].link = NC.US.base .. " Truck" .. suffix
["PL"] = "Pottery Loop",
 
default = "North Carolina Bicycle Route %route%"
NC["US 1950-Alt"] = {
},
shield = NC["US 1950"].shield,
link = "North Carolina Bicycle Route %route%",
name = NC["US 1950"].name,
abbr = "NC Bike Route %route%",
link = NC["US 1950"].link,
orientation = "upright"
abbr = NC["US 1950"].abbr,
banner = "Alternate plate.svg",
}
 
NC.SR = { abbr = "SR&nbsp;%route%"}
NC["NC-Toll"] = {
shieldNC.Sec = NC.NC.shield,SR
 
name = NC.NC.base,
NC.INC = {
link = NC.NC.link,
abbrshield = {NC.NCI.abbrshield, NC.NC. " Toll"shield},
shieldmain = {NC.I.shieldmain, NC.NC.shield},
banner = "Toll plate yellow.svg"
name = NC.I.name .. " and " .. NC.NC.name.default,
link = "Interstate %route% (North Carolina)",
abbr = "I-%route% / NC &route%",
bannersuffix = {"blue", ""}
}
 
-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(NC) do if k:find ("^%a") then
v.maint = "[[North Carolina Department of Transportation|NCDOT]]"
end
end
 
NC.Charlotte = {
Line 164 ⟶ 234:
abbr = "Charlotte Route&nbsp;%route%"
}
 
NC.BRP = {
shield = "Blue Ridge Parkway shield.png",
name = "Blue Ridge Parkway",
link = "Blue Ridge Parkway",
abbr = "Blue Ridge Parkway"}
 
NC.NCBR = {
shield = "US Bike %route% (M1-8).svg",
link = "North Carolina Bicycle Route %route%",
abbr = "NC Bike Route %route%",
orientation = "upright"
}
 
NC.SR = { abbr = "SR&nbsp;%route%"}
 
NC.Sec = NC.SR
 
return NC