Jump to content

Module:Inventory slot: Difference between revisions

m
no edit summary
imported>Ttv pedro270707
m (Added the in-game item which is air)
imported>Ttv pedro270707
mNo edit summary
Line 114: Line 114:
-- Use an image if the item ends in .gif or .png
-- Use an image if the item ends in .gif or .png
if subitem:match( '\.gif$' ) or subitem:match( '\.png$' ) then
if subitem:match( '\.gif$' ) or subitem:match( '\.png$' ) then
if link then
slot:wikitext( "<span class=\"sprite pixelated\" style=\"width: 32px; height: 32px;\">[[File:" .. subitem .. "|160px|link=" .. (link or "") .. "]]</span>" )
slot:wikitext( "<span class=\"sprite pixelated\">[[File:" .. subitem .. "|160px|link=" .. link .. "]]</span>" )
else
slot:wikitext( "<span class=\"sprite pixelated\">[[File:" .. subitem .. "|160px|link=]]</span>" )
end
slotContainer:wikitext( tostring( slot ) )
slotContainer:wikitext( tostring( slot ) )
else
else