Skip to content

Commit

Permalink
Fix Olmec Ship cutscene gem tracker issue
Browse files Browse the repository at this point in the history
Going from Tiamat to Sunken City does two extra level transitions (6-4 => 6-1 => 6-4 => 7-1). These should be excluded (they have the BASE_CAMP theme).
  • Loading branch information
Gugubo authored and gmjosack committed Dec 5, 2023
1 parent c897358 commit 0ce6270
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/modlunky2/ui/trackers/gem.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def poll(self, proc: Spel2Process, config: GemTrackerConfig) -> WindowData:
return None

level_has_ghost = game_state.theme not in [
Theme.BASE_CAMP,
Theme.OLMEC,
Theme.ABZU,
Theme.DUAT,
Expand All @@ -223,7 +224,9 @@ def poll(self, proc: Spel2Process, config: GemTrackerConfig) -> WindowData:
level = game_state.level

# On level change
if world != self.world or level != self.level:
if (
world != self.world or level != self.level
) and game_state.theme != Theme.BASE_CAMP:
# Update world and level
self.world = world
self.level = level
Expand Down
4 changes: 3 additions & 1 deletion src/modlunky2/ui/trackers/pacino_golf_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ def poll(self, proc: Spel2Process, config: PacinoGolfTrackerConfig) -> WindowDat
level = game_state.level

# Save treasure strokes on level change
if world != self.world or level != self.level:
if (
world != self.world or level != self.level
) and game_state.theme != Theme.BASE_CAMP:
self.world = world
self.level = level
self.treasure_strokes += self.treasure_strokes_level
Expand Down

0 comments on commit 0ce6270

Please sign in to comment.