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

Content deleted Content added
alt plate logic
nolink
 
(5 intermediate revisions by the same user not shown)
Line 20:
 
local suffix = " ([dab||%dab%, |]Kansas)"
local maint = "[[Kansas Department of Transportation|KSDOT]]"
 
KS[" aux "].Alt.bannerprefix = "Alt"
 
KS.I.shieldmain = "I-%route% (KS).svg"
KS.I.link = {
["135"] = "Interstate 135",
Line 35 ⟶ 31:
above = "Interstate %route% (Kansas)",
below = "Interstate %route% in Kansas"
}
}
 
for k, v in pairs(KS) do if k:find ("^I") then
KS["I 1957"].link = KS.I.link
KS["I 1961"] v.link = KS.I.link
end
end
KS["I-Alt"].banner = "Alt plate blue.svg"
 
KS.US.name = "U.S. Highway %route%"
KS.US.link = "U.S. Route %route% in Kansas"
KS.US.abbr = "US-%route%"
 
KS["US 1926"].shieldmain = "US %route% Kansas 1926.svg"
KS["US 1926"].link = KS.US.link
KS["US 1926"].name = KS.US.name
KS["US 1948"].shieldmain = "US %route% Kansas 1948.svg"
KS["US 1948"].link = KS.US.link
KS["US 1948"].name = KS.US.name
KS["US 1961"].shield = "US %route% Kansas 1962.svg"
KS["US 1961"].name = KS.US.name
KS["US 1962"] = KS["US 1961"]
KS["US 1961"].shield = "US %route% Kansas 1962.svg"
 
for _k,type v in ipairspairs({'US'}KS) do if k:find ("^US %d") then
v.name = KS.US.name
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
v.link = KS.US.link
local spec = KS[" aux "][auxType]
end
KS["US-" .. auxType] = {
end
shield = KS.US.shield,
 
shieldmain = KS.US.shieldmain,
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
name = KS.US.name .. " " .. spec.name,
local spec = KS[" aux "][auxType]
link = KS.US.base .. " " .. spec.name .. suffix,
for k, v in pairs(KS) do if k:find (auxType) then if k:find ("^US") then
abbr = KS.US.abbr .. " " .. spec.abbrsuffix,
bannerv.name = specKS.bannerprefixUS.name .. " plate.svg", .. spec.name
v.link = KS.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Kansas)"
aux = spec.aux,
v.banner = spec.banneralt .. " plate.svg"
width = "expand",
} end
end
end
end
 
KS["US-City"] = {
shield = KS.US.shield,
name = "City " .. KS.US.name,
link = "U.S. Route %route% City" .. suffix,
abbr = KS.US.abbr .. " City",
banner = "City plate.svg",
width = "expand"
}
KS["US-Hist"].shield = "" --"US %route% (KS historic).svg"
KS["US-Hist"].name = "Historic " .. KS.US.name
KS["US-Hist"].link = KS.US.link
 
KS.KSTP = {
shield = "Kansas Turnpike.svg",
name = "Kansas Turnpike",
link = "Kansas Turnpike",
abbr = "Kansas Turnpike",
bannersuffix = "blue"
}
KS.KTA = KS.KSTP
 
KS.K = {
Line 104 ⟶ 75:
abbr = "K-%route%",
width = "expand"
}
 
KS.KS = KS.K
 
for _,type in ipairs({'K', 'KS'}) do
for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
KS[type .. "K " .. year] = {
shield = format("K-%%route%% (%s).svg", year),
name = KS.K.name,
shieldmain = format("K-%%route%% (%s).svg", year),
name link = KS.K.namelink,
link abbr = KS.K.linkabbr,
abbr width = KS.K.abbr"square",
}
width = "square",
}end
end
 
KS["K 1968"].shield = {
hook = "splitlen",
Line 125 ⟶ 94:
above = "K-%route% (1968).svg",
below = KS.K.shield
}
 
KS["KS 1968"] = KS["K 1968"]
KS["KS 1962"] = KS["K 1962"]
KS["KS 1948"] = KS["K 1948"]
KS["KS 1926"] = KS["K 1926"]
 
for _,type in ipairs({'K', 'KS'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Temp", "Truck"}) do
local spec = KS[" aux "][auxType]
KS[type .. "K-" .. auxType] = {
shield = KS.K.shield,
shieldmain = KS.K.shieldmain,
Line 142 ⟶ 106:
link = KS.K.base .. " " .. spec.name .. suffix,
abbr = KS.K.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefixbanneralt .. " plate.svg",
aux = spec.aux,
width = "expand",
Line 148 ⟶ 112:
end
end
 
-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(KS) do if k:find ("^%a") then
v.maint = "[[Kansas Department of Transportation|KDOT]]"
v.browse = "Kansas State Highway System"
v.browselinks = {
[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 = {
shield = "Kansas Turnpike.svg",
name = "Kansas Turnpike",
link = "Kansas Turnpike",
abbr = "Kansas Turnpike",
bannersuffix = "blue",
maint = "[[Kansas Turnpike Authority]]"
}
KS.KTA = KS.KSTP
 
KS.Scenic = {
shield = "Kansas Scenic Byway.svg",
name = "%route%",
link = "",
abbr = "%route%",
bannersuffix = "blue",
width = "wide",
color = "hist"
}
 
KS.CR.maint = ""
 
return KS