Module:Crafting: Difference between revisions

m
no edit summary
m (How about this)
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 110: Line 110:
end
end


if tonumber(args['count']) or tonumber(args['Count']) or string.match(args['count'],'%?') or string.match(args['Count'],'%?') then
local count = tonumber(args['count']) or tonumber(args['Count']) or string.match(tostring(args['count']),'%?') or string.match(tostring(args['Count']),'%?') or 1
if tonumber(args['count']) ~= 1 then
if count ~= 1 then
local countSpan = parentDiv:tag("span"):wikitext(args['count'])
local countSpan = parentDiv:tag("span"):wikitext(count)
countSpan:addClass("invslot-stacksize")
countSpan:addClass("invslot-stacksize")
end
end
end


Line 122: Line 121:
spriteDiv:addClass("enchanted")
spriteDiv:addClass("enchanted")
end
end


local link = args['link'] or args['Link']
local link = args['link'] or args['Link']
Line 135: Line 133:


parentDiv:node(spriteDiv)
parentDiv:node(spriteDiv)
if link and #link ~= 0 then
if link and #link ~= 0 then
if link:sub( 1,2 ) == '[[' then
if link:sub( 1,2 ) == '[[' then
Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,641

edits