5,005 bytes added
, 05:48, 16 July 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"]`.
]==]
-- Oklahoma
local OK = {}
local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(OK, require("Module:Road data/strings/USA"))
local suffix = " ([dab||%dab%, |]Oklahoma)"
local maint = "[[Oklahoma Department of Transportation|ODOT]]"
OK[" common "] = {
browse = {
{name = "Oklahoma State Highway System", bold = true},
{
noprint = true,
{link = "List of Interstate Highways in Oklahoma", name = "Interstate"},
{link = "List of U.S. Highways in Oklahoma", name = "U.S."},
{link = "List of state highways in Oklahoma", name = "State"},
{link = "Turnpikes of Oklahoma", name = "Turnpikes"},
}
}
}
OK.I.maint = maint
OK.I.shield = {hook = "splitlen",
split = 3,
above = "I-%route% (long).svg",
below = "I-%route%.svg"}
OK.I.link = { ["244"] = "Interstate 244",
["440"] = "Interstate 44 in Oklahoma#Interstate 440",
["444"] = "Interstate 444",
default = {hook = "splitlen",
split = 3,
above = "Interstate %route% (Oklahoma)",
below = "Interstate %route% in Oklahoma"}}
OK["I-Toll"].link = OK.I.link
OK["I-Bus"] = OK.BL
OK["I 1957"].link = OK.I.link
OK["I 1961"].link = OK.I.link
OK.BL.link = "Interstate %route% Business" .. suffix
OK.US.name = "U.S. Highway %route%"
OK.US.maint = maint
OK.US.link = "U.S. Route %route% in Oklahoma"
for _,year in ipairs({"1926", "1948", "1961"}) do
OK["US " .. year] = {
shield = format("US %%route%% (%s).svg", year),
shieldmain = format("US %%route%% Oklahoma %s.svg", year),
base = OK.US.base,
name = OK.US.name,
link = OK.US.link,
abbr = OK.US.abbr,
width = "square",
}
end
OK["US 1961"].shield = "US %route% (1961).svg"
OK["US 1961"].shieldmain = "US %route% (1961).svg"
for _,type in ipairs({'US'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = OK[" aux "][auxType]
OK[type .."-" .. auxType] = {
shield = OK[type].shield,
name = OK[type].name .. " " .. spec.name,
link = OK[type].base .. " " .. spec.name .. suffix,
abbr = OK[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end
OK["US-Spur"].banner = {
["281"] = '',
default = "Spur plate.svg"
}
OK.SH = {
base = "Oklahoma State Highway %route%",
shield = "Oklahoma State Highway %route%.svg",
name = "State Highway %route%",
link = "Oklahoma State Highway %route% [dab||(%dab%)|]",
abbr = "SH-%route%",
width = "expand"
}
OK.OK = OK.SH
for _,type in ipairs({'SH'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Loop", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = OK[" aux "][auxType]
OK[type .."-" .. auxType] = {
shield = OK[type].shield,
name = OK[type].name .. " " .. spec.name,
link = OK[type].base .. " " .. spec.name .. " [dab||(%dab%)|]",
abbr = OK[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end
OK["SH-Spur"].shield = {
["7"] = 'Oklahoma State Highway 7 Spur.svg',
default = OK.SH.shield
}
OK["SH-Spur"].banner = {
["7"] = '',
default = "Spur plate.svg"
}
OK["SH-Toll"].banner = "Toll plate yellow.svg"
OK["OK-Bus"] = OK["SH-Bus"]
OK["OK-Byp"] = OK["SH-Byp"]
OK["OK-Loop"] = OK["SH-Loop"]
OK["OK-Spur"] = OK["SH-Spur"]
OK["OK-Toll"] = OK["SH-Toll"]
OK["OK-Truck"] = OK["SH-Truck"]
for _,year in ipairs({"1924", "1948", "1961"}) do
OK["SH " .. year] = {
shield = format("Oklahoma %%route%% %s.svg", year),
name = OK.SH.name,
link = OK.SH.link,
abbr = OK.SH.abbr,
width = "square",
}
end
OK["SH 1961"].shield = {
hook = "splitlen",
split = 3,
above = "Elongated circle %route%.svg",
below = "Circle sign %route%.svg"
}
OK["SH-old"] = OK["SH 1961"]
OK["OK-old"] = OK["SH 1961"]
OK.Turnpike = {
shield = {
["Eastern Oklahoma County"] = "", -- for the time being
default = "%route% Turnpike.svg"
},
name = "%route% Turnpike",
link = "%route% Turnpike",
abbr = "%route% Turnpike"
}
OK.AR = {alias = {module = "USA/AR", type = "Hwy"}}
OK.TX = {alias = {module = "USA/TX", type = "TX"}}
OK.NM = {alias = {module = "USA/NM", type = "NM"}}
OK.CO = {alias = {module = "USA/CO", type = "SH"}}
OK.KS = {alias = {module = "USA/KS", type = "K"}}
OK.MO = {alias = {module = "USA/MO", type = "Route"}}
return OK