fullauto player now waits for first loop of semifisher to complete before looking for hole

This commit is contained in:
Adam Saudagar 2022-04-09 01:40:40 +05:30
parent fb08e29ae6
commit 8b2ba7a600
2 changed files with 4 additions and 0 deletions
fishy/engine
fullautofisher/mode
semifisher

@ -91,6 +91,7 @@ class Player(IMode):
return
self.engine.fisher.turn_on()
helper.wait_until(lambda: self.engine.fisher.first_loop_done)
# scan for fish hole
logging.info("scanning")
# if found start fishing and wait for hole to complete

@ -23,6 +23,7 @@ class SemiFisherEngine(IEngine):
self.window = None
self.values = None
self.name = "SemiFisher"
self.first_loop_done = False
def run(self):
"""
@ -53,6 +54,7 @@ class SemiFisherEngine(IEngine):
print_exc()
fishing_event.unsubscribe()
self.first_loop_done = False
def _engine_loop(self):
skip_count = 0
@ -78,6 +80,7 @@ class SemiFisherEngine(IEngine):
if self.values:
fishing_mode.loop(self.values[3])
self.first_loop_done = True
time.sleep(0.1)
def _wait_and_check(self):