Anonymous

Module:Sandbox/SkillTree: Difference between revisions

From Melvor Idle
Undo revision 82140 by Toadmilk (talk)
No edit summary
Tag: Reverted
(Undo revision 82140 by Toadmilk (talk))
Tag: Undo
Line 69: Line 69:
function p.getSkillTreeNodes(checkFunc)
function p.getSkillTreeNodes(checkFunc)
     local nodes = {}
     local nodes = {}
     for skillName, skill in pairs(SkillData) do
   
         for _, tree in ipairs(skill.skillTrees or {}) do
     for _, skillData in pairs(GameData.skillData) do
            for _, node in ipairs(GameData.getEntities(tree.nodes, checkFunc)) do
         local skillTrees = skillData.skillTrees
                node.skillName = skillName
        if skillTrees then
                table.insert(nodes, node)
            for _, skillTree in ipairs(skillTrees) do
                for _, node in ipairs(GameData.getEntities(skillTree.nodes, checkFunc)) do
                    table.insert(nodes, node)
                end
             end
             end
         end
         end
393

edits