Anonymous

Module:Skills/Agility: Difference between revisions

From Melvor Idle
Implement getPillars()
(Okay hopefully fixed the second issue I hit with Agility obstacles)
(Implement getPillars())
Line 33: Line 33:
       newObst.id = i - 1
       newObst.id = i - 1
       table.insert(result, newObst)
       table.insert(result, newObst)
    end
  end
  return result
end
function p.getPillars(checkFunc)
  local result = {}
  for i, pillar in Shared.skpairs(SkillData.Agility.Pillars) do
    if checkFunc(pillar) then
      local newPillar = Shared.clone(pillar)
      newPillar.id = i - 1
      table.insert(result, newPillar)
     end
     end
   end
   end