From a6ec33f30fe62d6bc8e93d013c98750986ad240d Mon Sep 17 00:00:00 2001 From: Semjon Kerner Date: Sun, 20 Feb 2022 19:59:37 +0100 Subject: [PATCH] add short delay to give FishyQR keybind a headsup --- fishy/engine/semifisher/engine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fishy/engine/semifisher/engine.py b/fishy/engine/semifisher/engine.py index 5852c95..5e8b785 100644 --- a/fishy/engine/semifisher/engine.py +++ b/fishy/engine/semifisher/engine.py @@ -32,6 +32,7 @@ class SemiFisherEngine(IEngine): logging.info("Starting the bot engine, look at the fishing hole to start fishing") Thread(target=self._wait_and_check).start() + time.sleep(0.2) capture = self.window.get_capture() if capture is None: logging.error("couldn't get game capture") @@ -66,10 +67,11 @@ class SemiFisherEngine(IEngine): values = get_values_from_image(capture) # if fishyqr fails to get read multiple times, stop the bot if not values: - skip_count += 1 if skip_count >= 5: logging.error("Couldn't read values from FishyQR, Stopping engine...") return + skip_count += 1 + time.sleep(0.1) else: skip_count = 0