Module:Inventory slot: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
local i18n = { | local i18n = { | ||
modLink = '$1:$2', | modLink = '$1:$2', | ||
moduleAliases = [[Module:Inventory slot/Aliases]], | moduleAliases = [[Module:Inventory slot/Aliases]], | ||
Line 123: | Line 122: | ||
if not img then | if not img then | ||
if name:match( '%.gif$' ) or name:match( '%.png$' ) then | if name:match( '%.gif$' ) or name:match( '%.png$' ) then | ||
img = | img = name | ||
-- Remove file extension from name | -- Remove file extension from name | ||
name = name:sub( 0, -5 ) | name = name:sub( 0, -5 ) | ||
elseif minecraft then | elseif minecraft then | ||
img = | img = 'Invicon ' .. name .. '.png' | ||
elseif mod then | elseif mod then | ||
img = | img = mod .. ' ' .. name | ||
if not mw.query.pagesExist( "File:" .. img ) then | |||
end | |||
else | else | ||
img = name | |||
img = | |||
end | end | ||
end | end |