393
edits
Tag: Undo |
No edit summary |
||
Line 69: | Line 69: | ||
function p.getSkillTreeNodes(checkFunc) | function p.getSkillTreeNodes(checkFunc) | ||
local nodes = {} | local nodes = {} | ||
for skillName, skill in pairs(SkillData) do | |||
for | for _, tree in ipairs(skill.skillTrees or {}) do | ||
for _, node in ipairs(GameData.getEntities(tree.nodes, checkFunc)) do | |||
-- Create a new table that includes the skill name and the node properties | |||
local nodeWithSkill = { | |||
skillName = skillName, | |||
table.insert(nodes, | nodeData = node | ||
} | |||
table.insert(nodes, nodeWithSkill) | |||
end | end | ||
end | end |
edits