-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raft: Fix item prefilling #1878
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Berserker66
reviewed
Jun 20, 2023
Awareqwx
approved these changes
Jun 20, 2023
Awareqwx
approved these changes
Jun 20, 2023
Berserker66
reviewed
Jun 20, 2023
@@ -129,15 +146,15 @@ def collect_item(self, state, item, remove=False): | |||
return super(RaftWorld, self).collect_item(state, item, remove) | |||
|
|||
def pre_fill(self): | |||
if self.multiworld.island_frequency_locations[self.player] == 0: | |||
if self.multiworld.island_frequency_locations[self.player] == 0: # Vanilla |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
if self.multiworld.island_frequency_locations[self.player] == 0: # Vanilla | |
if self.multiworld.island_frequency_locations[self.player] == "vanilla": |
for future reference, you can just do that.
Berserker66
approved these changes
Jun 20, 2023
Witchybun
pushed a commit
to Witchybun/Archipelago
that referenced
this pull request
Jun 26, 2023
FlySniper
pushed a commit
to FlySniper/Archipelago
that referenced
this pull request
Nov 14, 2023
Jouramie
pushed a commit
to Jouramie/Archipelago
that referenced
this pull request
Feb 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Raft is prefilling frequencies incorrectly when multiple Raft worlds with different frequencies are used in the same multiworld. This makes Raft worlds use their own items instead of any Raft world's items.
Currently, what Raft's prefilling is doing is it's looking for the first item with a given name in the item pool. When every Raft player in a multiworld has similar settings (in this case, everyone either has prefilled items or does not have prefilled items), this is not a problem -- players' items are inserted into the item pool and removed from the item pool in (hopefully) the same order, so their generations are correct. However, when there are different settings in different Raft worlds, problems arise. Now, the Raft worlds that prefill items are at risk of using other Raft worlds' items, since they're pulling the first item with a given name, rather than guaranteeing their own item.
This does three things:
How was this tested?
Manually tested multiple different Raft configurations with multiple different settings for frequency placement in multiple multiworld generations, and verified that each Raft world's locations were in an expected spot.
I also mixed up the order of the frequency placements to verify that it wasn't just a "lucky order" in which players' items were prefilled.