Skip to content

Commit 50fba0c

Browse files
espeon65536FlySniper
authored andcommitted
OoT: fix incorrect calls to sweep_for_events (ArchipelagoMW#2417)
1 parent 5d1eeae commit 50fba0c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

worlds/oot/Rules.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ def set_shop_rules(ootworld):
227227
# The goal is to automatically set item rules based on age requirements in case entrances were shuffled
228228
def set_entrances_based_rules(ootworld):
229229

230-
all_state = ootworld.multiworld.get_all_state(False)
230+
all_state = ootworld.get_state_with_complete_itempool()
231+
all_state.sweep_for_events(locations=ootworld.get_locations())
231232

232233
for location in filter(lambda location: location.type == 'Shop', ootworld.get_locations()):
233234
# If a shop is not reachable as adult, it can't have Goron Tunic or Zora Tunic as child can't buy these

worlds/oot/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,8 @@ def generate_basic(self): # mostly killing locations that shouldn't exist by se
829829
# Kill unreachable events that can't be gotten even with all items
830830
# Make sure to only kill actual internal events, not in-game "events"
831831
all_state = self.get_state_with_complete_itempool()
832-
all_state.sweep_for_events()
833832
all_locations = self.get_locations()
833+
all_state.sweep_for_events(locations=all_locations)
834834
reachable = self.multiworld.get_reachable_locations(all_state, self.player)
835835
unreachable = [loc for loc in all_locations if
836836
(loc.internal or loc.type == 'Drop') and loc.event and loc.locked and loc not in reachable]
@@ -858,7 +858,7 @@ def prefill_state(base_state):
858858
state = base_state.copy()
859859
for item in self.get_pre_fill_items():
860860
self.collect(state, item)
861-
state.sweep_for_events(self.get_locations())
861+
state.sweep_for_events(locations=self.get_locations())
862862
return state
863863

864864
# Prefill shops, songs, and dungeon items
@@ -870,7 +870,7 @@ def prefill_state(base_state):
870870
state = CollectionState(self.multiworld)
871871
for item in self.itempool:
872872
self.collect(state, item)
873-
state.sweep_for_events(self.get_locations())
873+
state.sweep_for_events(locations=self.get_locations())
874874

875875
# Place dungeon items
876876
special_fill_types = ['GanonBossKey', 'BossKey', 'SmallKey', 'HideoutSmallKey', 'Map', 'Compass']

0 commit comments

Comments
 (0)