Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
_getItemSources: Rework Rhaelyx special treatment, adds Summoning for jewel & mysterious stone
(Tweaked some things that were resulting in Wandering Bard drops not appearing)
(_getItemSources: Rework Rhaelyx special treatment, adds Summoning for jewel & mysterious stone)
Line 535: Line 535:


   --Rhaelyx pieces are also special
   --Rhaelyx pieces are also special
   if item.name == 'Jewel of Rhaelyx' then
   if Shared.contains({'Circlet of Rhaelyx', 'Jewel of Rhaelyx', 'Mysterious Stone'}, item.name) then
     local rhaStr = 'Any action in: '
     local rhaSkills = {
    rhaStr = rhaStr..Icons.Icon({'Firemaking', type = 'skill', notext = true})..', '..Icons.Icon({'Cooking', type = 'skill', notext = true})..', '..Icons.Icon({'Smithing', type = 'skill', notext = true})..',<br/>'
      Circlet = {'Woodcutting', 'Fishing', 'Mining', 'Thieving', 'Farming', 'Agility'},
    rhaStr = rhaStr..Icons.Icon({'Fletching', type = 'skill', notext = true})..', '..Icons.Icon({'Crafting', type = 'skill', notext = true})..', '..Icons.Icon({'Runecrafting', type = 'skill', notext = true})..',<br/>'
      Jewel = {'Firemaking', 'Cooking', 'Smithing', 'Fletching', 'Crafting', 'Runecrafting', 'Herblore', 'Summoning'}
     rhaStr = rhaStr..Icons.Icon({'Herblore', type='skill'})
     }
     table.insert(lineArray, rhaStr)
    local rhaSkList = {}
  elseif item.name == 'Circlet of Rhaelyx' then
     if item.name == 'Circlet of Rhaelyx' then
    local rhaStr = 'Any action in: '
      rhaSkList = rhaSkills.Circlet
     rhaStr = rhaStr..Icons.Icon({'Woodcutting', type = 'skill', notext = true})..', '..Icons.Icon({'Fishing', type = 'skill', notext = true})..', '..Icons.Icon({'Mining', type = 'skill', notext = true})..',<br/>'
     elseif item.name == 'Jewel of Rhaelyx' then
    rhaStr = rhaStr..Icons.Icon({'Thieving', type = 'skill', notext = true})..', '..Icons.Icon({'Farming', type = 'skill', notext = true})..', '..Icons.Icon({'Agility', type = 'skill', notext = true})
      rhaSkList = rhaSkills.Jewel
    table.insert(lineArray, rhaStr)
    elseif item.name == 'Mysterious Stone' then
  elseif item.name == 'Mysterious Stone' then
      rhaSkList = rhaSkills.Jewel
     local rhaStr = 'Any action in: '
      for i, v in ipairs(rhaSkills.Circlet) do
     rhaStr = rhaStr..Icons.Icon({'Firemaking', type = 'skill', notext = true})..', '..Icons.Icon({'Cooking', type = 'skill', notext = true})..', '..Icons.Icon({'Smithing', type = 'skill', notext = true})..',<br/>'
        table.insert(rhaSkList, v)
    rhaStr = rhaStr..Icons.Icon({'Fletching', type = 'skill', notext = true})..', '..Icons.Icon({'Crafting', type = 'skill', notext = true})..', '..Icons.Icon({'Runecrafting', type = 'skill', notext = true})..',<br/>'
      end
     rhaStr = rhaStr..Icons.Icon({'Herblore', type='skill', notext = true})..', '..Icons.Icon({'Woodcutting', type = 'skill', notext = true})..', '..Icons.Icon({'Fishing', type = 'skill', notext = true})..',<br/>'
     end
     rhaStr = rhaStr..Icons.Icon({'Mining', type = 'skill', notext = true})..', '..Icons.Icon({'Thieving', type = 'skill', notext = true})..', '..Icons.Icon({'Farming', type = 'skill', notext = true})..', '..Icons.Icon({'Agility', type = 'skill', notext = true})
 
    rhaStr = rhaStr..'<br/>after finding '..Icons.Icon({'Crown of Rhaelyx', type='item'})
     local rhaStrPart = {}
    for i, skillName in ipairs(rhaSkList) do
      table.insert(rhaStrPart, Icons.Icon({skillName, type='skill', notext=true}))
     end
    local rhaStr = 'Any action in: ' .. table.concat(rhaStrPart, ', ')
     if item.name == 'Mysterious Stone' then rhaStr = rhaStr .. '<br/>after finding ' .. Icons.Icon({'Crown of Rhaelyx', type='item'}) end
     table.insert(lineArray, rhaStr)
     table.insert(lineArray, rhaStr)
   end
   end
   --Tokens are from the appropriate skill
   --Tokens are from the appropriate skill
   if item.isToken then
   if item.isToken then