Module:Inventory icon: Difference between revisions

no edit summary
No edit summary
No edit summary
Tag: Manual revert
 
(8 intermediate revisions by the same user not shown)
Line 11: Line 11:
local title = args.title
local title = args.title
local filePrefix,fileName = s:match("(.+):(.+)")
local filePrefix,fileName = file:match("(.+):(.+)")
if file:match( '%.gif$' ) or file:match( '%.png$' ) then
if file:match( '%.gif$' ) or file:match( '%.png$' ) then
file = filePrefix .. 'Invicon ' .. fileName
if filePrefix == nil then
file = 'Invicon ' .. file
else
file = filePrefix .. 'Invicon ' .. fileName
end
else
else
file = filePrefix 'Invicon ' .. fileName .. '.png'
if filePrefix == nil then
file = 'Invicon ' .. file .. '.png'
else
file = filePrefix .. 'Invicon ' .. fileName .. '.png'
end
end
end
-- if file:match( '%.gif$' ) or file:match( '%.png$' ) then
-- file = 'Invicon ' .. file
-- else
-- file = 'Invicon ' .. file .. '.png'
-- 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]]'
end
end


return p
return p