diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-29 12:31:01 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-29 12:31:01 -0400 |
| commit | 99191f3aa87b2362516971c1fdd64d21b16f87b7 (patch) | |
| tree | 336a0fff582e0709f7cc60b3e46fff5f10d6b649 /apworld/tracker.py | |
| parent | 91f829a193b9fd7686bd401bc0704f26bf75dafc (diff) | |
| download | lingo2-archipelago-99191f3aa87b2362516971c1fdd64d21b16f87b7.tar.gz lingo2-archipelago-99191f3aa87b2362516971c1fdd64d21b16f87b7.tar.bz2 lingo2-archipelago-99191f3aa87b2362516971c1fdd64d21b16f87b7.zip | |
Show when goal is reachable in tracker
Diffstat (limited to 'apworld/tracker.py')
| -rw-r--r-- | apworld/tracker.py | 6 |
1 files changed, 6 insertions, 0 deletions
| diff --git a/apworld/tracker.py b/apworld/tracker.py index cf2dbe1..7239b65 100644 --- a/apworld/tracker.py +++ b/apworld/tracker.py | |||
| @@ -22,6 +22,7 @@ class Tracker: | |||
| 22 | checked_locations: set[int] | 22 | checked_locations: set[int] |
| 23 | accessible_locations: set[int] | 23 | accessible_locations: set[int] |
| 24 | accessible_worldports: set[int] | 24 | accessible_worldports: set[int] |
| 25 | goal_accessible: bool | ||
| 25 | 26 | ||
| 26 | state: CollectionState | 27 | state: CollectionState |
| 27 | 28 | ||
| @@ -31,6 +32,7 @@ class Tracker: | |||
| 31 | self.checked_locations = set() | 32 | self.checked_locations = set() |
| 32 | self.accessible_locations = set() | 33 | self.accessible_locations = set() |
| 33 | self.accessible_worldports = set() | 34 | self.accessible_worldports = set() |
| 35 | self.goal_accessible = False | ||
| 34 | 36 | ||
| 35 | def setup_slot(self, slot_data): | 37 | def setup_slot(self, slot_data): |
| 36 | Lingo2World.for_tracker = True | 38 | Lingo2World.for_tracker = True |
| @@ -94,6 +96,7 @@ class Tracker: | |||
| 94 | 96 | ||
| 95 | self.accessible_locations = set() | 97 | self.accessible_locations = set() |
| 96 | self.accessible_worldports = set() | 98 | self.accessible_worldports = set() |
| 99 | self.goal_accessible = False | ||
| 97 | 100 | ||
| 98 | for region in self.state.reachable_regions[PLAYER_NUM]: | 101 | for region in self.state.reachable_regions[PLAYER_NUM]: |
| 99 | for location in region.locations: | 102 | for location in region.locations: |
| @@ -104,3 +107,6 @@ class Tracker: | |||
| 104 | elif hasattr(location, "port_id"): | 107 | elif hasattr(location, "port_id"): |
| 105 | if location.port_id not in self.manager.worldports: | 108 | if location.port_id not in self.manager.worldports: |
| 106 | self.accessible_worldports.add(location.port_id) | 109 | self.accessible_worldports.add(location.port_id) |
| 110 | elif hasattr(location, "goal") and location.goal: | ||
| 111 | if not self.manager.goaled: | ||
| 112 | self.goal_accessible = True | ||
