Anonymous

Module:Skills/Artisan: Difference between revisions

From Melvor Idle
adding perfect item icons to the cooking table
(removed right-aligning on value for cooked items since multi-quantity cooks make that ugly)
(adding perfect item icons to the cooking table)
Line 28: Line 28:
local result = '{| class="wikitable sortable stickyHeader"'
local result = '{| class="wikitable sortable stickyHeader"'
result = result..'\r\n|- class="headerRow-0"'
result = result..'\r\n|- class="headerRow-0"'
result = result..'\r\n!colspan="2"|Cooked Item!!'..Icons.Icon({'Cooking', type='skill', notext=true})..' Level'
result = result..'\r\n!colspan="3"|Cooked Item!!'..Icons.Icon({'Cooking', type='skill', notext=true})..' Level'
result = result..'!!XP!!Healing!!Value!!Ingredients'
result = result..'!!XP!!Healing!!Value!!Ingredients'


for i, item in Shared.skpairs(itemArray) do
for i, item in Shared.skpairs(itemArray) do
local perfectItem = nil
if item.perfectItem ~= nil then
perfectItem = Items.getItemByID(item.perfectItem)
end
local qty = item.cookingQty
local qty = item.cookingQty
if qty == nil then
if qty == nil then
Line 38: Line 42:
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|style="min-width:25px"|'..Icons.Icon({item.name, type='item', notext='true', size='50'})
result = result..'\r\n|style="min-width:25px"|'..Icons.Icon({item.name, type='item', notext='true', size='50'})
result = result..'\r\n|style="min-width:25px"| '
if perfectItem ~= nil then
result = result..Icons.Icon({perfectItem.name, type='item', notext='true', size='50'})
end
result = result..'||'
result = result..'||'
if qty > 1 then
if qty > 1 then