The Messenger: Use fill hook to help prevent early swap entering and failures #2467
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
https://discord.com/channels/731205301247803413/731214280439103580/1174536333818089482
Basically it's super uncommon and unlikely, but it's possible for the itempool to be shuffled in such a way where both of a player's main movement items get shuffled to the front of the queue, causing them to get placed early and block off most of the multiworld as valid placements. This is a super complicated fix to prevent that situation by moving one of the items but only if both of that players' items are near the very beginning of the queue. The only other solution I thought of is to use the early_items API and force it, but that would require me to do that always which I don't like so this is the path I took. Open to alternatives, but unable to think of something that doesn't just strictly rely on swap.
How was this tested?
tested with following yaml and seed 32514211167490115829
which fails without this change, and succeeds with this change.