Anonymous

Module:Items/ComparisonTables: Difference between revisions

From Melvor Idle
Fixed a thing with the double loot table
m (Sort Double Loot table so like slayer gear stays together)
(Fixed a thing with the double loot table)
Line 289: Line 289:
function p.getDoubleLootTable(frame)
function p.getDoubleLootTable(frame)
   local itemList = Items.getItems(function(item) return item.chanceToDoubleLoot ~= nil and item.chanceToDoubleLoot > 0 end)
   local itemList = Items.getItems(function(item) return item.chanceToDoubleLoot ~= nil and item.chanceToDoubleLoot > 0 end)
   table.sort(itemList, function(a, b) return a.itemID < b.itemID end)
   table.sort(itemList, function(a, b) return a.id < b.id end)
   local result = '{| class="wikitable sortable stickyHeader"\r\n|-class="headerRow-0"'
   local result = '{| class="wikitable sortable stickyHeader"\r\n|-class="headerRow-0"'
   result = result..'\r\n!colspan="2"|Name!!Bonus!!Description!!Sources'
   result = result..'\r\n!colspan="2"|Name!!Bonus!!Description!!Sources'