From 208c65fae667de3438759e66104efe9da47340bc Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sat, 27 Apr 2024 20:28:54 -0500 Subject: [PATCH] Beep on each line, not just the first one --- fallout_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fallout_functions.py b/fallout_functions.py index 35e1d06..a6daa8d 100644 --- a/fallout_functions.py +++ b/fallout_functions.py @@ -34,8 +34,6 @@ def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False, silent = Fa """ wrapper for curses.addstr() which writes the text slowly """ - if not fake_user and not silent: - addSound("beep") width = window.getmaxyx()[1] texts = {0: text} if len(text) > width: @@ -48,6 +46,8 @@ def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False, silent = Fa texts[i+1] = f"{texts[i].split()[-1].strip()}{' '+texts[i+1].strip() if texts.get(i+1) else ''}\n" texts[i] = ' '.join(texts[i].split()[:-1]).strip() + '\n' for txt in texts.values(): + if not fake_user and not silent: + addSound("beep") for i in range(len(txt)): window.addstr(txt[i]) window.refresh()