Allow locations to be prioritized for progress item placement (#189)

This commit is contained in:
Brad Humphrey
2022-01-19 20:19:07 -07:00
committed by GitHub
parent ab4fb6e69c
commit ec95ce8329
4 changed files with 371 additions and 45 deletions

View File

@@ -1,5 +1,7 @@
import typing
from BaseClasses import LocationProgressType
if typing.TYPE_CHECKING:
import BaseClasses
@@ -31,6 +33,7 @@ def exclusion_rules(world, player: int, exclude_locations: typing.Set[str]):
else:
add_item_rule(location, lambda i: not (i.advancement or i.never_exclude))
location.excluded = True
location.progress_type = LocationProgressType.EXCLUDED
def set_rule(spot, rule: CollectionRule):
spot.access_rule = rule