Module:Crafting: Difference between revisions

Add support for default sprites with custom lore or name
m (Corrected if, should work now.)
(Add support for default sprites with custom lore or name)
Line 82: Line 82:
sprite:SetSize(args['size'] or args['Size'] or 32)
sprite:SetSize(args['size'] or args['Size'] or 32)
end
end
    local name = args['name'] or args['Name'] or args['title'] or args['Title']
    if name then
        sprite:SetTitle(name)
    end
    local lore = args['lore'] or args['Lore'] or args['text'] or args['Text']
    if lore then
        sprite:SetLore(lore)
    end


local inline = args['inline'] or args['Inline']
local inline = args['inline'] or args['Inline']
Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator
2,563

edits