Module:Inventory slot: Difference between revisions

No edit summary
No edit summary
Line 137: Line 137:
local link = args.link or ''
local link = args.link or ''
if link == '' then
if link == '' then
if minecraft then
link = i18n.modLink:gsub( '%$1', "Minecraft" ):gsub( '%$2', name )
link = "https://minecraft.wiki/w/" .. name
else
link = i18n.modLink:gsub( '%$1', "Minecraft" ):gsub( '%$2', name )
end
elseif link:lower() == 'none' then
elseif link:lower() == 'none' then
link = nil
link = nil
Line 196: Line 192:
item:addClass( 'invslot-item-image' )
item:addClass( 'invslot-item-image' )
:wikitext( '[[File:', img, '|32x32px|link=', link or '', '|alt=', altText, '|', escapedTitle, ']]' )
:wikitext( '[[File:', img, '|32x32px|link=', link or '', '|alt=', altText, '|', escapedTitle, ']]' )
item:addClass( 'invslot-item-image' )
:wikitext( mod, " ", name )
if num and num > 1 and num < 1000 then
if num and num > 1 and num < 1000 then