Anonymous

Module:Items: Difference between revisions

From Melvor Idle
Added nolink qualifier to getWeaponAttackType
(wheeee deliberately compensating for the fact that Melee Accuracy Potion's name inexplicably has two spaces)
(Added nolink qualifier to getWeaponAttackType)
Line 69: Line 69:
function p._getWeaponAttackType(item)
function p._getWeaponAttackType(item)
   if item.type == 'Weapon' then
   if item.type == 'Weapon' then
     return Icons.Icon({'Melee'})
     return Icons.Icon({'Melee', nolink='true'})
   elseif item.type == 'Ranged Weapon' then
   elseif item.type == 'Ranged Weapon' then
     return Icons.Icon({'Ranged', type='skill'})
     return Icons.Icon({'Ranged', type='skill', nolink='true'})
   elseif item.type == 'Magic Staff' or item.type == 'Magic Wand' then
   elseif item.type == 'Magic Staff' or item.type == 'Magic Wand' then
     return Icons.Icon({'Magic', type='skill'})
     return Icons.Icon({'Magic', type='skill', nolink='true'})
   else
   else
     return "Invalid"
     return "Invalid"