Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
Adds crafting table for summoning
(_getItemLootSourceTable: Resolve lootChance being applied to bones)
(Adds crafting table for summoning)
Line 158: Line 158:
       table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time))
       table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time))
     end
     end
  end
  if item.summoningLevel ~= nil then
    skill = 'Summoning'
    lvl = item.summoningLevel
    xp = item.summoningXP
    req = item.summoningReq
    req = 'One of the following recipes:<br/>\r\n'
    for recipeIndex, recipe in pairs(item.summoningReq) do
      if recipeIndex > 1 then req = req..'<br/><br/>\r\n' end
      for i, mat in pairs(recipe) do
        if i > 1 then req = req..'<br/>' end
        local matItem = Items.getItemByID(mat.id)
        if matItem == nil then
          req = req..mat.qty..'x ?????'
        else
          req = req..Icons.Icon({matItem.name, type='item', qty=mat.qty})
        end
      end
    end
    qty = item.summoningQty
    time = 3
    table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time))
   end
   end
   --A couple special exceptions for Alt Magic
   --A couple special exceptions for Alt Magic