Skip to content

Fix weapon set allocation issues + add colour to nodes#1904

Merged
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/weapon-set-path-allocation
May 22, 2026
Merged

Fix weapon set allocation issues + add colour to nodes#1904
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/weapon-set-path-allocation

Conversation

@unrealdreamz
Copy link
Copy Markdown
Contributor

Summary

Prevent normal passive allocation from continuing through weapon-set-only branches.

Fixes #1532

Root Cause

Passive path construction treats every allocated node as a path root without remembering which root produced a candidate path. That means a node at the end of a weapon-set branch can become the closest root for the next unallocated passive. When allocation mode is switched back to normal, AllocNode only checks that a path exists, so it can allocate a normal passive from a weapon-set-only branch.

Fix

  • Track the allocated root that produced each passive path via pathRoot.
  • Clear pathRoot whenever paths are rebuilt, alongside path/pathDist.
  • In normal allocation mode, reject paths rooted in an allocated weapon-set node or explicitly passing through one.
  • Leave weapon-set mode allocation unchanged.
  • Added a focused passive-spec regression that:
    • allocates one normal node,
    • allocates the next node in weapon set 1,
    • proves normal mode cannot continue beyond that branch,
    • proves weapon set 1 still can.

Validation

Local validation run:

git diff --check
PASS (CRLF normalization warnings only)

git diff --cached --check
PASS (CRLF normalization warnings only)

git show --check --stat --oneline HEAD
PASS (CRLF normalization warnings only)

I did not run Docker/Busted locally because the available full test runner is container-based and I was avoiding external test containers/windows during this session.

Risk / Rollback

Risk is localized to passive allocation/path bookkeeping. The guard applies only while normal allocation mode is selected; weapon-set mode continues to use the existing path behavior. Rollback is the single commit if an unexpected valid normal-path edge case appears.

unrealdreamz and others added 3 commits May 18, 2026 18:25
Fixes many issues with the pathing logic and node art
Adds the weapon set colours to the nodes in that set
@LocalIdentity LocalIdentity added the bug: behaviour Behavioral differences label May 22, 2026
@LocalIdentity LocalIdentity changed the title Fix weapon set branch path allocation Fix weapon set allocation issues + add colour to nodes May 22, 2026
Copy link
Copy Markdown
Contributor

@LocalIdentity LocalIdentity left a comment

Choose a reason for hiding this comment

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

I fixed the logic for this as there were many mistakes and edge cases that were not covered

@LocalIdentity LocalIdentity merged commit 2d2d6c8 into PathOfBuildingCommunity:dev May 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: behaviour Behavioral differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weapon Set Passives – Invalid Allocation

2 participants