Anonymous

Module:Prayer: Difference between revisions

From Melvor Idle
m
getBonesTable: skpairs -> ipairs where table is already sorted
(Use tabs instead of spaces for indentation; formatEffectLine: Remove redundant function)
m (getBonesTable: skpairs -> ipairs where table is already sorted)
Line 175: Line 175:


local itemArray = Items.getItems(function(item) return item.prayerPoints ~= nil and item.prayerPoints > 0 end)
local itemArray = Items.getItems(function(item) return item.prayerPoints ~= nil and item.prayerPoints > 0 end)
table.sort(itemArray, function(a, b) return a.prayerPoints < b.prayerPoints end)
table.sort(itemArray, function(a, b) return a.prayerPoints < b.prayerPoints end)
 
for i, item in ipairs(itemArray) do
for i, item in Shared.skpairs(itemArray) do
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..Icons.Icon({item.name, type='item', notext=true, size='50'})
result = result..'\r\n|'..Icons.Icon({item.name, type='item', notext=true, size='50'})