fix: perf optimization

fix: playthrough calc and drop rules
refactor: using compass_mode for map info
This commit is contained in:
aerinon
2025-12-02 09:46:09 -07:00
parent 0c50e08cdc
commit 3f0c3ed810
6 changed files with 14 additions and 9 deletions

View File

@@ -2279,7 +2279,7 @@ class Location(object):
self.staleness_count = 0
self.locked = False
self.real = not crystal
self.always_allow = lambda item, state: False
self.always_allow = None
self.access_rule = lambda state: True
self.verbose_rule = None
self.item_rule = lambda item: True
@@ -2293,7 +2293,7 @@ class Location(object):
def can_fill(self, state, item, check_access=True):
if not self.valid_multiworld(state, item):
return False
return self.always_allow(state, item) or (self.parent_region.can_fill(item) and self.item_rule(item) and (not check_access or self.can_reach(state)))
return (self.always_allow and self.always_allow(state, item)) or (self.parent_region.can_fill(item) and self.item_rule(item) and (not check_access or self.can_reach(state)))
def valid_multiworld(self, state, item):
if self.type == LocationType.Pot and self.player != item.player: