Remove some redundant global
calls, minify a few lines
This commit is contained in:
parent
10b2b7f3bf
commit
decd8422f1
2 changed files with 2 additions and 10 deletions
|
@ -9,13 +9,9 @@ from fallout_functions import soundTest, queueIsEmpty, addSound
|
|||
from time import sleep
|
||||
import sys
|
||||
|
||||
hard = False
|
||||
if "--hard" in sys.argv:
|
||||
hard = True
|
||||
hard = "--hard" in sys.argv
|
||||
|
||||
skip = False
|
||||
if "--skip" in sys.argv:
|
||||
skip = True
|
||||
skip = "--skip" in sys.argv
|
||||
|
||||
if "--preload" in sys.argv:
|
||||
soundTest()
|
||||
|
|
|
@ -27,7 +27,6 @@ _playing = False
|
|||
|
||||
_soundQueue = []
|
||||
|
||||
global _queueRunning
|
||||
_queueRunning = False
|
||||
|
||||
|
||||
|
@ -129,7 +128,6 @@ def _playQueue():
|
|||
Internal use - play sounds from a queue
|
||||
"""
|
||||
global _queueRunning
|
||||
global _soundQueue
|
||||
if _queueRunning:
|
||||
return
|
||||
_queueRunning = True
|
||||
|
@ -161,7 +159,6 @@ def soundTest():
|
|||
addSound("poweron")
|
||||
addSound("poweroff")
|
||||
addSound("poweroff")
|
||||
global _soundQueue
|
||||
while not queueIsEmpty():
|
||||
sleep(0.2)
|
||||
|
||||
|
@ -170,7 +167,6 @@ def addSound(file):
|
|||
"""
|
||||
Add sounds to the queue
|
||||
"""
|
||||
global _soundQueue
|
||||
if _soundCheck():
|
||||
_soundQueue.extend([file])
|
||||
|
||||
|
|
Loading…
Reference in a new issue