Fill: create minimal excluded location rule only once
This commit is contained in:
parent
722b3c5369
commit
0aea1e780f
9
Fill.py
9
Fill.py
|
@ -233,9 +233,12 @@ def accessibility_corrections(world: MultiWorld, state: CollectionState, locatio
|
||||||
def inaccessible_location_rules(world: MultiWorld, state: CollectionState, locations):
|
def inaccessible_location_rules(world: MultiWorld, state: CollectionState, locations):
|
||||||
maximum_exploration_state = sweep_from_pool(state, [])
|
maximum_exploration_state = sweep_from_pool(state, [])
|
||||||
unreachable_locations = [location for location in locations if not location.can_reach(maximum_exploration_state)]
|
unreachable_locations = [location for location in locations if not location.can_reach(maximum_exploration_state)]
|
||||||
for location in unreachable_locations:
|
if unreachable_locations:
|
||||||
add_item_rule(location, lambda item: not ((item.classification & 0b0011) and
|
def forbid_important_item_rule(item: Item):
|
||||||
world.accessibility[item.player] != 'minimal'))
|
return not (item.classification & 0b0011) and world.accessibility[item.player] != 'minimal'
|
||||||
|
|
||||||
|
for location in unreachable_locations:
|
||||||
|
add_item_rule(location, forbid_important_item_rule)
|
||||||
|
|
||||||
|
|
||||||
def distribute_items_restrictive(world: MultiWorld) -> None:
|
def distribute_items_restrictive(world: MultiWorld) -> None:
|
||||||
|
|
Loading…
Reference in New Issue