diff --git a/Fill.py b/Fill.py index 48ed7253d9d1..e7c46ce3bdd8 100644 --- a/Fill.py +++ b/Fill.py @@ -1146,7 +1146,7 @@ def failed(warning: str, force: bool | str) -> None: candidates = [candidate for candidate in locations if candidate.item is None and bool(candidate.address) == is_real] multiworld.random.shuffle(candidates) - allstate = multiworld.get_all_state(False) + allstate = multiworld.get_all_state() mincount = placement.count["min"] allowed_margin = len(item_candidates) - mincount fill_restrictive(multiworld, allstate, candidates, item_candidates, lock=True, diff --git a/Utils.py b/Utils.py index da0a451a17eb..7bcd40c939c2 100644 --- a/Utils.py +++ b/Utils.py @@ -1081,7 +1081,7 @@ def visualize_regions(root_region: Region, file_name: str, *, Example usage in World code: from Utils import visualize_regions - state = self.multiworld.get_all_state(False) + state = self.multiworld.get_all_state() state.update_reachable_regions(self.player) visualize_regions(self.get_region("Menu"), "my_world.puml", show_entrance_names=True, regions_to_highlight=state.reachable_regions[self.player]) diff --git a/entrance_rando.py b/entrance_rando.py index a417767036ee..13a16afa3503 100644 --- a/entrance_rando.py +++ b/entrance_rando.py @@ -186,7 +186,7 @@ def __init__(self, world: World, entrance_lookup: EntranceLookup, coupled: bool) self.pairings = [] self.world = world self.coupled = coupled - self.collection_state = world.multiworld.get_all_state(False, True) + self.collection_state = world.multiworld.get_all_state(allow_partial_entrances=True) self.entrance_lookup = entrance_lookup @property diff --git a/test/bases.py b/test/bases.py index dd93ca6452dd..1926e16a1a46 100644 --- a/test/bases.py +++ b/test/bases.py @@ -202,7 +202,7 @@ def test_all_state_can_reach_everything(self): if not (self.run_default_tests and self.constructed): return with self.subTest("Game", game=self.game, seed=self.multiworld.seed): - state = self.multiworld.get_all_state(False) + state = self.multiworld.get_all_state() for location in self.multiworld.get_locations(): with self.subTest("Location should be reached", location=location.name): reachable = location.can_reach(state) diff --git a/test/benchmark/locations.py b/test/benchmark/locations.py index 245dcb604e07..f7c1775225ff 100644 --- a/test/benchmark/locations.py +++ b/test/benchmark/locations.py @@ -88,7 +88,7 @@ def main(self): if not locations: continue - all_state = multiworld.get_all_state(False) + all_state = multiworld.get_all_state() for location in locations: time_taken = self.location_test(location, multiworld.state, "empty_state") summary_data["empty_state"][location.name] = time_taken diff --git a/test/general/test_entrances.py b/test/general/test_entrances.py index 79025534ac68..5f09544d70ca 100644 --- a/test/general/test_entrances.py +++ b/test/general/test_entrances.py @@ -49,13 +49,13 @@ def test_all_state_before_connect_entrances(self): original_get_all_state = multiworld.get_all_state def patched_get_all_state(use_cache: bool | None = None, allow_partial_entrances: bool = False, - **kwargs): + **kwargs): #TODO: Remove use_cache once get_all_state() fully deprecates it self.assertTrue(allow_partial_entrances, ( "Before the connect_entrances step finishes, other worlds might still have partial entrances. " "As such, any call to get_all_state must use allow_partial_entrances = True." )) - return original_get_all_state(use_cache, allow_partial_entrances, **kwargs) + return original_get_all_state(allow_partial_entrances, **kwargs) multiworld.get_all_state = patched_get_all_state diff --git a/test/general/test_implemented.py b/test/general/test_implemented.py index de432e369099..254c2544b06b 100644 --- a/test/general/test_implemented.py +++ b/test/general/test_implemented.py @@ -61,7 +61,7 @@ def test_prefill_items(self): with self.subTest(gamename): multiworld = setup_solo_multiworld(world_type, ("generate_early", "create_regions", "create_items", "set_rules", "connect_entrances", "generate_basic")) - allstate = multiworld.get_all_state(False) + allstate = multiworld.get_all_state() locations = multiworld.get_locations() reachable = multiworld.get_reachable_locations(allstate) unreachable = [location for location in locations if location not in reachable] diff --git a/test/general/test_reachability.py b/test/general/test_reachability.py index b45a2bdfc0ef..ffb30117c871 100644 --- a/test/general/test_reachability.py +++ b/test/general/test_reachability.py @@ -49,7 +49,7 @@ def test_default_all_state_can_reach_everything(self): unreachable_regions = self.default_settings_unreachable_regions.get(game_name, set()) with self.subTest("Game", game=game_name): multiworld = setup_solo_multiworld(world_type) - state = multiworld.get_all_state(False) + state = multiworld.get_all_state() for location in multiworld.get_locations(): with self.subTest("Location should be reached", location=location.name): self.assertTrue(location.can_reach(state), f"{location.name} unreachable") diff --git a/test/general/test_state.py b/test/general/test_state.py index 06c4046a6942..e1b4a1c52d90 100644 --- a/test/general/test_state.py +++ b/test/general/test_state.py @@ -26,4 +26,4 @@ def test_all_state_is_available(self): for step in self.test_steps: with self.subTest("Step", step=step): call_all(multiworld, step) - self.assertTrue(multiworld.get_all_state(False, allow_partial_entrances=True)) + self.assertTrue(multiworld.get_all_state(allow_partial_entrances=True)) diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 18e2965d8c5a..f11cdf185088 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -1132,7 +1132,7 @@ def set_trock_key_rules(multiworld, player): for entrance in ['Turtle Rock Dark Room Staircase', 'Turtle Rock (Chain Chomp Room) (North)', 'Turtle Rock (Chain Chomp Room) (South)', 'Turtle Rock Entrance to Pokey Room', 'Turtle Rock (Pokey Room) (South)', 'Turtle Rock (Pokey Room) (North)', 'Turtle Rock Big Key Door']: set_rule(multiworld.get_entrance(entrance, player), lambda state: False) - all_state = multiworld.get_all_state(use_cache=False, allow_partial_entrances=True) + all_state = multiworld.get_all_state(allow_partial_entrances=True) all_state.reachable_regions[player] = set() # wipe reachable regions so that the locked doors actually work all_state.stale[player] = True