mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
hotfix: data not being send, when fishing is interupted
This commit is contained in:
parent
01a8c50769
commit
c86e86b901
@ -1,2 +1,2 @@
|
|||||||
from fishy.__main__ import main
|
from fishy.__main__ import main
|
||||||
__version__ = "0.4.7"
|
__version__ = "0.4.9"
|
||||||
|
@ -53,6 +53,15 @@ def if_eso_is_focused(func):
|
|||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
|
def _sound_and_send_fishy_data():
|
||||||
|
if FishEvent.fishCaught > 0:
|
||||||
|
web.send_hole_deplete(FishEvent.fishCaught, time.time() - FishEvent.hole_start_time, FishEvent.fish_times)
|
||||||
|
FishEvent.fishCaught = 0
|
||||||
|
|
||||||
|
if FishEvent.sound:
|
||||||
|
playsound(helper.manifest_file("sound.mp3"), False)
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
subscribe()
|
subscribe()
|
||||||
FishEvent.jitter = config.get("jitter", False)
|
FishEvent.jitter = config.get("jitter", False)
|
||||||
@ -99,9 +108,12 @@ def fisher_callback(event: State):
|
|||||||
def on_idle():
|
def on_idle():
|
||||||
if FishEvent.previousState in (State.FISHING, State.REELIN):
|
if FishEvent.previousState in (State.FISHING, State.REELIN):
|
||||||
logging.info("FISHING INTERRUPTED")
|
logging.info("FISHING INTERRUPTED")
|
||||||
|
_sound_and_send_fishy_data()
|
||||||
|
|
||||||
if FishEvent.sound:
|
|
||||||
playsound(helper.manifest_file("sound.mp3"), False)
|
def on_depleted():
|
||||||
|
logging.info("HOLE DEPLETED")
|
||||||
|
_sound_and_send_fishy_data()
|
||||||
|
|
||||||
|
|
||||||
def on_lookaway():
|
def on_lookaway():
|
||||||
@ -117,13 +129,6 @@ def on_looking():
|
|||||||
keyboard.press_and_release(FishEvent.action_key)
|
keyboard.press_and_release(FishEvent.action_key)
|
||||||
|
|
||||||
|
|
||||||
def on_depleted():
|
|
||||||
logging.info("HOLE DEPLETED")
|
|
||||||
if FishEvent.fishCaught > 0:
|
|
||||||
web.send_hole_deplete(FishEvent.fishCaught, time.time() - FishEvent.hole_start_time, FishEvent.fish_times)
|
|
||||||
FishEvent.fishCaught = 0
|
|
||||||
|
|
||||||
|
|
||||||
def on_nobait():
|
def on_nobait():
|
||||||
msg = "No bait equipped!"
|
msg = "No bait equipped!"
|
||||||
logging.info(msg)
|
logging.info(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user