Anonymous

Module:Calculator/AgilityObstacle: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 19: Line 19:
end
end
return Icons.Icon({itemName, type='item', qty = amount, notext=true})
--return Icons.Icon({itemName, type='item', qty = amount, notext=true})
end
end


Line 144: Line 144:
     function(a, b) return a.item < b.item end,
     function(a, b) return a.item < b.item end,
     function(a, b) return {item = a, amount = b} end)
     function(a, b) return {item = a, amount = b} end)
   
 
for _, v in pairs(itemList) do
for _, v in pairs(itemList) do
     ul:tag('li'):wikitext(getItemIcon(item, amount))
     ul:tag('li'):wikitext(getItemIcon(v.item, v.amount))
     end
     end
     end
     end
Line 161: Line 161:


function p.test()
function p.test()
local obs = p.calculateCourse({'Elite Pillar of Conflict ', ' Cargo Net ',' Balance Beam','Pipe Climb'})
local obs = {'Elite Pillar of Conflict ', ' Cargo Net ',' Balance Beam','Pipe Climb'}
local func = function(a, b) return a.amount < b.amount end
local a = p._getCourseList(obs)
local factory = function(a, b) return {item = a, amount = b} end
local sortedTable = Shared.sortDictionary(obs.CourseItemCosts, func, factory)
 
    Debug.log(sortedTable)
end
end


2,875

edits