mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Skip caching get_all_state while setting rules
Since rules have not been set for later worlds, the cache believes the completion condition is freely available if it had been placed previously, which breaks beatable-only key placement.
This commit is contained in:
@@ -213,7 +213,7 @@ class MultiWorld():
|
||||
except KeyError as e:
|
||||
raise KeyError('No such dungeon %s for player %d' % (dungeonname, player)) from e
|
||||
|
||||
def get_all_state(self) -> CollectionState:
|
||||
def get_all_state(self, save_cache=True) -> CollectionState:
|
||||
cached = getattr(self, "_all_state", None)
|
||||
if cached:
|
||||
return cached.copy()
|
||||
@@ -229,7 +229,8 @@ class MultiWorld():
|
||||
subworld.collect(ret, item)
|
||||
ret.sweep_for_events()
|
||||
|
||||
self._all_state = ret
|
||||
if save_cache:
|
||||
self._all_state = ret
|
||||
return ret
|
||||
|
||||
def get_items(self) -> list:
|
||||
|
Reference in New Issue
Block a user