Module:Road data/strings/USA/AL

From Cube Studios Wiki

Documentation for this module may be created at Module:Road data/strings/USA/AL/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,
e.g., `p.I` and `p["US-Hist"]`.
]==]

-- Alabama
local AL = {}

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

local suffix = " ([dab||%dab%, |]Alabama)"

AL.I.link = {	["185"] = "Interstate 185 (Georgia)",
        		["210"] = "Interstate 210 (Alabama)",
        		default =	{hook = "splitlen",
		split = 3,
		above = "Interstate %route% (Alabama)",
		below = "Interstate %route% in Alabama"}}

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

AL.US.link = "U.S. Route %route% in Alabama"

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

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

AL.SR = {
	base = "Alabama State Route %route%",
	shield = "Alabama %route%.svg",
	name = "State Route %route%",
	link = "Alabama State Route %route% [dab||(%dab%)|]",
	abbr = "SR %route%",
	width = "expand"
}

AL.AL = AL.SR

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

AL.SPR = {
	shield = "",
	name = "State Park Road %route%",
	link = "State Park Road %route% (Alabama)",
	abbr = "State Park Road %route%"
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(AL) do if k:find ("^%a") then
	v.maint = "[[Alabama Department of Transportation|ALDOT]]"
	v.browse = "Alabama Highways"
	v.browselinks = {
		[1] = "[[List of Interstate Highways in Alabama|Interstate]]",
		[2] = "[[List of U.S. Highways in Alabama|US]]",
		[3] = "[[List of state routes in Alabama|State]]"
	}
	end
end

AL.CR.name = "County Route %route%"
AL.CR.maint = ""

AL.Beach = { --Foley or Baldwin
	shield = {
		ifexists = true,
		default = "%route% Beach Express.svg",
		otherwise = ""
	},
	link = "%route% Beach Express",
	abbr = "%route% Beach Express",
	maint = "Beach Express"
}
          
AL.FL = {alias = {module = "USA/FL", type = "SR"}}
AL.GA = {alias = {module = "USA/GA", type = "SR"}}
AL.TN = {alias = {module = "USA/TN", type = "TN"}}
AL.TNSec = {alias = {module = "USA/TN", type = "Sec"}}
AL.MS = {alias = {module = "USA/MS", type = "MS"}}

return AL
Cookies help us deliver our services. By using our services, you agree to our use of cookies.