Module:Road data/strings/USA/MA

From the AARoads Wiki: Read about the road before you go
Jump to navigation Jump to search

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

-- Massachusetts
local MA = {}

local util = require("Module:Road data/util")
util.addAll(MA, require("Module:Road data/strings/USA"))

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

MA.I.link = "Interstate %route% (Massachusetts)"

for k, v in pairs(MA) do if k:find ("^I") then 
	v.link = MA.I.link
	end
end
	      
MA.BL.link = "Interstate %route% Business ([dab||%dab%, |]Massachusetts)"

for k, v in pairs(MA) do if k:find ("^BL") then 
	v.link = MA.BL.link
	end
end

         
MA.US.link = "U.S. Route %route% in Massachusetts"for k, v in pairs(MA) do if k:find ("^US %d") then 
	v.link = MA.US.link
	end
end

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = MA[" aux "][auxType]
		for k, v in pairs(MA) do if k:find (auxType) then if k:find ("^US") then
			v.link = MA.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Massachusetts)"
			end
		end
	end
end

MA.Route = {
	shield = "MA Route %route%.svg",
	shieldmain = {
		["71"] = {"MA Route %route%.svg", "NY-%route%.svg"},
		["121"] = {"MA Route %route%.svg", "Rhode Island %route%.svg"},
		["152"] = {"MA Route %route%.svg", "Rhode Island %route%.svg"},
		["286"] = {"MA Route %route%.svg", "NH Route %route%.svg"},
		default = "MA Route %route%.svg",
	},
	name = "Route %route%",
	link = "Massachusetts Route %route%",
	abbr = "Route&nbsp;%route%",
	width = "expand"
	
}
MA.MA = MA.Route
MA.SR = MA.Route

MA["Route-Conn"] = {
	shield = "",
	name = MA.Route.name .. " Connector",
	link = MA.Route.link .. " Connector",
	abbr = MA.Route.abbr .. " Conn.",
	aux = MA[" aux "].Conn
}
MA["MA-Conn"] = MA["Route-Conn"]

MA.MATP = {
	shield = "",
	shieldmain = {
		hook = "pagename",
		article = "Massachusetts Turnpike",
 		iftrue = {"Mass Pike shield.svg", "I-90.svg"},
 		default = "I-90.svg"
	},
	name = "Massachusetts Turnpike",
	link = "Massachusetts Turnpike",
	abbr = "Mass&nbsp;Pike"
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(MA) do if k:find ("^%a") then
	v.maint = "[[Massachusetts Department of Transportation|MassDOT]]"
	end
end

MA.CT = {alias = {module = "USA/CT", type = "CT"}}
MA.NH = {alias = {module = "USA/NH", type = "NH"}}
MA.NY = {alias = {module = "USA/NY", type = "NY"}}
MA.RI = {alias = {module = "USA/RI", type = "RI"}}
MA.VT = {alias = {module = "USA/VT", type = "VT"}}

return MA