Module:Sandbox/Ahecht: Difference between revisions

Content deleted Content added
pass on small
small doesn't work anyway, no need to support. Support ride and auto-cat
Line 57:
"opened",
"closed",
"year",
"previousattraction",
"replacement",
Line 149 ⟶ 150:
end
end
if string.lower(string.gsub((args[0].type or ""),".*%s","")) == "show" then
args[0].ride = "no"
end
for _, k in ipairs(keys) do
if args[0][k] then
Line 154 ⟶ 160:
end
end
for i, a in ipairs(args) do
if not args[0]["location_" .. i] then
-- ___location subtemplate isn't defined
localtable.insert(output, childTemplate"| =location_" .. i .. " = {{Infobox attraction/section/sandbox | child=yes")
if args[0].small then childTemplate = childTemplate .. " | small = " .. args[0].small end
table.insert(output, "| location_" .. i .. " = {{Infobox attraction/section/sandbox | child=yes" .. (args[0].small and ( " | small = " .. args[0].small ) or ""))
for _, k in ipairs(keys) do
if a[k] then
Line 165 ⟶ 170:
end
end
table.insert(output,"| ride = " .. (args[0].ride or ""))
table.insert(output,"| auto-cat = " .. (args[0].auto-cat or ""))
table.insert(output,"}}")
end