Module:Items/ComparisonTables: Difference between revisions

More attempts to adjust DR table formatting
m (fixed formatting typo)
(More attempts to adjust DR table formatting)
Line 577: Line 577:
DRTable[DR][EquipSlot] = {}
DRTable[DR][EquipSlot] = {}
end
end
local itemString = '<span style="display:inline-block">'..Icons.getExpansionIcon(item.id)..Icons.Icon({item.name, type='item'})..'</span>'
table.insert(DRTable[DR][EquipSlot], Icons.Icon({item.name, type='item', expicon = Icons.getExpansionIcon(item.id)}))
table.insert(DRTable[DR][EquipSlot], itemString)
end
end
Line 605: Line 604:
ItemList =  Items.getItems(function(item)
ItemList =  Items.getItems(function(item)
if Items._getItemStat(item, 'damageReduction', true) <= 0 then
if Items._getItemStat(item, 'damageReduction', true) <= 0 then
return false
end
-- Exclude Golbin raid exclusives for now, such that they don't
-- pollute various equipment tables
if item.golbinRaidExclusive ~= nil and item.golbinRaidExclusive then
return false
return false
end
end
Line 614: Line 618:
local isMatch = true
local isMatch = true
if Items._getItemStat(item, 'damageReduction', true) <= 0 then
if Items._getItemStat(item, 'damageReduction', true) <= 0 then
return false
end
-- Exclude Golbin raid exclusives for now, such that they don't
-- pollute various equipment tables
if item.golbinRaidExclusive ~= nil and item.golbinRaidExclusive then
return false
return false
end
end
--Using the same checks for Melee/Ranged/Magic that the Equipment Tables use
--Using the same checks for Melee/Ranged/Magic that the Equipment Tables use
if style == 'Melee' then
if style == 'Melee' then
mw.log("blorp!")
if ((Items._getItemStat(item, 'defenceLevelRequired') == nil and Items._getItemStat(item, 'attackLevelRequired') == nil) and not Shared.contains(styleOverrides.Melee, item.name)) or Shared.contains(styleOverrides.NotMelee, item.name) then isMatch = false end
if ((Items._getItemStat(item, 'defenceLevelRequired') == nil and Items._getItemStat(item, 'attackLevelRequired') == nil) and not Shared.contains(styleOverrides.Melee, item.name)) or Shared.contains(styleOverrides.NotMelee, item.name) then isMatch = false end
elseif style == 'Ranged' then
elseif style == 'Ranged' then