Skip to content

Commit 8a97c56

Browse files
author
LocalIdentity
committed
Only hide nodes if they rely on a ascendancy node to be shows
Wont hide the regular tree nodes that rely on other nodes to show up in the power report
1 parent c6f4986 commit 8a97c56

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/Classes/CalcsTab.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -546,22 +546,22 @@ function CalcsTabClass:PowerBuilder()
546546
for nodeId, node in pairs(self.build.spec.nodes) do
547547
wipeTable(node.power)
548548
if node.modKey ~= "" and not self.mainEnv.grantedPassives[nodeId] then
549-
if not node.unlockConstraint then
549+
local hiddenByLockedAscendancyNode = false
550+
if node.unlockConstraint then
551+
for _, unlockNodeId in ipairs(node.unlockConstraint.nodes) do
552+
local unlockNode = self.build.spec.nodes[unlockNodeId]
553+
if unlockNode and unlockNode.ascendancyName and not unlockNode.alloc then
554+
hiddenByLockedAscendancyNode = true
555+
break
556+
end
557+
end
558+
end
559+
if not hiddenByLockedAscendancyNode then
550560
distanceMap[node.pathDist or 1000] = distanceMap[node.pathDist or 1000] or { }
551561
distanceMap[node.pathDist or 1000][nodeId] = node
552562
if not (self.nodePowerMaxDepth and self.nodePowerMaxDepth < node.pathDist) then
553563
total = total + 1
554564
end
555-
else
556-
for _, nodeId in ipairs(node.unlockConstraint.nodes) do
557-
if nodeId and self.build.spec.nodes[nodeId].alloc then
558-
distanceMap[node.pathDist or 1000] = distanceMap[node.pathDist or 1000] or { }
559-
distanceMap[node.pathDist or 1000][nodeId] = node
560-
if not (self.nodePowerMaxDepth and self.nodePowerMaxDepth < node.pathDist) then
561-
total = total + 1
562-
end
563-
end
564-
end
565565
end
566566
end
567567
end

0 commit comments

Comments
 (0)