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

Jump to navigation Jump to search
(Created page with "--[==[ 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-t...")
 
No edit summary
 
Line 9: Line 9:
   print(util.arrayToString(p))
   print(util.arrayToString(p))
To inspect a particular route type, change `p` above to include the route type,
To inspect a particular route type, change `p` above to include the route type,
e.g., `p.I` and `p["US-Hist"]`.
]==]
]==]


Line 76: Line 75:
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = WM[" aux "][auxType]
local spec = WM[" aux "][auxType]
for k, v in pairs(WM) do if k:find (auxType) then if k:find ("^US") then
for k, v in pairs(WM) do if k:find (auxType) then if k:find ("^IR") then
v.shieldmain = WM.IR.shield
v.shieldmain = WM.IR.shield
v.name = spec.name .. " " .. WM.IR.name
v.name = spec.name .. " " .. WM.IR.name
Line 90: Line 89:
WM["IR-Alt-Bus"] = {
WM["IR-Alt-Bus"] = {
shield = WM.IR.shield,
shield = WM.IR.shield,
name = "Business " .. WM["US-Alt"].name,
name = "Business " .. WM["IR-Alt"].name,
link = "Ibican Route %route% Business Alternate" .. suffix,
link = "Ibican Route %route% Business Alternate" .. suffix,
abbr = "Bus. " .. WM["IR-Alt"].abbr,
abbr = "Bus. " .. WM["IR-Alt"].abbr,

Latest revision as of 20:37, 20 October 2021

Documentation for this module may be created at Module:Road data/strings/USA/WM/doc

--[==[
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,
]==]

-- West Monroe
local WM = {}

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

local suffix = " ([dab||%dab%, |]West Monroe)"
local suffix2 = " [dab||(%dab%)|]"

-- Interstate types
WM.I.link = {
	["10"] = "Interstate 10",
	["25"] = "Interstate 25",
	["30"] = "Interstate 30",
	["50"] = "Interstate 50",
	["410"] = "Interstate 410",
	["610"] = "Interstate 610",
	default = {
		hook = "split",
		split = 100,
		above = "Interstate %route% (West Monroe)",
		below = "Interstate %route% in West Monroe"
	}
}
WM.IH = WM.I

for _,auxType in ipairs({"Alt", "Express", "Future", "Local", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = WM[" aux "][auxType]
		for k, v in pairs(WM) do if k:find (auxType) then if k:find ("^I-") then 
			v.link = "Interstate %route% " .. spec.name .. suffix
		end
	end
end
WM["I-Toll"].shield = "Toll West Monroe Interstate Highway %route%.svg"
WM["I-Express"].shield = "%route% Express Lane free.svg"	
WM["I-Future"].shield = WM.I.shield
WM["I-Future"].link = WM.I.link
WM["I-Future"].banner = "Future plate blue.svg"

WM.BL.shieldmain = "Business Interstate %route% (WM).svg"
WM.BL.name = "Business " .. TX.I.name
WM.BL.link = "Interstate %route% Business" .. suffix

for k, v in pairs(WM) do if k:find ("^B%a") then 
	v.shieldmain = WM.BL.shieldmain
	v.name = WM.BL.name
	v.link = WM.BL.link
	end
end
WM["I-Bus"]=WM.BL

-- IR types
WM.IR.name = "Ibican Route %route%"
WM.IR.link = "Ibican Route %route% in West Monroe"

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

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = WM[" aux "][auxType]
		for k, v in pairs(WM) do if k:find (auxType) then if k:find ("^IR") then
			v.shieldmain = WM.IR.shield
			v.name = spec.name .. " " .. WM.IR.name
			v.link = WM.IR.base .. " " .. spec.name .. suffix
			v.abbr = WM.IR.abbr .. " " .. spec.abbrsuffix
			end
		end
	end
end
WM.IRA = WM["IR-Alt"]
WM.BU = WM["IR-Bus"]

WM["IR-Alt-Bus"] = {
	shield = WM.IR.shield,
	name = "Business " .. WM["IR-Alt"].name,
	link = "Ibican Route %route% Business Alternate" .. suffix,
	abbr = "Bus. " .. WM["IR-Alt"].abbr,
	banner = "Business alternate plate.svg",
	width = "expand",
	aux = WM[" aux "].Alt
}


-- SH (main) types
WM.SH = {
	shield = "West Monroe %route%.svg",
	shieldmain = "West Monroe %route%.svg",
	base = "West Monroe State Highway %route%",
	name = "State Highway %route%",
	link = "West Monroe State Highway %route%" .. suffix2,
	abbr = "SH&nbsp;%route%"
}
WM.WM = WM.SH

-- Loop/Spur types

WM.Loop = {
	shield = "West Monroe Loop %route%.svg",
	base = "West Monroe State Highway Loop %route%",
	name = "State Highway Loop %route%",
	link = "West Monroe State Highway Loop %route%" .. suffix2,
	abbr = "Loop&nbsp;%route%"}
WM.SL = WM.Loop

WM.Spur = {
	shield = "West Monroe Spur %route%.svg",
	base = "West Monroe State Highway Spur %route%",
	name = "State Highway Spur %route%",
	link = "West Monroe State Highway Spur %route%" .. suffix2,
	abbr = "Spur&nbsp;%route%"
}
WM.SS = WM.Spur

-- Misc SH types --
WM.Park = {
	shield = "West Monroe Park Road %route%.svg",
	link = "West Monroe Park Road %route%",
	abbr = "PR&nbsp;%route%",
	color = "hist"
}

WM["Loop Dual"] = {
	shield = {"West Monroe Loop %route%.svg", "Toll West Monroe %route% new.svg"},
	shieldmain = {"Texas Loop %route%.svg", "Toll West Monroe %route% new.svg"},
	name = WM.Loop.name,
	link = WM.Loop.link,
	abbr = WM.Loop.abbr
}

return WM
end