Module:Inventory slot: Difference between revisions

No edit summary
No edit summary
Line 101: Line 101:
local description = frame.text
local description = frame.text
local mod = ''
local mod = frame.mod or 'Minecraft'
local name = frame.name
local name = frame.name
local separator = string.find(name, ":")
 
if frame.name:match( '%.gif$' ) and frame.name:match( '%.png$' ) then  
if separator then
mod = string.sub(name, 1, separator)
name = string.sub(name, separator + 1)
elseif not frame.name:match( '%.gif$' ) and not frame.name:match( '%.png$' ) then  
name = frame.name
name = frame.name
mod = "Minecraft"
mod = ''
end
end