mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
61 lines
1.3 KiB
Python
61 lines
1.3 KiB
Python
from fishing_mode import *
|
|
|
|
|
|
class FishEvent(ABC):
|
|
@abstractmethod
|
|
def onEnterCallback(self, previousMode):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def onExitCallback(self, currentMode):
|
|
pass
|
|
|
|
class HookEvent(FishEvent):
|
|
|
|
def onEnterCallback(self, previousMode):
|
|
G.fishCaught += 1
|
|
timeToHook = time.time() - G.stickInitTime
|
|
print("HOOOOOOOOOOOOOOOOOOOOOOOK....... " + str(G.fishCaught) + " caught " + " in " + str(
|
|
round_float(timeToHook)) + " secs")
|
|
pyautogui.press('e')
|
|
|
|
def onExitCallback(self, currentMode):
|
|
pass
|
|
|
|
|
|
class LookEvent(FishEvent):
|
|
|
|
def onEnterCallback(self, previousMode):
|
|
pyautogui.press('e')
|
|
|
|
def onExitCallback(self, currentMode):
|
|
pass
|
|
|
|
|
|
class IdleEvent(FishEvent):
|
|
|
|
def __init__(self, use_net):
|
|
self.use_net = use_net
|
|
|
|
def onEnterCallback(self, previousMode):
|
|
G.fishCaught = 0
|
|
if self.use_net:
|
|
net.sendHoleDeplete(G.fishCaught)
|
|
|
|
if previousMode.name == "hook":
|
|
print("HOLE DEPLETED")
|
|
elif previousMode.name == "stick":
|
|
print("FISHING INTERRUPTED")
|
|
|
|
def onExitCallback(self, currentMode):
|
|
pass
|
|
|
|
|
|
class StickEvent(FishEvent):
|
|
|
|
def onEnterCallback(self, previousMode):
|
|
G.stickInitTime = time.time()
|
|
|
|
def onExitCallback(self, currentMode):
|
|
pass
|