diff --git a/worlds/tracker/TrackerClient.py b/worlds/tracker/TrackerClient.py index 26b375754db0..bc87df1c7442 100644 --- a/worlds/tracker/TrackerClient.py +++ b/worlds/tracker/TrackerClient.py @@ -150,6 +150,24 @@ def _cmd_reset_ignored(self): self.ctx.ignored_locations.clear() updateTracker(self.ctx) logger.info("Reset ignored locations.") + def _cmd_next_progression(self): + """Finds all items that will unlock a check immediately when collected, and a best guess of how many new checks they will unlock.""" + updateTracker(self.ctx) + baseLocs = len(self.ctx.locations_available) + counter = Counter() + items_to_check = {item.name for item in self.ctx.multiworld.get_items() if item.game == self.ctx.game and ItemClassification.progression in item.classification} + for item in items_to_check: + self.ctx.manual_items.append(item) + updateTracker(self.ctx) + newlocs = len(self.ctx.locations_available) - baseLocs + if newlocs: + counter[item] = newlocs + self.ctx.manual_items.pop() + if not counter: + logger.info("No item will unlock any checks right now.") + for (item, count) in counter.most_common(): + logger.info(f"{item} unlocks {count} checks.") + updateTracker(self.ctx) class TrackerGameContext(CommonContext):