Changes

Pywikibot 6.4.0
--[==[
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"]`.
]==]

-- Delaware
local DE = {}

local util = require("Module:Road data/util")
util.addAll(DE, require("Module:Road data/strings/USA"))
local format = mw.ustring.format

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

DE.I.link = "Interstate %route% (Delaware)"

DE["I 1957"].link = DE.I.link
DE["I-Toll"].link = DE.I.link

DE.US.link = "U.S. Route %route% in Delaware"

DE["US-Alt"].link = "U.S. Route %route% Alternate" .. suffix
DE["US-Bus"].link = "U.S. Route %route% Business" .. suffix
DE["US-Byp"].link = "U.S. Route %route% Bypass" .. suffix
DE["US-Truck"].link = "U.S. Route %route% Truck" .. suffix

DE["US-Toll"] = {
shield = DE.US.shield,
shieldmain = DE.US.shield,
link = DE.US.link,
abbr = DE.US.abbr,
width = "expand",
banner = "Toll plate yellow.svg"
}

DE["US 1926"].shieldmain = "US %route% Delaware 1926.svg"
DE["US 1926"].link = DE.US.link
DE["US 1948"].shieldmain = "US %route% Delaware 1948.svg"
DE["US 1948"].link = DE.US.link
DE["US 1961"].link = DE.US.link

DE["US 1961-Alt"] = { shield = DE["US 1961"].shield,
link = DE["US-Alt"].link,
abbr = DE["US-Alt"].abbr,
banner = "Alt plate.svg"}

DE["US 1961-Byp"] = { shield = DE["US 1961"].shield,
link = DE["US-Byp"].link,
abbr = DE["US-Byp"].abbr,
banner = "By-pass plate.svg"}

DE["US 1948-Alt"] = { shield = DE["US 1948"].shield,
shieldmain = DE["US 1948"].shieldmain,
link = DE["US-Alt"].link,
abbr = DE["US-Alt"].abbr,
banner = "Alt plate.svg",
width = "US1926"}

DE.SR = {
base = "Delaware Route %route%",
shield = {
hook = "splitlen",
split = 3,
above = "Ellipse sign %route%.svg",
below = "Elongated circle %route%.svg"
},
shieldmain = {
["261"] = {"Ellipse sign %route%.svg", "PA-%route%.svg"},
default = {
hook = "splitlen",
split = 3,
above = "Ellipse sign %route%.svg",
below = "Elongated circle %route%.svg"
}
},
name = {
["261"] = "Route %route%",
default = "Delaware Route %route%"
},
link = "Delaware Route %route% [dab||(%dab%)|]",
abbr = "DE&nbsp;%route%",
width = "expand"
}

DE.DE = DE.SR

for _,type in ipairs({'SR'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = DE[" aux "][auxType]
DE["SR-" .. auxType] = {
shield = DE.SR.shield,
shieldmain = DE.SR.shield,
name = DE.SR.name.default .. " " .. spec.name,
link = DE.SR.base .. " " .. spec.name .. DE[" dab "],
abbr = DE.SR.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end

DE["DE-Alt"] = DE["SR-Alt"]
DE["DE-Bus"] = DE["SR-Bus"]
DE["DE-Truck"] = DE["SR-Truck"]

DE["SR-Toll"] = {shield = DE.DE.shield,
name = DE.SR.name.default .. " Toll",
link = DE.DE.link,
abbr = "DE&nbsp;%route% Toll",
banner = "Toll plate yellow.svg",
width = "expand"}

DE["DE-Toll"] = DE["SR-Toll"]

for _,year in ipairs({"1926", "1955", "1964", "1970", "1978"}) do
DE["SR " .. year] = {
shield = format("Delaware %%route%% %s.svg", year),
shieldmain = format("Delaware %%route%% %s.svg", year),
name = DE.SR.name.default,
link = DE.SR.link,
abbr = DE.SR.abbr,
width = "square",
}
end

DE["SR 1978"].shield = {
hook = "splitlen",
split = 3,
below = "Circle sign %route%.svg",
above = "Elongated circle %route%.svg"
}
DE["SR 1978"].shieldmain = DE.SR.shield
DE["SR 1978"].width = DE.SR.width

DE["DE 1978"] = DE["SR 1978"]

DE["SR 1978-Alt"] = { shield = DE["SR 1978"].shield,
name = DE["SR-Alt"].name,
link = DE["SR-Alt"].link,
abbr = DE["SR-Alt"].abbr,
banner = "Alt plate.svg",
width = "expand"}

DE["DE 1978-Alt"] = DE["SR 1978-Alt"]


DE["SR 1970"].shield = "Circle sign %route%.svg"
DE["SR 1970"].shieldmain = DE["SR 1970"].shield

DE["DE 1970"] = DE["SR 1970"]

DE["DE 1964"] = DE["SR 1964"]

DE["SR 1955"].orientation = "upright"

DE["DE 1955"] = DE["SR 1955"]

DE["SR 1926"].orientation = "upright"

DE["DE 1926"] = DE["SR 1926"]

DE.DETP = {
shield = "Delaware Turnpike logo.gif",
shieldmain = "Delaware Turnpike logo.gif",
name = "Delaware Turnpike",
link = "Delaware Turnpike",
abbr = "Delaware Turnpike",
width = 29
}

DE.NJTP = {alias = {module = "USA/NJ", type = "NJTP"}}

DE.DEMD = {
shield = {"MD Route %route%.svg", DE.SR.shield},
shieldmain = {"MD Route %route%.svg", DE.SR.shield},
name = "Route %route%",
link = "Route %route% (Delaware–Maryland)",
abbr = "Route&nbsp;%route%",
width = 40
}

DE.MD = {alias = {module = "USA/MD", type = "MD"}}

DE.SBR = {
shield = "US Bike %route% (M1-8).svg",
shieldmain = "US Bike %route% (M1-8).svg",
name = "Bike Route %route%",
link = "Delaware Bicycle Route %route%",
abbr = "Bike Route %route%",
orientation = "upright"
}

return DE