Module:Items/ComparisonTables: Difference between revisions

m
Sort Double Loot table so like slayer gear stays together
(Added linking to item names for double loot table)
m (Sort Double Loot table so like slayer gear stays together)
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.name < b.name end)
   table.sort(itemList, function(a, b) return a.itemID < b.itemID 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'
285

edits