diff --git a/tasks/dungeon/state.py b/tasks/dungeon/state.py index e8ddb937f..bff6d08bf 100644 --- a/tasks/dungeon/state.py +++ b/tasks/dungeon/state.py @@ -1,6 +1,6 @@ -import threading from datetime import timedelta +from module.base.base import ModuleBase from module.base.timer import Timer from module.base.utils import crop from module.config.stored.classes import now @@ -125,8 +125,7 @@ class DungeonState(UI): self.dungeon_get_simuni_point(image) self.dungeon_update_stamina(image) - thread = threading.Thread(target=func, args=(self.device.image,)) - thread.start() + ModuleBase.worker.submit(func, self.device.image) def dungeon_stamina_delay(self, dungeon: DungeonList): """ diff --git a/tasks/map/control/control.py b/tasks/map/control/control.py index 5baae4a6f..e9da793a5 100644 --- a/tasks/map/control/control.py +++ b/tasks/map/control/control.py @@ -338,6 +338,7 @@ class MapControl(Combat, AimDetectorMixin): list[str]: A list of walk result """ logger.hr('Goto', level=1) + self.screenshot_tracking_add() self.map_A_timer.clear() self.map_E_timer.clear() self.map_run_2x_timer.clear() diff --git a/tasks/map/route/loader.py b/tasks/map/route/loader.py index 301f73a74..8bf4693aa 100644 --- a/tasks/map/route/loader.py +++ b/tasks/map/route/loader.py @@ -65,6 +65,7 @@ class RouteLoader(UI): self.route_obj.route_module = module self.route_obj.plane = self.plane + self.device.screenshot_tracking.clear() # before_route() try: @@ -102,3 +103,5 @@ class RouteLoader(UI): except (GameStuckError, GameTooManyClickError): logger.error(f'Route failed: {route}') raise + + self.device.screenshot_tracking.clear() diff --git a/tasks/rogue/route/loader.py b/tasks/rogue/route/loader.py index 2095c747c..36ccc0575 100644 --- a/tasks/rogue/route/loader.py +++ b/tasks/rogue/route/loader.py @@ -237,6 +237,7 @@ class RouteLoader(RogueUI, MinimapWrapper, RouteLoader_, CharacterSwitch): """ # To have a newer image, since previous loadings took some time route = self.position_find(skip_first_screenshot=False) + self.screenshot_tracking_add() super().route_run(route) def rogue_run(self, skip_first_screenshot=True):