Module:Items/ComparisonTables: Difference between revisions

From Melvor Idle
(Added more columns to the Other table of the getDRTable table)
(Fixed the Others category for DR Table picking up melee weapons)
Line 601: Line 601:
local ItemList = {}
local ItemList = {}
if style == 'Other' then
if style == 'Other' then
SlotNames = {'Helmet', 'Platelegs', 'Boots', 'Gloves', 'Weapon', 'Shield', 'Cape', 'Amulet', 'Ring'}
SlotNames = {'Helmet', 'Platelegs', 'Boots', 'Gloves', 'Shield', 'Cape', 'Amulet', 'Ring'}
else
else
SlotNames = {'Helmet', 'Platebody', 'Platelegs', 'Boots', 'Gloves', 'Weapon', 'Shield'}
SlotNames = {'Helmet', 'Platebody', 'Platelegs', 'Boots', 'Gloves', 'Weapon', 'Shield'}
Line 624: Line 624:
if (Items._getItemStat(item, 'magicLevelRequired') == nil and not Shared.contains(styleOverrides.Magic, item.name)) or Shared.contains(styleOverrides.NotMagic, item.name) then isMatch = false end
if (Items._getItemStat(item, 'magicLevelRequired') == nil and not Shared.contains(styleOverrides.Magic, item.name)) or Shared.contains(styleOverrides.NotMagic, item.name) then isMatch = false end
else
else
if (Items._getItemStat(item, 'defenceLevelRequired') ~= nil or Items._getItemStat(item, 'rangedLevelRequired') ~= nil or Items._getItemStat(item, 'magicLevelRequired') ~= nil or
if (Items._getItemStat(item, 'attackLevelRequired') ~= nil or Items._getItemStat(item, 'defenceLevelRequired') ~= nil or Items._getItemStat(item, 'rangedLevelRequired') ~= nil or Items._getItemStat(item, 'magicLevelRequired') ~= nil or
Shared.contains(styleOverrides.Melee, item.name) or Shared.contains(styleOverrides.Ranged, item.name) or Shared.contains(styleOverrides.Magic, item.name)) and
Shared.contains(styleOverrides.Melee, item.name) or Shared.contains(styleOverrides.Ranged, item.name) or Shared.contains(styleOverrides.Magic, item.name)) and
not Shared.contains(styleOverrides.None, item.name) then
not Shared.contains(styleOverrides.None, item.name) then