Module:KnightspireLocation

From Knightspire Wiki
Jump to navigationJump to search

Documentation for this module may be created at Module:KnightspireLocation/doc

local p = {}

function p.categorize(frame)
    local type = frame.args[1]
    local nation = frame.args[2]

    local out = ""

    if type == "Village" then
        out = out .. "[[Category:Villages]]"
    elseif type == "City" then
        out = out .. "[[Category:Cities]]"
    elseif type == "Town" then
        out = out .. "[[Category:Towns]]"
    elseif type == "Region" then
        out = out .. "[[Category:Regions]]"
    elseif type == "Dungeon" then
        out = out .. "[[Category:Dungeons]]"
    elseif type == "Landmark" then
        out = out .. "[[Category:Landmarks]]"
    end

    return out
end

return p