Skip to content

Fix: Prevent weapon set A node allocation in weapon set B path#1233

Closed
TheDechev wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
TheDechev:fix/prevent-weapon-sets-wrong-node-allocations
Closed

Fix: Prevent weapon set A node allocation in weapon set B path#1233
TheDechev wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
TheDechev:fix/prevent-weapon-sets-wrong-node-allocations

Conversation

@TheDechev

@TheDechev TheDechev commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

Fix weapon set path crossing allocation

Summary

Fixes a bug where users could allocate nodes across different weapon sets through path crossing. Users could allocate a node for weapon set 2 even if the only path went through nodes allocated to weapon set 1.

Changes Made

Weapon Set Path Validation

• Added GetNodeBlockingReason() with detailed validation logic for different blocking scenarios
• Unified allocation/deallocation blocking in shouldBlockNodeAllocation() and shouldBlockNodeDeallocation() functions
• Connection-based validation checks entire path connectivity including linked nodes

Enhanced User Warnings

• Specific tooltip messages for different blocking reasons (global nodes, path crossing, path through globals)
• Integrated with existing global node warning system

Optimized Validation Logic

• Efficient set-based path checking eliminates nested loops
• Unified direct link and path validation handling
• Directional weapon set compatibility (weapon sets can connect to main tree, not vice versa)

Images

image image

Validations

• Tested weapon set switching and cross-weapon-set allocation attempts
• Verified far node allocation works correctly within same weapon set
• Confirmed blocking works for paths through global nodes while in weapon set mode
• Ensured tooltip warnings appear correctly with specific guidance

@TheDechev TheDechev marked this pull request as ready for review August 30, 2025 21:17
@TheDechev TheDechev force-pushed the fix/prevent-weapon-sets-wrong-node-allocations branch 2 times, most recently from 3f42ffd to 3f2ad78 Compare August 31, 2025 16:32
Comment thread src/Classes/PassiveTreeView.lua Outdated
local connectedToWeaponSetNodes = self:IsConnectedToWeaponSetNodes(node)
return weaponSetMode or connectedToWeaponSetNodes
else
return not self:PathCrossesWeaponSets(node, spec)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function doesn't exist, so I get an error when pathing past a jewel socket:
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Wires77 - crap, I did some last minute cleanups and this got missed.
Try again, it should be okay now.

• Add GetNodeBlockingReason() with detailed validation for different blocking scenarios
• Unify allocation/deallocation blocking in shouldBlockNodeAllocation() and shouldBlockNodeDeallocation()
• Implement connection-based validation that checks entire path connectivity
• Add specific tooltip warnings for global nodes, path crossing, and path through globals
• Support directional weapon set compatibility (weapon sets connect to main tree, not vice versa)
@TheDechev TheDechev force-pushed the fix/prevent-weapon-sets-wrong-node-allocations branch from 3f2ad78 to 4d5a2cc Compare September 2, 2025 06:13
@TheDechev

Copy link
Copy Markdown
Contributor Author

As discussed privately this might be a minor improvement, but it changes the convenient allocation behavior and therefore it'll be abandoned for now to prioritize UX.

@TheDechev TheDechev closed this Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants