Core: move region and location management to worlds #4028
+57
−43
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?
This moves the region, location, and entrance caches to all be per world. There's a layer of back compatibility so all of the
multiworld
related helpers still work, andmultiworld.regions
access still works. latter will need to be deprecated and dropped eventually but unsure if any of the helpers need to be removed, as I haven't looked too deeply into all the core usages of them.todo:
The RegionManager class should be moved to no longer be locally defined under MultiWorld still, but I think the others are fine where they are. Some typing also needs to be fixed, but I'd rather make sure this is fully tested and functional and looks how we want it to before worrying too much about this. Some tests need to be fixed for the changes due to the way they create their multiworlds/worlds.
How was this tested?
A bunch of generations with solo Messenger, multiworld, and item link generations.
If this makes graphical changes, please attach screenshots.