Jump to content

Module:Inventory slot: Difference between revisions

m
no edit summary
imported>Ttv pedro270707
m (Added p.formatDescription. Functions the same as the formatDescription() method of the class GuiContainer.)
imported>Ttv pedro270707
mNo edit summary
Line 33: Line 33:
local aliases = require( "Module:Inventory slot/aliases" ).aliases
local aliases = require( "Module:Inventory slot/aliases" ).aliases
local descriptions = require( "Module:Inventory slot/descriptions" ).descriptions
local sprite = require( "Module:Sprite" ).get
local sprite = require( "Module:Sprite" ).get
Line 79: Line 80:
:cssText( table.concat( slotCss, ";" ) )
:cssText( table.concat( slotCss, ";" ) )
:attr( "data-mctitle", (name or subname or subitem) )
:attr( "data-mctitle", (name or subname or subitem) )
if descriptions[subitem] or descriptions[subname] then
slot:attr( "data-mcdesc", p.formatDescription((descriptions[subitem] or descriptions[subname])) )
end
if not subitem:match( '\.gif$' ) and not subitem:match( '\.png$' ) then
if not subitem:match( '\.gif$' ) and not subitem:match( '\.png$' ) then