TUNIC: Deal with other games placing stuff in other worlds during pre_fill #5164
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?
Yes yes, I know, you're not supposed to place stuff in other worlds during pre_fill (presumably, idk if the docs even say that anywhere). But, we've got like 300 non-verified apworlds around. So I'd rather just be more resilient than pout and say "but muh spec".
During the local filler stuff that Tunic does for grass and breakable shuffle, during pre_fill it'll grab a set of locations to fill during stage_pre_fill. If another world fills any of those locations between that Tunic slot's pre_fill and stage_pre_fill, it'll crash when doing place_locked_item. So, this will make it more resilient to that sort of crash by placing it in the item pool. I know we're not supposed to place stuff in the item pool during pre_fill, but you also aren't supposed to fill other worlds' locations during pre_fill. It's something that is out of spec that only happens if something else is out of spec, so I'd say that's fair game.
How was this tested?
LlisandurFF4.txt
Ixrec Tunic.txt
Test gens with FF4FE. Yamls are attached (converted to .txt since github doesn't let you just upload .yamls).