fishyboteso/fishy/engine/fullautofisher/test.py
Adam Saudagar 4ea27ae7da added a null check in get_coords
changed print_exec to print in both console and fishy
fixed engine couldn't be stoped with toggle
fixed full auto stop getting called multiple times due to inactive stop
set logging for d3dshot to info, to remove debug logs caused by it
2022-02-01 22:20:57 +05:30

36 lines
953 B
Python

import logging
from fishy.engine.fullautofisher.engine import FullAuto
class Test:
def __init__(self, engine: FullAuto):
self.engine = engine
self.target = None
# noinspection PyProtectedMember
def print_coords(self):
logging.info(self.engine.get_coords())
def set_target(self):
self.target = self.engine.get_coords()
logging.info(f"target_coods are {self.target}")
def move_to_target(self):
if not self.target:
logging.info("please set a target first")
self.engine.move_to(self.target)
def rotate_to_target(self):
if not self.target:
logging.info("please set a target first")
self.engine.rotate_to(self.target[2])
def look_for_hole(self):
logging.info("looking for a hole")
if self.engine.look_for_hole():
logging.info("found a hole")
else:
logging.info("no hole found")