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

Content deleted Content added
that was careless
+INC type
 
(38 intermediate revisions by 6 users not shown)
Line 1:
--[==[
--North Carolina
To inspect the content of this data module, use [[Special:ExpandTemplates]]
local NC = {}
and enter the following input text:
{{#invoke:Road data/dump|dump|module=Module:<name-of-this-module>}}
 
To inspect the content of this data module when editing, enter the following
NC.I = {shield = "I-%route%.svg",
into the Debug console:
link = "Interstate %route% (North Carolina)",
local util = require("Module:Road data/util")
abbr = "I-%route%",
print(util.arrayToString(p))
width = "expand"}
To inspect a particular route type, change `p` above to include the route type,
e.g., `p.I` and `p["US-Hist"]`.
]==]
 
-- North Carolina
NC["I-Future"] = {shield = "I-%route%.svg",
local NC = require("Module:Road data/strings/USA")
link = "Interstate %route% (North Carolina)",
abbr = "Future I-%route%",
banner = "Future plate blue.svg",
width = "expand"}
 
local util = require("Module:Road data/util")
NC.Future = NC["I-Future"]
local format = mw.ustring.format
 
local suffix = " [dab||(%dab%, North Carolina)|]"
NC.BL = {shield = "Business Loop %route%.svg",
local linksuffix2 = "Interstate %route% Business ([dab||(%dab%, )|]North Carolina)",
abbr = "I-%route% Bus.",
width = "expand"}
 
NC.I.link = {
NC.US = {shield = "US %route%.svg",
["87"] = link = "U.S.Interstate Route87 %route% [dab||(%dab%, North Carolina)|in North Carolina]",
["485"] = "Interstate 485",
abbr = "US&nbsp;%route%",
["540"] = "Interstate 540 (North Carolina)",
width = "expand"}
["785"] = "Interstate 785",
default = {
hook = "splitlen",
split = 3,
above = "Interstate %route% (North Carolina)",
below = "Interstate %route% in North Carolina"
}
}
 
for k, v in pairs(NC) do if k:find ("^I") then
NC["US 1926"] = {shield = "US %route% North Carolina 1926.svg",
v.link = NC.USI.link,
end
abbr = NC.US.abbr,
end
width = "US1926"}
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.BL.link = "Interstate %route% Business ([dab||%dab%, |]North Carolina)"
NC["US 1948"] = {shield = "US %route% (1948).svg",
link = NC.US.link,
abbr = NC.US.abbr}
NC["US 1950"] = {shield = "US %route% North Carolina 1950.svg",
link = NC.US.link,
abbr = NC.US.abbr}
 
for k, v in pairs(NC) do if k:find ("^BL") then
NC["US-Alt"] = {shield = NC.US.shield,
v.link = NC.BL.link
link = "U.S. Route %route% Alternate ([dab||%dab%, |]North Carolina)",
end
abbr = "US&nbsp;%route% Alt.",
end
banner = "Alternate plate.svg",
width = "expand"}
 
NC.US.name = "U.S. Highway %route%"
NC["US-Bus"] = {shield = NC.US.shield,
NC.US.link = {
link = "U.S. Route %route% Business ([dab||%dab%, |]North Carolina)",
["17-1"] = "U.S. Route 17-1" .. suffix,
abbr = "US&nbsp;%route% Bus.",
["74"] = "U.S. Route 74" .. suffix,
banner = "Business plate.svg",
["117"] = "U.S. Route 117" .. suffix,
width = "expand"}
["158"] = "U.S. Route 158" .. suffix,
["178"] = "U.S. Route 178" .. suffix,
["258"] = "U.S. Route 258" .. suffix,
["264"] = "U.S. Route 264" .. suffix,
["276"] = "U.S. Route 276" .. suffix,
["311"] = "U.S. Route 311" .. suffix,
["321"] = "U.S. Route 321" .. suffix,
["401"] = "U.S. Route 401" .. suffix,
["521"] = "U.S. Route 521" .. suffix,
["601"] = "U.S. Route 601" .. suffix,
default = "U.S. Route %route% [dab||(%dab%, North Carolina)|in North Carolina]"
}
 
for k, v in pairs(NC) do if k:find ("^US %d") then
NC["US-Byp"] = {shield = NC.US.shield,
v.name = NC.US.name
link = "U.S. Route %route% Bypass ([dab||%dab%, |]North Carolina)",
v.link = NC.US.link
abbr = "US&nbsp;%route% Byp.",
end
banner = "By-pass plate.svg",
end
width = "expand"}
 
NC["US-Conn 1950"] = {shield = NC.US.shield,
link shield = "U.S. RouteUS %route% Connector ([dab||%dab%, |]North Carolina) 1950.svg",
name = NC.US.name,
abbr = "US&nbsp;%route% Conn.",
link = NC.US.link,
banner = "Connector plate.svg",
abbr = NC.US.abbr,
width = "expand"}
width = "square",
}
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
NC["US-Truck"] = {shield = NC.US.shield,
local spec = NC[" aux "][auxType]
link = "U.S. Route %route% Truck ([dab||%dab%, |]North Carolina)",
for k, v in pairs(NC) do if k:find (auxType) then if k:find ("^US") then
abbr = "US&nbsp;%route% Truck",
v.name = NC.US.name .. " " .. spec.name
banner = "Truck plate.svg",
v.link = NC.US.base .. " " .. spec.name .. " ([dab||%dab%, |]North Carolina)"
width = "expand"}
end
end
end
end
 
NC["US-Toll-Byp"] = {
NC.NC = {shield = "NC %route%.svg",
shield = NC.US.shield,
link = "North Carolina Highway %route% [dab||(%dab%)|]",
name = NC["US-Byp"].name,
abbr = "NC&nbsp;%route%"}
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"] = {
NC["NC 1921"] = {shield = "NC %route% 1945.svg",
link shield = NC.NCUS.linkshield,
name = NC["US-Bus"].name .. " Truck",
abbr = NC.NC.abbr}
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
NC["NC 1945"] = NC["NC 1921"]
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local type = "US " .. year
NC["NC 1949"] = {shield = "NC %route% 1957.svg",
local spec = NC[" aux "][auxType]
link = NC.NC.link,
NC[type .. "-" .. auxType] = {
abbr = NC.NC.abbr}
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
NC["NC 1957"] = NC["NC 1949"]
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-Bus"] = {shield = NC.NC.shield,
link base = "North Carolina Highway %route% Business [dab||(%dab%)|]",
abbr shield = "NC&nbsp; %route% Bus.svg",
shieldmain = {
banner = "Business plate.svg"}
["106"] = {"Georgia 246.svg", "NC %route%.svg"},
default = "NC %route%.svg",
},
name = {
default = "North Carolina Highway %route%",
["106"] = "Georgia State Route 246 and<br>North Carolina Highway %route%"
},
link = "North Carolina Highway %route% [dab||(%dab%)|]",
abbr = "NC&nbsp;%route%",
width = "square"
}
 
for _,type in ipairs({"NC"}) do
NC["NC-Byp"] = {shield = NC.NC.shield,
for _,year in ipairs({"1945", "1957"}) do
link = "North Carolina Highway %route% Bypass [dab||(%dab%)|]",
NC["NC " .. year] = {
abbr = "NC&nbsp;%route% Byp.",
shield = format("NC %%route%% %s.svg", year),
banner = "By-pass plate.svg"}
name = NC.NC.base,
name = NC.NC.name,
link = NC.NC.link,
abbr = NC.NC.abbr,
width = "square"
}
end
end
NC["NC 1921"] = NC["NC 1945"]
NC["NC 1949"] = NC["NC 1957"]
 
for _,type in ipairs({'NC'}) do
NC["NC-Conn"] = {shield = NC.NC.shield,
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
link = "North Carolina Highway %route% Connector [dab||(%dab%)|]",
local spec = NC[" aux "][auxType]
abbr = "NC&nbsp;%route% Conn.",
NC["NC-" .. auxType] = {
banner = "Connector plate.svg"}
shield = NC.NC.shield,
NC["NC-Spur"] = {shield shieldmain = NC.NC.shieldshieldmain,
link name = "North Carolina Highway %route%" Spur.. " [dab||(%dab%)|]" .. spec.name,
link = NC.NC.base .. " " .. spec.name .. suffix2,
abbr = "NC&nbsp;%route% Spur",
abbr = NC.NC.abbr .. " " .. spec.abbrsuffix,
banner = "Spur plate.svg"}
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
NC["NC-Toll"] = {shield = NC.NC.shield,
link width = NC.NC.link,width
}
abbr = "NC&nbsp;%route% Toll",
end
banner = "Toll plate yellow.svg"}
end
NC["NC-Toll"].banner = "Toll plate yellow.svg"
 
NC.NCBR = {
NC["NC-Truck"] = {shield = NC.NC.shield,
link shield = "NorthUS Carolina HighwayBike %route% Truck [dab||(%dab%M1-8)|].svg",
name = {
abbr = "NC&nbsp;%route% Truck",
["LN"] = "Lake Norman Bicycle Route",
banner = "Truck plate.svg"}
["PL"] = "Pottery Loop",
default = "North Carolina Bicycle Route %route%"
},
link = "North Carolina Bicycle Route %route%",
abbr = "NC Bike Route %route%",
orientation = "upright"
}
 
NC.NCBRSR = {shield abbr = "US Bike SR&nbsp;%route% (M1-8).svg",}
NC.Sec = NC.SR
link = "North Carolina Bicycle Route %route%",
abbr = "NC Bike Route %route%"}
 
NC.INC = {
NC.USBR = {shield = "US Bike %route% (M1-9).svg",
shield = {NC.I.shield, NC.NC.shield},
link = "U.S. Bicycle Route %route%",
shieldmain = {NC.I.shieldmain, NC.NC.shield},
abbr = "U.S. Bike Route %route%"}
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 = {
shield = "Charlotte Route %route% shield.svg",
name = "Charlotte Route %route%",
link = "Charlotte Route %route%",
abbr = "Charlotte Route&nbsp;%route%"
}
 
return NC