mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Allow locations to be prioritized for progress item placement (#189)
This commit is contained in:
@@ -787,7 +787,7 @@ class Region(object):
|
||||
self.type = type_
|
||||
self.entrances = []
|
||||
self.exits = []
|
||||
self.locations = []
|
||||
self.locations: List[Location] = []
|
||||
self.dungeon = None
|
||||
self.shop = None
|
||||
self.world = world
|
||||
@@ -908,6 +908,11 @@ class Boss():
|
||||
return f"Boss({self.name})"
|
||||
|
||||
|
||||
class LocationProgressType(Enum):
|
||||
DEFAULT = 1
|
||||
PRIORITY = 2
|
||||
EXCLUDED = 3
|
||||
|
||||
class Location():
|
||||
# If given as integer, then this is the shop's inventory index
|
||||
shop_slot: Optional[int] = None
|
||||
@@ -919,6 +924,7 @@ class Location():
|
||||
show_in_spoiler: bool = True
|
||||
excluded: bool = False
|
||||
crystal: bool = False
|
||||
progress_type: LocationProgressType = LocationProgressType.DEFAULT
|
||||
always_allow = staticmethod(lambda item, state: False)
|
||||
access_rule = staticmethod(lambda state: True)
|
||||
item_rule = staticmethod(lambda item: True)
|
||||
|
Reference in New Issue
Block a user