Merge pull request #109 from fishyboteso/feature/hotkey_fishyQR

This commit is contained in:
Adam Saudagar 2022-02-25 04:56:37 +05:30 committed by GitHub
commit a8a41a1660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,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")
@ -67,10 +68,11 @@ class SemiFisherEngine(IEngine):
self.values = get_values_from_image(capture)
# if fishyqr fails to get read multiple times, stop the bot
if not self.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