Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
Fixed two issues introduced by rearranging how SkillData is formatted
(Fixed a few more referneces to Items)
(Fixed two issues introduced by rearranging how SkillData is formatted)
Line 80: Line 80:
   if item.miningID ~= nil then
   if item.miningID ~= nil then
     skill = 'Mining'
     skill = 'Mining'
     lvl = SkillData.Mining[item.masteryID[2] + 1].level
     lvl = SkillData.Mining.Rocks[item.masteryID[2] + 1].level
     time = 3
     time = 3
     xp = item.miningXP
     xp = item.miningXP
Line 90: Line 90:
   if item.type == "Logs" then
   if item.type == "Logs" then
     --Well this feels like cheating, but for as long as logs are the first items by ID it works
     --Well this feels like cheating, but for as long as logs are the first items by ID it works
     local treeData = SkillData.Woodcutting[item.id + 1]
     local treeData = SkillData.Woodcutting.Logs[item.id + 1]
     skill = 'Woodcutting'
     skill = 'Woodcutting'
     lvl = treeData.level
     lvl = treeData.level
Line 409: Line 409:
   --MineCheck:
   --MineCheck:
   if item.miningID ~= nil then
   if item.miningID ~= nil then
     table.insert(lineArray, Icons._SkillReq("Mining", SkillData.Mining[item.masteryID[2] + 1].level))
     table.insert(lineArray, Icons._SkillReq("Mining", SkillData.Mining.Rocks[item.masteryID[2] + 1].level))
   end
   end


Line 427: Line 427:
   --WoodcuttingCheck
   --WoodcuttingCheck
   if item.type == 'Logs' then
   if item.type == 'Logs' then
     local treeData = SkillData.Woodcutting[item.id + 1]
     local treeData = SkillData.Woodcutting.Logs[item.id + 1]
     local lvl = treeData.level
     local lvl = treeData.level
     table.insert(lineArray, Icons._SkillReq("Woodcutting", lvl))
     table.insert(lineArray, Icons._SkillReq("Woodcutting", lvl))