Anonymous

Module:Skills/Artisan: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 129: Line 129:
:wikitext(Num.formatnum(perfectHeal))
:wikitext(Num.formatnum(perfectHeal))
:attr('data-sort-value', perfectHeal)  
:attr('data-sort-value', perfectHeal)  
 
local ingrCell = row:tag('td')
local matArray = {}
local matArray = {}
for j, mat in ipairs(recipe.itemCosts) do
for j, mat in ipairs(recipe.itemCosts) do
local matItem = Items.getItemByID(mat.id)
local matItem = Items.getItemByID(mat.id)
if matItem ~= nil then
if matItem ~= nil then
table.insert(matArray, Icons.Icon({matItem.name, type='item', notext=true, qty=mat.quantity}))
local sub = mw.html.create('sub')
:wikitext(mat.quantity)
:addClass('item-qty')
:done()
ingrCell:node(sub)
ingrCell:wikitext(Icons.Icon({matItem.name, type='item', notext=true}))
end
end
end
end
row:tag('td'):wikitext(table.concat(matArray, ' '))
end
end


2,875

edits