From b2d43df57e13a715c155f15230dac40759904191 Mon Sep 17 00:00:00 2001 From: Semjon Kerner Date: Thu, 15 Apr 2021 17:03:08 +0200 Subject: [PATCH] playsound whenever user interaction is required --- fishy/engine/semifisher/fishing_event.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fishy/engine/semifisher/fishing_event.py b/fishy/engine/semifisher/fishing_event.py index 5c6527e..1a09ba5 100644 --- a/fishy/engine/semifisher/fishing_event.py +++ b/fishy/engine/semifisher/fishing_event.py @@ -137,6 +137,9 @@ def on_nobait(): logging.info(msg) web.send_notification(msg) + if FishEvent.sound: + playsound(helper.manifest_file("sound.mp3"), False) + def on_fishing(): FishEvent.stickInitTime = time.time() @@ -177,14 +180,23 @@ def on_invfull(): logging.info(msg) web.send_notification(msg) + if FishEvent.sound: + playsound(helper.manifest_file("sound.mp3"), False) + def on_fight(): msg = "FIGHTING!" logging.info(msg) web.send_notification(msg) + if FishEvent.sound: + playsound(helper.manifest_file("sound.mp3"), False) + def on_dead(): msg = "Character is dead!" logging.info(msg) web.send_notification(msg) + + if FishEvent.sound: + playsound(helper.manifest_file("sound.mp3"), False)