fishyboteso/fishy/engine/common/IEngine.py
Adam Saudagar a964c65776 full auto bug fixing
- changed engine.toggle_start to abstract method
- check for state before turning off bot engine
- added and corrected logging messages for contorls and calibration
- callibrate._get_factor returning None fixed
- optimized controls
- removed config for show crop
- recorder now runs asksaveasfile in gui thread and blocks itself till resoponse
- corrrected logic for saving failed files
- semifisher dont log started bot engine if not ran from gui
- added file name label in full auto config top
- call in thread now can return values
- gui now saves location when closed
- dynamic config location, now uses correct document folder if config file is not found in incorrect document folder
2020-12-01 02:34:33 +05:30

34 lines
645 B
Python

import typing
from abc import ABC, abstractmethod
from threading import Thread
from typing import Callable
from fishy.gui.funcs import GUIFuncsMock
if typing.TYPE_CHECKING:
from fishy.gui import GUI
class IEngine(ABC):
def __init__(self, gui_ref: 'Callable[[], GUI]'):
self.get_gui = gui_ref
self.start = False
self.window = None
self.thread = None
@property
def gui(self):
if self.get_gui is None:
return GUIFuncsMock()
return self.get_gui().funcs
@abstractmethod
def toggle_start(self):
...
@abstractmethod
def run(self):
...