-
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
Pokémon R/B: Fix incompatible option combination #2356
Pokémon R/B: Fix incompatible option combination #2356
Conversation
Co-authored-by: Fabian Dill <[email protected]>
worlds/pokemon_rb/__init__.py
Outdated
if not self.multiworld.key_items_only[self.player]: | ||
if self.multiworld.fossil_check_item_types[self.player] == "key_items": |
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.
if not self.multiworld.key_items_only[self.player]: | |
if self.multiworld.fossil_check_item_types[self.player] == "key_items": | |
if not self.multiworld.key_items_only[self.player]: | |
rule = None | |
if self.multiworld.fossil_check_item_types[self.player] == "key_items": |
Need to establish rule before using it. None isn't necessarily the correct thing to choose here though, I'm just not super sure what is without reviewing the code further.
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.
Another option would be to actually have an "else:" case, in which case declaring it before becomes unnecessary. Technically, even the current code is only wrong because a case was hit that wasn't covered, although that is exactly the reason why you usually shouldn't do this unless you have an "else:"
(For the record: Block scope is not a thing in Python.)
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.
Ahh right, I forgot python is nice like that, letting you have it if every case leads you to setting rule as something
What is this fixing or adding?
You can set
fossil_check_item_types
tono_key_items
but then turnkey_items_only
on, resulting in no non-key-items to fill the fossil checks. This skips processing thefossil_check_item_types
rules at all ifkey_items_only
is onHow was this tested?
Generating with same seed # of a previously failing generation