Compare commits
3 commits
64ddd9075c
...
0f8a359f16
Author | SHA1 | Date | |
---|---|---|---|
0f8a359f16 | |||
4bc7345546 | |||
d8fe0b6f50 |
2 changed files with 6 additions and 4 deletions
|
@ -14,8 +14,9 @@ If you want an extra challenge, you could do hard mode, where the user must manu
|
||||||
|
|
||||||
You can also skip the password entry entirely if you'd prefer, by adding `--skip` to the flags.
|
You can also skip the password entry entirely if you'd prefer, by adding `--skip` to the flags.
|
||||||
|
|
||||||
And if you'd like to preload sounds, in case of playback issues, add `--preload` to the flags.
|
If you'd like to preload sounds, in case of playback issues, add `--preload` to the flags.
|
||||||
|
|
||||||
|
Finally, if you'd prefer not to have sound, you may add `--no-sound` to the flags.
|
||||||
|
|
||||||
Passwords
|
Passwords
|
||||||
================
|
================
|
||||||
|
|
|
@ -30,7 +30,7 @@ _queueRunning = False
|
||||||
|
|
||||||
def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False):
|
def slowWrite(window, text, pause = LETTER_PAUSE, fake_user = False):
|
||||||
"""
|
"""
|
||||||
wrapper for curses.addstr() which writes the text slowely
|
wrapper for curses.addstr() which writes the text slowly
|
||||||
"""
|
"""
|
||||||
if not fake_user:
|
if not fake_user:
|
||||||
addSound("beep")
|
addSound("beep")
|
||||||
|
@ -114,7 +114,7 @@ def _playQueue():
|
||||||
if _queueRunning:
|
if _queueRunning:
|
||||||
return
|
return
|
||||||
_queueRunning = True
|
_queueRunning = True
|
||||||
while 1:
|
while _soundCheck():
|
||||||
if len(_soundQueue) > 0:
|
if len(_soundQueue) > 0:
|
||||||
_playSound(_soundQueue[0], True)
|
_playSound(_soundQueue[0], True)
|
||||||
_soundQueue.pop(0)
|
_soundQueue.pop(0)
|
||||||
|
@ -152,7 +152,8 @@ def addSound(file):
|
||||||
Add sounds to the queue
|
Add sounds to the queue
|
||||||
"""
|
"""
|
||||||
global _soundQueue
|
global _soundQueue
|
||||||
_soundQueue.extend([file])
|
if soundCheck():
|
||||||
|
_soundQueue.extend([file])
|
||||||
|
|
||||||
|
|
||||||
_queueMgr = Thread(target=_playQueue)
|
_queueMgr = Thread(target=_playQueue)
|
||||||
|
|
Loading…
Reference in a new issue