mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
restructured engine
This commit is contained in:
parent
168e902e36
commit
c8510d56cf
@ -10,7 +10,7 @@ import fishy
|
||||
from fishy import web, helper, gui
|
||||
from fishy.gui import GUI
|
||||
from fishy.helper import Config
|
||||
from fishy.tech import Engine
|
||||
from fishy.engine import SemiFisherEngine
|
||||
|
||||
|
||||
# noinspection PyBroadException
|
||||
@ -53,7 +53,7 @@ def main():
|
||||
if not gui.check_eula(c):
|
||||
return
|
||||
|
||||
bot = Engine(c, lambda: gui_window)
|
||||
bot = SemiFisherEngine(c, lambda: gui_window)
|
||||
gui_window = GUI(c, lambda: bot)
|
||||
|
||||
gui_window.start()
|
||||
|
2
fishy/engine/__init__.py
Normal file
2
fishy/engine/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from fishy.engine.semifisher.funcs import SemiFisherFuncs
|
||||
from fishy.engine.semifisher.engine import SemiFisherEngine
|
0
fishy/engine/semifisher/__init__.py
Normal file
0
fishy/engine/semifisher/__init__.py
Normal file
@ -8,8 +8,8 @@ import logging
|
||||
|
||||
import pywintypes
|
||||
|
||||
from fishy.tech.funcs import EngineFuncs
|
||||
from . import fishing_event
|
||||
from fishy.engine.semifisher.funcs import SemiFisherFuncs
|
||||
from fishy.engine.semifisher import fishing_event
|
||||
from .fishing_event import HookEvent, StickEvent, LookEvent, IdleEvent
|
||||
from .fishing_mode import FishingMode
|
||||
from .pixel_loc import PixelLoc
|
||||
@ -31,9 +31,9 @@ def _wait_and_check(gui):
|
||||
"If fixing those doesnt work, try running the bot as admin")
|
||||
|
||||
|
||||
class Engine:
|
||||
class SemiFisherEngine:
|
||||
def __init__(self, config, gui_ref: 'Callable[[], GUI]'):
|
||||
self.funcs = EngineFuncs(self)
|
||||
self.funcs = SemiFisherFuncs(self)
|
||||
self.get_gui = gui_ref
|
||||
|
||||
self.start = False
|
@ -3,7 +3,7 @@ from threading import Thread
|
||||
|
||||
|
||||
# noinspection PyProtectedMember
|
||||
class EngineFuncs:
|
||||
class SemiFisherFuncs:
|
||||
def __init__(self, engine):
|
||||
self.engine = engine
|
||||
|
@ -3,14 +3,14 @@ from typing import List, Callable
|
||||
import threading
|
||||
|
||||
from fishy.gui.funcs import GUIFuncs
|
||||
from fishy.tech import Engine
|
||||
from fishy.engine import SemiFisherEngine
|
||||
from . import main_gui
|
||||
from .log_config import GUIStreamHandler
|
||||
from fishy.helper import Config
|
||||
|
||||
|
||||
class GUI:
|
||||
def __init__(self, config: Config, get_engine: Callable[[], Engine]):
|
||||
def __init__(self, config: Config, get_engine: Callable[[], SemiFisherEngine]):
|
||||
"""
|
||||
:param config: used to get and set configuration settings
|
||||
"""
|
||||
|
@ -1,2 +0,0 @@
|
||||
from .engine import Engine
|
||||
from .funcs import EngineFuncs
|
Loading…
Reference in New Issue
Block a user