Module:Items/UseTables: Difference between revisions

Add missing skills to itemUseArray, resolves issue with Gold Emerald Ring
(Adding missing categories to the itemUseArray)
(Add missing skills to itemUseArray, resolves issue with Gold Emerald Ring)
Line 18: Line 18:
local itemUseArray = {
local itemUseArray = {
   Agility = {},
   Agility = {},
   Combat = {},
  Attack = {},
   Combat = {'Gold Emerald Ring'},
   Cooking = {'Cooking Gloves', 'Crown of Rhaelyx'},
   Cooking = {'Cooking Gloves', 'Crown of Rhaelyx'},
   Crafting = {'Crown of Rhaelyx'},
   Crafting = {'Crown of Rhaelyx'},
  Defence = {},
   Farming = {'Compost', 'Weird Gloop', 'Bob's Rake'},
   Farming = {'Compost', 'Weird Gloop', 'Bob's Rake'},
   Firemaking = {'Crown of Rhaelyx'},
   Firemaking = {'Crown of Rhaelyx'},
Line 26: Line 28:
   Fletching = {'Crown of Rhaelyx'},
   Fletching = {'Crown of Rhaelyx'},
   Herblore = {'Crown of Rhaelyx'},
   Herblore = {'Crown of Rhaelyx'},
  Hitpoints = {},
   Magic = {},
   Magic = {},
   Mining = {'Mining Gloves', 'Gem Gloves'},
   Mining = {'Mining Gloves', 'Gem Gloves'},
Line 33: Line 36:
   Slayer = {},
   Slayer = {},
   Smithing = {'Smithing Gloves', 'Crown of Rhaelyx'},
   Smithing = {'Smithing Gloves', 'Crown of Rhaelyx'},
  Strength = {},
   Thieving = {'Chapeau Noir', 'Thieving Gloves', 'Gloves of Silence'},
   Thieving = {'Chapeau Noir', 'Thieving Gloves', 'Gloves of Silence'},
   Woodcutting = {},
   Woodcutting = {},
Line 202: Line 206:
   end
   end
   --Prayer
   --Prayer
   if item.prayerPoints ~= nil or Shared.contains(itemUseArray.Prayer, item.name) then
   if item.prayerPoints ~= nil or (Shared.contains(itemUseArray.Prayer, item.name) and not Shared.contains(itemUseArray.Combat, item.name)) then
     if item.prayerPoints ~= nil then table.insert(categoryArray, '[[Category:Buriable Items]]') end
     if item.prayerPoints ~= nil then table.insert(categoryArray, '[[Category:Buriable Items]]') end
     table.insert(useArray, chr..Icons.Icon({'Prayer', type='skill'}))
     table.insert(useArray, chr..Icons.Icon({'Prayer', type='skill'}))