Module:Inventory slot: Difference between revisions
No edit summary Tag: Manual revert |
Undo revision 12103 by Deadlydiamond98 (talk) Tag: Manual revert |
||
| Line 104: | Line 104: | ||
local name = frame.name | local name = frame.name | ||
local minecraft = mod == "Minecraft" or mod == "minecraft" | local minecraft = mod == "Minecraft" or mod == "minecraft" | ||
local img = frame.img | local img = frame.img | ||
if not img then | if not img then | ||
if name:match( '%.gif | if name:match( '%.gif$' ) then | ||
img = name | img = mod .. ' ' .. name | ||
-- | -- name = name:sub( 0, -5 ) | ||
elseif minecraft then | elseif minecraft then | ||
img = 'Invicon ' .. name .. '.png' | img = 'Invicon ' .. name .. '.png' | ||
| Line 132: | Line 127: | ||
local link = args.link or '' | local link = args.link or '' | ||
local linkName = name:gsub('%.gif$', ''):gsub('%.png$', '') | |||
if link == '' then | if link == '' then | ||
link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', | link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', linkName) | ||
elseif link:lower() == 'none' then | elseif link:lower() == 'none' then | ||
link = nil | link = nil | ||