Module:L

local getArgs = require('Module:Arguments').getArgs local p = {}

function p.main(frame) local args = getArgs(frame) return p._main(args) end

function p._main(args)

local i = 0 local locinfo = {} local dungeon = args[1] or nil local dungeoninfo = args[2] or nil local floors = args["f"] or nil local tiles = args["t"] or nil local id = args["id"] or nil local er = args["er"] or nil local sr = args["sr"] or nil local hidden = args["h"] or nil local boss = args["b"] or nil local box = args["box"] or nil local shop = args["shop"] or nil local sscript = require('Module:Ss').main

if dungeon then --Resolves specifying PMU 7 dungeon automatically disambig = { "Ash Forest", "Dynamo Sands", "Friendship Forest", "Iceberg Adrift", "Mt. Moon", "Mt. Barricade", "Mysterious Jungle", "Seaside Cavern", "Sour Root Cave" }		for _, dun in pairs(disambig) do			if string.match(dungeon, dun) then dungeon = dungeon.." (PMU 7)|"..dungeon end end dungeon = ""..dungeon..""

--If you need to specify something after the dungeon name --For example Dynamo Sands labyrinth or Marowak Training Dojo Bronze if dungeoninfo then dungeon = dungeon.." "..dungeoninfo end end

attributes = {}

if floors then if sr == "y" then floors = floors..sscript({"sr"}) end if tiles then floors = floors.." "..tiles end table.insert(attributes, floors) elseif not floors then if sr == "y" then table.insert(attributes, sscript({"sr"})) end end

if id then if id == "minun" then table.insert(attributes, sscript({"minun"})) elseif id == "plusle" then table.insert(attributes, sscript({"plusle"})) end end

if hidden == "y" then table.insert(attributes, sscript({"h"})) end

if next(attributes) ~= nil then attributes = table.concat(attributes, " ") table.insert(locinfo, attributes) end if box == "er" then table.insert(locinfo, sscript({"erbox"})) elseif box == "sr" then table.insert(locinfo, sscript({"srbox"})) elseif box == "ersr" or box == "srer" then table.insert(locinfo, sscript({"ersr"})) elseif box then table.insert(locinfo, sscript({"erbox", box})) end

if boss == "y" then table.insert(locinfo, sscript({"b"})) elseif boss and boss ~= "y" then table.insert(locinfo, sscript({"b", boss})) end if er == "y" then table.insert(locinfo, sscript({"er"})) end

if shop == "y" then table.insert(locinfo, sscript({"ks"})) end

if dungeon then if next(locinfo) ~= nil then location = dungeon.." ("..table.concat(locinfo, ", ")..")" else location = dungeon end return tostring(location) end

end

return p