Jump to content

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

From Wikipedia, the free encyclopedia
Content deleted Content added
alt plate
update module
Line 19: Line 19:


local suffix = " ([dab||%dab%, |]Nevada)"
local suffix = " ([dab||%dab%, |]Nevada)"
local maint = "[[Nevada Department of Transportation|NDOT]]"


NV[" common "] = {
browse = {
{link = "Highways in Nevada", bold = true},
{
noprint = true,
{link = "List of Interstate Highways in Nevada", name = "Interstate"},
{link = "List of U.S. Routes in Nevada", name = "U.S."},
{link = "List of state routes in Nevada", name = "State"},
{link = "List of Nevada Scenic Byways", name = "Scenic"}
}
}
}

NV.I.maint = maint
NV.I.link = {
NV.I.link = {
["11"] = "Interstate 11",
["11"] = "Interstate 11",
Line 46: Line 31:
}
}
}
}

for k, v in pairs(NV) do if k:find ("^I") then
NV["I 1957"].link = NV.I.link
NV["I 1961"].link = NV.I.link
v.link = NV.I.link
end
end

NV.BL.link = NV.I.base .. " Business" .. suffix
NV.BL.link = NV.I.base .. " Business" .. suffix
NV.BS.link = NV.I.base .. " Business" .. suffix


for k, v in pairs(NV) do if k:find ("^B%a") then
v.link = NV.BL.link
end
end


NV.US.maint = maint
NV.US.link = "U.S. Route %route% in Nevada"
NV.US.link = "U.S. Route %route% in Nevada"


for _,type in ipairs({'US'}) do
for k, v in pairs(NV) do if k:find ("^US %d") then
v.name = NV.US.name
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Truck"}) do
v.link = NV.US.link
local spec = NV[" aux "][auxType]
NV[type .. "-" .. auxType] = {
shield = NV[type].shield,
shieldmain = NV[type].shield,
name = NV[type].name .. " " .. spec.name,
link = NV[type].base .. " " .. spec.name .. suffix,
abbr = NV[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.banneralt .. " plate.svg",
aux = spec.aux,
width = NV[type].width,
}
end
end
end
end


for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
NV["US 1926"].shieldmain = "US %route% Nevada 1926.svg"
local spec = NV[" aux "][auxType]
NV["US 1926"].link = NV.US.link
for k, v in pairs(NV) do if k:find (auxType) then if k:find ("^US") then
NV["US 1948"].shieldmain = "US %route% Nevada 1948.svg"
v.banner = spec.banneralt .. " plate.svg"
NV["US 1948"].link = NV.US.link
v.link = NV.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Nevada)"
NV["US 1961"].link = NV.US.link
end
end
end
end


NV.SR = {
NV.SR = {
Line 84: Line 68:
abbr = "SR %route%"
abbr = "SR %route%"
}
}
NV.NV = NV.SR


NV.BLSR = {
NV.BLSR = {
Line 89: Line 74:
name = NV.SR.name,
name = NV.SR.name,
link = "",
link = "",
abbr = NV.SR.abbr
abbr = NV.SR.abbr,
nbrowse = NV.BL.nbrowse,
nbrowselinks = NV.BL.nbrowselinks
}
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(NV) do if k:find ("^%a") then
v.maint = "[[Nevada Department of Transportation|NDOT]]"
v.browse = "[[Highways in Nevada]]"
v.browselinks = {
[1] = "[[List of Interstate Highways in Nevada|Interstate]]",
[2] = "[[List of U.S. Routes in Nevada|U.S.]]",
[3] = "[[List of state routes in Nevada|State]]",
[4] = "[[List of Nevada Scenic Byways|Scenic]]"
}
end
end


NV.CC = {
NV.CC = {
Line 101: Line 101:
NV.CR.link = "County Route %route% ([county||%county% County, |]Nevada)"
NV.CR.link = "County Route %route% ([county||%county% County, |]Nevada)"


NV.NV = NV.SR


-- For linking internally on 'List of state routes in Nevada less than one mile'
-- For linking internally on 'List of state routes in Nevada less than one mile'
NV.SR2 = {
NV.SR2 = {
shield = NV.NV.shield,
shield = NV.SR.shield,
link = "#State Route %route%",
link = "#State Route %route%",
abbr = NV.SR.abbr
abbr = NV.SR.abbr

Revision as of 14:43, 23 September 2021

--[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
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
into 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"]`.
]==]

-- Nevada
local NV = {}

local util = require("Module:Road data/util")
util.addAll(NV, require("Module:Road data/strings/USA"))

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

NV.I.link = {
	["11"] = "Interstate 11",
	["215"] = "Las Vegas Beltway",
	["515"] = "Interstate 515",
	default = {
		hook = "split",
		split = 100,
		above = "Interstate %route% (Nevada)",
		below = "Interstate %route% in Nevada"
	}
}

for k, v in pairs(NV) do if k:find ("^I") then 
	v.link = NV.I.link
	end
end

NV.BL.link = NV.I.base .. " Business" .. suffix

for k, v in pairs(NV) do if k:find ("^B%a") then 
	v.link = NV.BL.link
	end
end

NV.US.link = "U.S. Route %route% in Nevada"

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

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = NV[" aux "][auxType]
		for k, v in pairs(NV) do if k:find (auxType) then if k:find ("^US") then
			v.banner = spec.banneralt .. " plate.svg"
			v.link = NV.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Nevada)"
			end
		end
	end
end

NV.SR = {
	shield = "Nevada %route%.svg",
	name = "State Route %route%",
	link = "Nevada State Route %route% [dab||(%dab%)|]",
	abbr = "SR&nbsp;%route%"
}
NV.NV = NV.SR

NV.BLSR = {
	shieldmain = {"Business Loop 80.svg", "Nevada %route%.svg"},
	name = NV.SR.name,
	link = "",
	abbr = NV.SR.abbr,
	nbrowse = NV.BL.nbrowse,
	nbrowselinks = NV.BL.nbrowselinks
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(NV) do if k:find ("^%a") then
	v.maint = "[[Nevada Department of Transportation|NDOT]]"
	v.browse = "[[Highways in Nevada]]"
	v.browselinks = {
		[1] = "[[List of Interstate Highways in Nevada|Interstate]]",
		[2] = "[[List of U.S. Routes in Nevada|U.S.]]",
		[3] = "[[List of state routes in Nevada|State]]",
		[4] = "[[List of Nevada Scenic Byways|Scenic]]"
	}
	end
end

NV.CC = {
	shield = "Clark County Route %route% NV.svg",
	name = "Clark County %route%",
	link = "Clark County %route% [dab||(%dab%)|]",
	abbr = "CC&nbsp;%route%"
}
	
NV.CR.link = "County Route %route% ([county||%county% County, |]Nevada)"


-- For linking internally on 'List of state routes in Nevada less than one mile'
NV.SR2 = {
	shield = NV.SR.shield,
	link = "#State Route %route%",
	abbr = NV.SR.abbr
}

return NV