Module:Items/ComparisonTables: Difference between revisions

Adding more formatting to hopefully keep the TotH icons inline when possible
(Added first pass at a getDRTable function)
(Adding more formatting to hopefully keep the TotH icons inline when possible)
Line 577: Line 577:
DRTable[DR][EquipSlot] = {}
DRTable[DR][EquipSlot] = {}
end
end
local itemString = Icons.getExpansionIcon(item.id)..Icons.Icon({item.name, type='item'})
local itemString = '<span style="inline-block">'..Icons.getExpansionIcon(item.id)..Icons.Icon({item.name, type='item'})..'</span>'
table.insert(DRTable[DR][EquipSlot], itemString)
table.insert(DRTable[DR][EquipSlot], itemString)
end
end
Line 618: Line 618:
--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