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

Content deleted Content added
m adding in missing types
nolink
 
(27 intermediate revisions by 5 users not shown)
Line 1:
--Kansas[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
local KS = {}
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
KS.I = {shield = "I-%route%.svg",
into the Debug console:
link = "Interstate %route% (Kansas)",
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"]`.
]==]
 
-- Kansas
KS.US = {shield = "US %route%.svg",
local KS = {}
link = "U.S. Route %route% in Kansas",
abbr = "US-%route%",
width = "expand"}
KS["US 1926"] = {shield = "US %route% (1926).svg",
link = KS.US.link,
abbr = KS.US.abbr,
width = "US1926"}
 
local util = require("Module:Road data/util")
KS["US 1948"] = {shield = "US %route% (1948).svg",
local format = mw.ustring.format
link = KS.US.link,
util.addAll(KS, require("Module:Road data/strings/USA"))
abbr = KS.US.abbr,
width = "square"}
 
local suffix = " ([dab||%dab%, |]Kansas)"
KS["US 1961"] = {shield = "US %route% (1961).svg",
link = KS.US.link,
abbr = KS.US.abbr,
width = "square"}
 
KS.I.link = {
KS["US-Alt"] = {shield = KS.US.shield,
["135"] = "Interstate 135",
link = "U.S. Route %route% Alternate ([dab||%dab%, |]Kansas)",
["435"] = "Interstate 435",
abbr = "US-%route% Alt.",
["635"] = "Interstate 635 (Kansas–Missouri)",
banner = "Alt plate.svg",
["670"] = "Interstate 670 (Kansas–Missouri)",
width = "expand"}
default = {
hook = "splitlen",
split = 3,
above = "Interstate %route% (Kansas)",
below = "Interstate %route% in Kansas"
}
}
 
for k, v in pairs(KS) do if k:find ("^I") then
KS["US-Bus"] = {shield = KS.US.shield,
v.link = KS.I.link
link = "U.S. Route %route% Business ([dab||%dab%, |]Kansas)",
end
abbr = "US-%route% Bus.",
end
banner = "Business plate.svg",
KS["I-Alt"].banner = "Alt plate blue.svg"
width = "expand"}
 
KS.US.name = "U.S. Highway %route%"
KS["US-Byp"] = {shield = KS.US.shield,
KS.US.link = "U.S. Route %route% Bypass ([dab||%dab%,in |]Kansas)",
KS.US.abbr = "US-%route% Byp.",
banner = "By-pass plate.svg",
width = "expand"}
 
KS["US-City 1962"] = {shield = KS.["US.shield, 1961"]
KS["US 1961"].shield = "US %route% Kansas 1962.svg"
link = "U.S. Route %route% City ([dab||%dab%, |]Kansas)",
abbr = "US-%route% Bus.",
banner = "City plate.svg",
width = "expand"}
 
for k, v in pairs(KS) do if k:find ("^US %d") then
KS["US-Opt"] = {shield = KS.US.shield,
v.name = KS.US.name
link = "U.S. Route %route% Optional ([dab||%dab%, |]Kansas)",
v.link = KS.US.link
abbr = "US-%route% Bus.",
end
banner = "Optional plate.svg",
end
width = "expand"}
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
KS["US-Temp"] = {shield = KS.US.shield,
local spec = KS[" aux "][auxType]
link = "U.S. Route %route% Temporary ([dab||%dab%, |]Kansas)",
for k, v in pairs(KS) do if k:find (auxType) then if k:find ("^US") then
abbr = "US-%route% Bus.",
v.name = KS.US.name .. " " .. spec.name
banner = "Temporary plate.svg",
v.link = KS.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Kansas)"
width = "expand"}
v.banner = spec.banneralt .. " plate.svg"
end
end
end
end
 
KS["US-Hist"].KSTP = {shield = "Kansas" --"US %route% (KS Turnpikehistoric).svg",
KS["US-Hist"].name = "Historic " .. KS.US.name
link = "Kansas Turnpike",
KS["US-Hist"].link = KS.US.link
abbr = "Kansas Turnpike",
bannersuffix = "blue"}
 
KS.KTA = KS.KSTP
 
KS.K = {shield = "K-%route%.svg",
link = "K-%route% (Kansas highway)",
abbr = "K-%route%",
width = "expand"}
 
KS.K = {
base = "K-%route%",
shield = "K-%route%.svg",
name = "K-%route%",
link = "K-%route% ([dab||%dab% |]Kansas highway)",
abbr = "K-%route%",
width = "expand"
}
KS.KS = KS.K
 
for _,type in ipairs({'K', 'KS'}) do
KS["K 1962"] = {shield = "K-%route% (1962).svg",
for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
link = KS.K.link,
KS[type .. " " .. year] = {
abbr = KS.K.abbr,
shield = format("K-%%route%% (%s).svg", year),
width = "square"}
name = KS.K.name,
link = KS.K.link,
abbr = KS.K.abbr,
width = "square",
}
end
end
KS["K 1968"].shield = {
hook = "splitlen",
split = 3,
above = "K-%route% (1968).svg",
below = KS.K.shield
}
KS["KS 1968"] = KS["K 1968"]
 
for _,type in ipairs({'K', 'KS'}) do
KS["KS 1962"] = KS["K 1962"]
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Temp", "Truck"}) do
local spec = KS[" aux "][auxType]
KS[type .. "-" .. auxType] = {
shield = KS.K.shield,
shieldmain = KS.K.shieldmain,
name = KS.K.name .. " " .. spec.name,
link = KS.K.base .. " " .. spec.name .. suffix,
abbr = KS.K.abbr .. " " .. spec.abbrsuffix,
banner = spec.banneralt .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end
 
-- add new types above this line if you want it to have the state highway browse and maint
KS["K-Alt"] = {shield = "K-%route%.svg",
for k, v in pairs(KS) do if k:find ("^%a") then
link = "K-%route% Alternate (Kansas highway)",
v.maint = "[[Kansas Department of Transportation|KDOT]]"
abbr = "K-%route% Alt.",
v.browse = "Kansas State Highway System"
banner = "Alt plate.svg",
v.browselinks = {
width = "expand"}
[1] = "[[List of Interstate Highways in Kansas|Interstate]]",
[2] = "[[List of U.S. Highways in Kansas|US]]",
[3] = "[[List of state highways in Kansas|State]]",
[4] = "[[List of Kansas state highway spurs|Spurs]]"
}
end
end
 
KS.KSTP = {
KS["KS-Alt"] = KS["K-Alt"]
shield = "Kansas Turnpike.svg",
 
name = "Kansas Turnpike",
KS["K-Spur"] = {shield = "K-%route%.svg",
link = "K-%route% Spur (Kansas highway)Turnpike",
abbr = "K-%route%Kansas SpurTurnpike",
bannersuffix = "blue",
banner = "Spur plate.svg",
maint = "[[Kansas Turnpike Authority]]"
width = "expand"}
}
 
KS["KS-Spur"].KTA = KS["K-Spur"].KSTP
 
KS.Scenic = {
KS["K-Truck"] = {shield = "K-%route%.svg",
shield = "Kansas Scenic Byway.svg",
link = "K-%route% Truck (Kansas highway)",
abbr name = "K-%route% Truck",
link = "",
banner = "Truck plate.svg",
abbr = "%route%",
width = "expand"}
bannersuffix = "blue",
width = "wide",
KS["KS-Truck"] = KS["K-Truck"]
color = "hist"
}
 
KS.CR = {shield.maint = "CR %route% jct.svg",
link = "",
abbr = "CR-%route%"}
 
return KS