If the correct item was added it had the swap stripped. When the non swap counterpart is iterated over item is set to nil which is later assigned to the map with effectively the same key as the existing element removing it from the table.
Additionally this pr uses goto to skip iterations where item is explicitly set to nil. I can't think of any other cases where this change could affect things other than the issue being solved.
Fixes #7644
Description of the problem being solved:
When using
weaponSet
2 some items withslotName
s containing swap would get clobbered depending on order inbuild.itemsTab.orderedSlots
.https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/ad60a7a1a3d50ea88c0ba20394a0c618a3fc58af/src/Modules/CalcSetup.lua#L670-L675
If the correct item was added it had the swap stripped. When the non swap counterpart is iterated over item is set to nil which is later assigned to the map with effectively the same key as the existing element removing it from the table.
Additionally this pr uses goto to skip iterations where item is explicitly set to nil. I can't think of any other cases where this change could affect things other than the issue being solved.
Steps taken to verify a working solution:
Link to a build that showcases this PR:
Before screenshot:
After screenshot: