fix(generation): reduce memory usage for bunny walk calculations
This commit is contained in:
2
Rules.py
2
Rules.py
@@ -1714,7 +1714,7 @@ def set_bunny_rules(world, player, inverted):
|
|||||||
queue = deque([(region, [], {region})])
|
queue = deque([(region, [], {region})])
|
||||||
seen_sets = set([frozenset({region})])
|
seen_sets = set([frozenset({region})])
|
||||||
while queue:
|
while queue:
|
||||||
(current, path) = queue.popleft()
|
(current, path, seen) = queue.popleft()
|
||||||
for entrance in current.entrances:
|
for entrance in current.entrances:
|
||||||
new_region = entrance.parent_region
|
new_region = entrance.parent_region
|
||||||
new_seen = seen.union({new_region})
|
new_seen = seen.union({new_region})
|
||||||
|
|||||||
Reference in New Issue
Block a user