Module:Items/ComparisonTables: Difference between revisions

_getEquipmentTable: Fix regression in sort order of Attack Speed column
(_getEquipmentTable: Amend display of attack interval to have a resolution of seconds)
(_getEquipmentTable: Fix regression in sort order of Attack Speed column)
Line 168: Line 168:
     if isWeaponType then
     if isWeaponType then
       --Building rows for weapons
       --Building rows for weapons
      local atkSpeed = Items._getItemStat(item, 'attackSpeed', true)
       table.insert(resultPart, '\r\n|-')
       table.insert(resultPart, '\r\n|-')
       table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0 0 0;"|'..Icons.Icon({item.name, type='item', size=50, notext=true}))
       table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0 0 0;"|'..Icons.Icon({item.name, type='item', size=50, notext=true}))
       table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0.5em 0 0.5em;"|'..Icons.Icon({item.name, type='item', noicon=true}))
       table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0.5em 0 0.5em;"|'..Icons.Icon({item.name, type='item', noicon=true}))
       table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;" |'..Shared.round(Items._getItemStat(item, 'attackSpeed', true) / 1000, 3, 1) .. 's')
       table.insert(resultPart, '\r\n| data-sort-value="' .. atkSpeed .. '" style ="text-align: right;padding: 0 0.5em 0 0;" |'..Shared.round(atkSpeed / 1000, 3, 1) .. 's')
       --That's the first list out of the way, now for 2-Handed
       --That's the first list out of the way, now for 2-Handed
       table.insert(resultPart, '\r\n| style ="text-align: right;"|')
       table.insert(resultPart, '\r\n| style ="text-align: right;"|')