Skip to content

Iterate flasks and tinctures in slot order - #10339

Open
rasmuskl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
rasmuskl:ninja/stable-flask-tincture-order
Open

Iterate flasks and tinctures in slot order#10339
rasmuskl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
rasmuskl:ninja/stable-flask-tincture-order

Conversation

@rasmuskl

@rasmuskl rasmuskl commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

env.flasks and env.tinctures are keyed by item table, so pairs() walks them in memory-address order, which differs between processes. That order reaches the modDB and, for tinctures, the limit loop stops early, so it also decided which tinctures applied. CalcSetup now records each slotted item's slot number in env.itemSlotIndex, and mergeFlasks/mergeTinctures iterate in that order with item.id as the tiebreak.

Steps taken to verify a working solution:

Has been running headless in poe.ninja for about a month.

env.flasks and env.tinctures are keyed by item table, so pairs() walks them in memory-address order, which differs between processes. That order reaches the modDB and, for tinctures, the limit loop stops early, so it also decided which tinctures applied. CalcSetup now records each slotted item's slot number in env.itemSlotIndex, and mergeFlasks/mergeTinctures iterate in that order with item.id as the tiebreak.
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