Anonymous

Module:Skills/Artisan: Difference between revisions

From Melvor Idle
_getRecipeTable: Support GP & SC costs
m (Fix)
(_getRecipeTable: Support GP & SC costs)
Line 314: Line 314:
table.insert(matArray, Icons.Icon({matItem.name, type='item', notext=true, qty=mat.qty}))
table.insert(matArray, Icons.Icon({matItem.name, type='item', notext=true, qty=mat.qty}))
end
end
end
if recipe.gpCost ~= nil and recipe.gpCost > 0 then
table.insert(matArray, Icons.GP(recipe.gpCost))
end
if recipe.scCost ~= nil and recipe.scCost > 0 then
table.insert(matArray, Icons.SC(recipe.gpCost))
end
end
table.insert(resultPart, '\r\n|' .. (spanStr ~= '' and spanStr .. '| ' or ' ') .. table.concat(matArray, ', '))
table.insert(resultPart, '\r\n|' .. (spanStr ~= '' and spanStr .. '| ' or ' ') .. table.concat(matArray, ', '))