From 850847b9eca9c1e8d9fb77a27f7b184373bbfd7a Mon Sep 17 00:00:00 2001 From: Torantulino Date: Sun, 2 Apr 2023 07:40:32 +0100 Subject: [PATCH] Fixes print_to_console sometiems speaking text when speaking is disabled. --- scripts/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/main.py b/scripts/main.py index fe338ae8..de0f8466 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -17,7 +17,8 @@ class Argument(Enum): SPEAK_MODE = "speak-mode" def print_to_console(title, title_color, content, speak_text = False, min_typing_speed=0.05, max_typing_speed=0.01): - if speak_text: + global cfg + if speak_text and cfg.speak_mode: speak.say_text(f"{title}. {content}") print(title_color + title + " " + Style.RESET_ALL, end="") if content: