Skip to content

Fix duplicated socket parsing on item rebuild#2367

Draft
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:fix/item-import-rune-sockets
Draft

Fix duplicated socket parsing on item rebuild#2367
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:fix/item-import-rune-sockets

Conversation

@mcagnion

Copy link
Copy Markdown
Contributor

📝 Summary

  • Fix pasted game items rebuilding duplicate socket lines.
  • Prevent parsed Sockets: and Rune: spec lines from also being retained as modifier text, which could make Edit/Save turn 2 sockets into 4.

📦 Changes

  • Item:ParseRaw now consumes structured Sockets and Rune lines after updating item socket/rune fields.
  • Adds a regression test for ParseRaw -> BuildRaw -> ParseRaw to keep one Sockets: line and two sockets after reimport.

🧪 Test plan

  • busted D:/GitHub/PathOfBuilding-PoE2/spec/System/TestItemParse_spec.lua
  • busted D:/GitHub/PathOfBuilding-PoE2/spec/System/TestItemsTab_spec.lua
  • git diff --check (CRLF warnings only)

⚠️ Risks/notes

  • Duplicate same-type Sockets: lines no longer accumulate; this matches the bug fix because socket spec lines are structured item data, not item modifiers.
  • Claude/Gemini local review was unavailable; a user-authorized Codex subagent fallback reviewed and approved the diff.

🤖 Generated with Codex

Avoid treating parsed Sockets and Rune lines as item modifier text so rebuilt pasted items do not gain duplicate sockets after Edit/Save.
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.

1 participant