Module:Inventory slot: Difference between revisions

no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 3: Line 3:
local i18n = {
local i18n = {
filename = 'Invicon $1',
filename = 'Invicon $1',
legacyFilename = 'Grid $1.png',
-- legacyFilename = 'Grid $1.png',
legacyFilename = '$1Invicon $2.png',
modLink = 'Mods/$1/$2',
modLink = 'Mods/$1/$2',
moduleAliases = [[Module:Inventory slot/Aliases]],
moduleAliases = [[Module:Inventory slot/Aliases]],
Line 13: Line 14:
matching = 'Matching',
matching = 'Matching',
damaged = 'Damaged',
damaged = 'Damaged',
parallel = 'Parallel', -- added
-- parallel = 'Parallel', -- added
},
},
suffixes = {
suffixes = {
Line 107: Line 108:
local img
local img
if mod then
if mod then
img = i18n.legacyFilename:gsub( '%$1', name .. ' (' .. mod .. ')' )
-- img = i18n.legacyFilename:gsub( '%$1', name .. ' (' .. mod .. ')' )
img = i18n.legacyFilename:gsub( '%$1', mod )
img = img:gsub( '%$2', name )
elseif name:match( '%.gif$' ) or name:match( '%.png$' ) then
elseif name:match( '%.gif$' ) or name:match( '%.png$' ) then
img = i18n.filename:gsub( '%$1', name )
img = i18n.filename:gsub( '%$1', name )