diff --git a/BaseClasses.py b/BaseClasses.py index 4e012429c2..7249138bfc 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -233,7 +233,7 @@ class MultiWorld(): def set_options(self, args: Namespace) -> None: for option_key in Options.common_options: - setattr(self, option_key, getattr(args, option_key, {})) + setattr(self, option_key, getattr(args, option_key, )) for option_key in Options.per_game_common_options: setattr(self, option_key, getattr(args, option_key, {})) diff --git a/worlds/messenger/Options.py b/worlds/messenger/Options.py index 47ebf66f28..0ab1e4ef1e 100644 --- a/worlds/messenger/Options.py +++ b/worlds/messenger/Options.py @@ -1,10 +1,10 @@ -from Options import DefaultOnToggle, DeathLink, Range, Accessibility, Choice +from Options import DefaultOnToggle, DeathLink, Range, ItemsAccessibility, Choice -class MessengerAccessibility(Accessibility): - default = Accessibility.option_locations - # defaulting to locations accessibility since items makes certain items self-locking - __doc__ = Accessibility.__doc__.replace(f"default {Accessibility.default}", f"default {default}") +class MessengerAccessibility(ItemsAccessibility): + default = ItemsAccessibility.option_full + # defaulting to full accessibility since items makes certain items self-locking + __doc__ = ItemsAccessibility.__doc__.replace(f"default {ItemsAccessibility.default}", f"default {default}") class Logic(Choice): diff --git a/worlds/messenger/Rules.py b/worlds/messenger/Rules.py index a459fdb7d0..64083cbcbb 100644 --- a/worlds/messenger/Rules.py +++ b/worlds/messenger/Rules.py @@ -112,7 +112,7 @@ class MessengerRules: lambda state: state.has("Shop Chest", self.player)) multiworld.completion_condition[self.player] = lambda state: state.has("Rescue Phantom", self.player) - if multiworld.accessibility[self.player] > MessengerAccessibility.option_locations: + if multiworld.accessibility[self.player] > MessengerAccessibility.option_full: set_self_locking_items(multiworld, self.player) diff --git a/worlds/pokemon_rb/options.py b/worlds/pokemon_rb/options.py index f33cb566f9..4df0928122 100644 --- a/worlds/pokemon_rb/options.py +++ b/worlds/pokemon_rb/options.py @@ -1,5 +1,5 @@ -from Options import Toggle, Choice, Range, SpecialRange, TextChoice, DeathLink +from Options import Toggle, Choice, Range, SpecialRange, TextChoice, DeathLink, ItemsAccessibility class GameVersion(Choice): @@ -646,6 +646,7 @@ class RandomizePokemonPalettes(Choice): pokemon_rb_options = { + "accessibility": ItemsAccessibility, "game_version": GameVersion, "trainer_name": TrainerName, "rival_name": RivalName, diff --git a/worlds/pokemon_rb/rules.py b/worlds/pokemon_rb/rules.py index c69df00366..38dd281c07 100644 --- a/worlds/pokemon_rb/rules.py +++ b/worlds/pokemon_rb/rules.py @@ -16,7 +16,7 @@ def set_rules(world, player): item_rules["Celadon Prize Corner - Item Prize 2"] = prize_rule item_rules["Celadon Prize Corner - Item Prize 3"] = prize_rule - if world.accessibility[player] != "locations": + if world.accessibility[player] != "full": world.get_location("Cerulean City - Bicycle Shop", player).always_allow = (lambda state, item: item.name == "Bike Voucher" and item.player == player)