Anonymous

Module:Items/ComparisonTables: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 218: Line 218:
end
end


function p._getCategoryTable(itemList, slot)
function p.getEquipmentTable(itemList, slot)
local iconSize = 20
local iconSize = 20


Line 333: Line 333:
table.sort(itemList, function(a, b) return a.name < b.name end)
table.sort(itemList, function(a, b) return a.name < b.name end)


return p._getCategoryTable(itemList, slot)
return p.getEquipmentTable(itemList, slot)
end
end


Line 342: Line 342:


local itemList, errItems = {}, {}
local itemList, errItems = {}, {}
local errMsg = 'Some items not found in database: '
local hasErr = false
for i, rawItemName in ipairs(frameArgs) do
for i, rawItemName in ipairs(frameArgs) do
local itemName = Shared.trim(rawItemName)
local itemName = Shared.trim(rawItemName)
Line 357: Line 355:
return Shared.printError('Some items not found in database: ' .. table.concat(errItems, ', '))
return Shared.printError('Some items not found in database: ' .. table.concat(errItems, ', '))
else
else
return p._getEquipmentTable(itemList, includeModifiers)
return p.getEquipmentTable(itemList)
end
end
end
end
2,875

edits