Module:Crafting: Difference between revisions

Jump to navigation Jump to search
m
AHHHHHHHH
(either this is dumb or genius)
m (AHHHHHHHH)
Line 106: Line 106:
local inline = args['inline'] or args['Inline']
local inline = args['inline'] or args['Inline']
local spriteDiv
local spriteDiv
local parentDiv
if inline ~= 'false' then
if inline ~= 'false' then
spriteDiv = sprite:GenerateHTML("span")
spriteDiv = sprite:GenerateHTML("span")
spriteDiv:css("display","inline-block")
spriteDiv:css("display","inline-block")
spriteDiv:css("vertical-align","middle")
spriteDiv:css("vertical-align","middle")
parentDiv = mw.html.create("span")
else
else
spriteDiv = sprite:GenerateHTML()
spriteDiv = sprite:GenerateHTML()
parentDiv = mw.html.create("span")
end
end


local count = tonumber(args['count']) or tonumber(args['Count']) or 1 or '?'
local count = tonumber(args['count']) or tonumber(args['Count']) or 1 or '?'
if count ~= 1 then
if count ~= 1 then
local countSpan = spriteDiv:done():tag("span"):wikitext(count)
local countSpan = parentDiv:tag("span"):wikitext(count)
countSpan:addClass("invslot-stacksize")
countSpan:addClass("invslot-stacksize")
end
end


return spriteDiv
parentDiv:node(spriteDiv)
 
return parentDiv
end
end


184

edits

Navigation menu