actually use the do_chicken on chicken
This commit is contained in:
@@ -83,7 +83,7 @@ class HealthManager:
|
||||
keyboard.release(self._config.char["stand_still"])
|
||||
keyboard.release(self._config.char["show_items"])
|
||||
time.sleep(0.01)
|
||||
self._ui_manager.save_and_exit()
|
||||
self._ui_manager.save_and_exit(does_chicken=True)
|
||||
self._did_chicken = True
|
||||
kill_thread(run_thread)
|
||||
self._do_monitor = False
|
||||
|
||||
@@ -183,11 +183,12 @@ class TemplateFinder:
|
||||
success, pos = self.search(x, img, roi=roi, threshold=threshold)
|
||||
if success:
|
||||
break
|
||||
if not is_loading_black_roi and success:
|
||||
return True, pos
|
||||
if time_out is not None and (time.time() - start) > time_out:
|
||||
cv2.imwrite(f"info_wait_for_{ref}_time_out.png", img)
|
||||
return False, None
|
||||
if not is_loading_black_roi:
|
||||
if success:
|
||||
return True, pos
|
||||
elif time_out is not None and (time.time() - start) > time_out:
|
||||
cv2.imwrite(f"info_wait_for_{ref}_time_out.png", img)
|
||||
return False, None
|
||||
|
||||
|
||||
# Testing: Have whatever you want to find on the screen
|
||||
|
||||
@@ -136,7 +136,7 @@ class UiManager():
|
||||
keyboard.send("esc")
|
||||
wait(0.1)
|
||||
exit_btn_pos = (self._config.ui_pos["save_and_exit_x"], self._config.ui_pos["save_and_exit_y"])
|
||||
x_m, y_m = self._screen.convert_screen_to_monitor(exit_btn_pos)
|
||||
x_m, y_m = self._screen.convert_screen_to_monitor(exit_btn_pos)
|
||||
away_x_m, away_y_m = self._screen.convert_screen_to_monitor((200, 450))
|
||||
while self._template_finder.search_and_wait(["SAVE_AND_EXIT_NO_HIGHLIGHT","SAVE_AND_EXIT_HIGHLIGHT"], roi=self._config.ui_roi["save_and_exit"], time_out=1.5)[0]:
|
||||
delay = [0.9, 1.1]
|
||||
|
||||
Reference in New Issue
Block a user