Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ function PassiveSpecClass:GetEffectiveAllocationPath(node, altPath)
end

function PassiveSpecClass:AllocNode(node, altPath)
setSearchForceUpdate()
if not node.path then
-- Node cannot be connected to the tree as there is no possible path
return
Expand Down Expand Up @@ -972,6 +973,7 @@ end

-- Deallocate the given node, and all nodes which depend on it (i.e. which are only connected to the tree through this node)
function PassiveSpecClass:DeallocNode(node)
setSearchForceUpdate()
for _, depNode in ipairs(node.depends) do
-- reset any switched attribute nodes
if depNode.isAttribute then
Expand Down
12 changes: 10 additions & 2 deletions src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -831,10 +831,14 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
self.searchParams = prepSearch(self.searchStr)

for nodeId, node in pairs(spec.nodes) do
self.searchStrResults[nodeId] = #self.searchParams > 0 and self:DoesNodeMatchSearchParams(node)
self.searchStrResults[nodeId] = #self.searchParams > 0 and self:DoesNodeMatchSearchParams(build, node)
end
end

function setSearchForceUpdate()
self.searchNeedsForceUpdate = true
end

if launch.devModeAlt and hoverNode then
-- Draw orbits of the group node
local groupNode = hoverNode.group
Expand Down Expand Up @@ -1442,11 +1446,15 @@ function PassiveTreeViewClass:Focus(x, y, viewPort, build)
self.zoomY = -y * scale
end

function PassiveTreeViewClass:DoesNodeMatchSearchParams(node)
function PassiveTreeViewClass:DoesNodeMatchSearchParams(build, node)
if node.type == "ClassStart" or node.type == "OnlyImage" then
return
end

if node.unlockConstraint and not checkUnlockConstraints(build, node) then
return
end

local needMatches = copyTable(self.searchParams)
local err

Expand Down
Loading