Module:Inventory slot: Difference between revisions

No edit summary
No edit summary
Line 112: Line 112:


local img = frame.img
local img = frame.img
local link = args.link or ''
if not img then
if not img then
if name:match( '%.gif$' ) then
if name:match( '%.gif$' ) then
img = name
img = mod .. ' ' .. name
name = name:sub( 0, -5 )
name = name:sub( 0, -5 )
link = link:sub( 0, -5)
elseif minecraft then
elseif minecraft then
img = 'Invicon ' .. name .. '.png'
img = 'Invicon ' .. name .. '.png'
Line 129: Line 133:
end
end
local link = args.link or ''
if link == '' then
if link == '' then
link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )
link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )