Module:UtilsItems

local p = {}

-- Displays an item function p._DisplayItem(frame) local args = frame:getParent.args return p.DisplayItem(args[1]) end

function p.DisplayItem(itemName) local result = mw.html.create("div") :addClass("item-display-image") :wikitext("") return result end

-- A tweaked version of p.DisplayItem but for emotes function p._DisplayEmote(frame) local args = frame:getParent.args return p.DisplayEmote(args[1]) end

function p.DisplayEmote(emoteName) local result = mw.html.create("div") :addClass("item-display-image") :wikitext(mw.getCurrentFrame:expandTemplate{title = "Tooltip", args = {"", emoteName}}) return result end

-- A tweaked version of p.DisplayItem but for titles, allows to add a prefix function p._DisplayTitle(frame) local args = frame:getParent.args return p.DisplayTitle(args[1]) end

function p.DisplayTitle(titleName) local result = mw.html.create("div") :addClass("item-display-image") :wikitext(mw.getCurrentFrame:expandTemplate{title = "Tooltip", args = {"", "Title unlocked: " .. titleName}}) return result end

return p