Module:Inventory icon: Difference between revisions

no edit summary
m (1 revision imported: Imported from minecraft.wiki)
No edit summary
Line 11: Line 11:
local title = args.title
local title = args.title
local filePrefix,fileName = s:match("(.+):(.+)")
if file:match( '%.gif$' ) or file:match( '%.png$' ) then
if file:match( '%.gif$' ) or file:match( '%.png$' ) then
file = 'Invicon ' .. file
file = filePrefix .. 'Invicon ' .. fileName
else
else
file = 'Invicon ' .. file .. '.png'
file = filePrefix 'Invicon ' .. fileName .. '.png'
end
end
return '[[File:' .. file .. '|32x32px|link=' .. ( link or '' ) .. '|' .. ( title or '' ) .. '|class=pixel-image]]'
return '[[File:' .. file .. '|32x32px|link=' .. ( link or '' ) .. '|' .. ( title or '' ) .. '|class=pixel-image]]'