FANDOM


local categorization = require("Module:Categorization")
local utils = require("Module:Utils")
local enumerate_gear_attributes = require('Module:Gear attribute')._enumerate_gear_attributes
 
local categorize = categorization.categorize_in_namespaces('Catalog')
 
local p = {}
 
function p._format_gear_attributes(args)
    local gear_attributes = args["gear attributes"]
    if gear_attributes then
        if gear_attributes:lower() == "none" then
            return categorize("Gear with no attributes")
        else
            return enumerate_gear_attributes {gear_attributes = gear_attributes, categorize = true}
        end
    else
        return error("Gear attributes must be specified")
    end
end
 
p.format_gear_attributes = utils.make_wrapper_function(p._format_gear_attributes)
 
return p
Community content is available under CC-BY-SA unless otherwise noted.