Module:InfoboxClass

local p = {} local infobox = require("Module:Infobox") local utilsCode = require("Module:UtilsCode")

local FIELDS = {{parameter = "difficulty", content = "", caption = "Difficulty", type = "inline"}, {parameter = "roles", content = "", caption = "Roles", type = "inline"}}

function p._Main(frame) local args = frame:getParent.args return p.Main(args) end

function p.Main(args) local fields = FIELDS -- Tweaking the image(s) shown male/female local image = "" for key, field in ipairs(fields) do		if not utilsCode.IsEmpty(args[field["parameter"]]) then -- Format the difficulty stars if field["parameter"] == "difficulty" then field["content"] = "" else field["content"] = args[field["parameter"]] end end end return infobox.CreateInfobox(args["name"], {content = image, caption = args["caption"]}, fields) end

return p