Module:Inventory slot: Difference between revisions
No edit summary |
Reverted my changes on this for now Tag: Manual revert |
||
| (31 intermediate revisions by 2 users not shown) | |||
| Line 101: | Line 101: | ||
local description = frame.text | local description = frame.text | ||
local mod = '' | local mod = frame.mod or 'Minecraft' | ||
local name = | local name = frame.name | ||
if frame.name:match( '%.gif$' ) and frame.name:match( '%.png$' ) then | |||
if | |||
name = frame.name | name = frame.name | ||
mod = '' | mod = '' | ||
end | end | ||
local minecraft = mod | local minecraft = mod == "Minecraft" or mod == "minecraft" | ||
local img = frame.img | local img = frame.img | ||
| Line 128: | Line 121: | ||
img = 'Invicon ' .. name .. '.png' | img = 'Invicon ' .. name .. '.png' | ||
elseif mod then | elseif mod then | ||
img = mod .. ' ' .. name | img = mod .. ' ' .. name .. '.png' | ||
else | else | ||
img = name | img = name | ||
| Line 451: | Line 441: | ||
end | end | ||
return string.format( | return string.format( | ||
'[%s] | '[%s]%s,%s[%s]', | ||
frame.title or '', | frame.title or '', | ||
frame.name, | frame.name, | ||
frame.num or '', | frame.num or '', | ||