Module:Items: Difference between revisions

Fixed attack type error
(specifically excluding it from adding the Skills category to items)
(Fixed attack type error)
Line 186: Line 186:
function p._getWeaponAttackType(item)
function p._getWeaponAttackType(item)
     if (item.validSlots ~= nil and Shared.contains(item.validSlots, 'Weapon')) or
     if (item.validSlots ~= nil and Shared.contains(item.validSlots, 'Weapon')) or
         (item.occupiesSlots ~= nil and Shared.contains(item.occupies, 'Weapon')) then
         (item.occupiesSlots ~= nil and Shared.contains(item.occupiesSlots, 'Weapon')) then
if Shared.contains({'melee', 'ranged', 'magic'}, item.attackType) then
if Shared.contains({'melee', 'ranged', 'magic'}, item.attackType) then
local iconType = item.attackType ~= 'melee' and 'skill' or nil
local iconType = item.attackType ~= 'melee' and 'skill' or nil