diff --git a/fishy/constants.py b/fishy/constants.py index ba0e03c..1789d21 100644 --- a/fishy/constants.py +++ b/fishy/constants.py @@ -8,4 +8,4 @@ lam2 = ("LibAddonMenu-2.0", "https://www.esoui.com/downloads/dl7/LibAddonMenu-2. fishyqr = ("FishyQR", "https://github.com/fishyboteso/FishyQR/files/7575974/FishyQR.zip", 101) libgps = ("LibGPS", "https://cdn.esoui.com/downloads/file601/LibGPS_3_0_3.zip", 30) -version = "0.5.3" +version = "0.5.4" diff --git a/fishy/engine/common/qr_detection.py b/fishy/engine/common/qr_detection.py index 17fdcc1..d93b8b4 100644 --- a/fishy/engine/common/qr_detection.py +++ b/fishy/engine/common/qr_detection.py @@ -52,7 +52,7 @@ def get_values_from_image(img): vals = qr.data.decode('utf-8').split(",") return tuple(float(v) for v in vals) - logging.error("FishyQR not found") + logging.error("FishyQR not found, try to drag it around and try again") return None except Exception: logging.error("Couldn't read coods, make sure 'crop' calibration is correct") diff --git a/fishy/engine/fullautofisher/engine.py b/fishy/engine/fullautofisher/engine.py index 9412798..78bff44 100644 --- a/fishy/engine/fullautofisher/engine.py +++ b/fishy/engine/fullautofisher/engine.py @@ -71,7 +71,7 @@ class FullAuto(IEngine): self.window.crop = get_qr_location(self.window.get_capture()) if self.window.crop is None: - log_raise("FishyQR not found") + log_raise("FishyQR not found, try to drag it around and try again") if not (type(self.mode) is Calibrator) and not self.calibrator.all_calibrated(): log_raise("you need to calibrate first") @@ -116,7 +116,7 @@ class FullAuto(IEngine): todo its waiting for qr which doesn't block the engine when commanded to close """ img = self.window.processed_image(func=image_pre_process) - return get_values_from_image(img) + return get_values_from_image(img)[:3] def move_to(self, target) -> bool: current = self.get_coords() @@ -177,27 +177,17 @@ class FullAuto(IEngine): def look_for_hole(self) -> bool: self._hole_found_flag = False - if FishingMode.CurrentMode == fishing_mode.State.LOOKING: - return True - - def found_hole(e): - if e == fishing_mode.State.LOOKING: - self._hole_found_flag = True - - fishing_mode.subscribers.append(found_hole) + valid_states = [fishing_mode.State.LOOKING, fishing_mode.State.FISHING] t = 0 - while not self._hole_found_flag and t <= 1.25: - mse.move(0, FullAuto.rotate_by) + while not self._hole_found_flag and t <= 2.5: + direction = -1 if t > 1.25 else 1 + mse.move(0, FullAuto.rotate_by*direction) time.sleep(0.05) t += 0.05 - while not self._hole_found_flag and t > 0: - mse.move(0, -FullAuto.rotate_by) - time.sleep(0.05) - t -= 0.05 + self._hole_found_flag = FishingMode.CurrentMode in valid_states self._curr_rotate_y = t - fishing_mode.subscribers.remove(found_hole) return self._hole_found_flag def rotate_back(self): diff --git a/fishy/engine/semifisher/engine.py b/fishy/engine/semifisher/engine.py index e930571..fbbbd62 100644 --- a/fishy/engine/semifisher/engine.py +++ b/fishy/engine/semifisher/engine.py @@ -44,7 +44,7 @@ class SemiFisherEngine(IEngine): self.window.crop = get_qr_location(self.window.get_capture()) if self.window.crop is None: - log_raise("FishyQR not found") + log_raise("FishyQR not found, try to drag it around and try again") while self.start and WindowClient.running(): capture = self.window.processed_image(func=image_pre_process) diff --git a/fishy/helper/migration.py b/fishy/helper/migration.py index a11079a..d6e992c 100644 --- a/fishy/helper/migration.py +++ b/fishy/helper/migration.py @@ -10,7 +10,6 @@ from .config import config class Migration: @staticmethod def up_to_0_5_3(): - helper.remove_addon(*chalutier) config.delete("addoninstalled") @staticmethod