Skip to content
2 changes: 1 addition & 1 deletion Fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion entrance_rando.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/general/test_entrances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/general/test_implemented.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion test/general/test_reachability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion test/general/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
2 changes: 1 addition & 1 deletion worlds/alttp/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading