Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Doug Hoskisson <[email protected]>
  • Loading branch information
Mysteryem and beauxq authored Nov 11, 2024
1 parent 5bc738d commit 77fc36e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions worlds/zillion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def flush(self) -> None:
my_locations: List[ZillionLocation] = []
""" This is kind of a cache to avoid iterating through all the multiworld locations in logic. """
finalized_gen_data: Optional[GenData]
""" Finalized generation data needed by `generate_output` directly and by `fill_slot_data` indirectly. """
""" Finalized generation data needed by `generate_output` and by `fill_slot_data`. """
item_locations_finalization_lock: threading.Lock
"""
This lock is used in `generate_output` and `fill_slot_data` to ensure synchronized access to `finalized_gen_data`,
Expand Down Expand Up @@ -407,10 +407,7 @@ def fill_slot_data(self) -> ZillionSlotInfo: # json of WebHostLib.models.Slot
# TODO: tell client which canisters are keywords
# so it can open and get those when restoring doors

# `self.zz_system.get_game()` requires that item locations have been finalized.
self.finalize_item_locations_thread_safe()
assert self.zz_system.randomizer, "didn't get randomizer from generate_early"
game = self.zz_system.get_game()
game = self.finalize_item_locations_thread_safe().zz_game
return get_slot_info(game.regions, game.char_order[0], game.loc_name_2_pretty)

# end of ordered Main.py calls
Expand Down

0 comments on commit 77fc36e

Please sign in to comment.