Skip to content

Commit

Permalink
Fixed final bugs in the main globalPlugin code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mush42 committed Oct 11, 2019
1 parent 4b91a24 commit f95ca7f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions addon/globalPlugins/audioThemes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,13 @@ def event_documentLoadComplete(self, obj, nextHandler):

def playObject(self, obj):
order = self.getOrder(obj)
# if the object has a snd property, then play directly!
if getattr(obj, "snd", None):
pass
elif 16384 in obj.states:
obj.snd = SpecialProps.protected
elif order:
obj.snd = order
else:
obj.snd = obj.role
if getattr(obj, "snd", None) is None:
if 16384 in obj.states:
obj.snd = SpecialProps.protected
elif order:
obj.snd = order
else:
obj.snd = obj.role
self.handler.play(obj, obj.snd)

def getOrder(self, obj, parrole=14, chrole=15):
Expand Down

0 comments on commit f95ca7f

Please sign in to comment.