handle correct blip sound
This commit is contained in:
parent
a524e0d3ca
commit
bf0db257e4
@ -533,14 +533,14 @@ class RawConfigParser:
|
||||
else:
|
||||
# valueless option handling
|
||||
cursect[optname] = optval
|
||||
else:
|
||||
#else:
|
||||
# a non-fatal parsing error occurred. set up the
|
||||
# exception but keep going. the exception will be
|
||||
# raised at the end of the file and will contain a
|
||||
# list of all bogus lines
|
||||
if not e:
|
||||
e = ParsingError(fpname)
|
||||
e.append(lineno, repr(line))
|
||||
#if not e:
|
||||
# e = ParsingError(fpname)
|
||||
#e.append(lineno, repr(line))
|
||||
# if any parsing errors occurred, raise an exception
|
||||
if e:
|
||||
raise e
|
||||
|
29
gameview.py
29
gameview.py
@ -45,6 +45,7 @@ FRAME_REALIZATION = 27
|
||||
FRAME_SFX = 28
|
||||
ADDITIVE = 29
|
||||
EFFECTS = 30
|
||||
BLIPS = 31
|
||||
|
||||
INLINE_BLUE = 0
|
||||
INLINE_GREEN = 1
|
||||
@ -80,13 +81,13 @@ def encode_ao_str(text):
|
||||
|
||||
def get_char_ini(char, section, value, default=""):
|
||||
tempini = ConfigParser()
|
||||
with open(AOpath + 'characters/' + char.lower() + '/char.ini', 'r') as file:
|
||||
for line in file:
|
||||
try:
|
||||
tempini.readfp(file)
|
||||
except:
|
||||
pass
|
||||
return ini.read_ini(tempini, section, value, default)
|
||||
# with open(AOpath + 'characters/' + char.lower() + '/char.ini', 'r') as file:
|
||||
# for line in file:
|
||||
# try:
|
||||
# tempini.readfp(file)
|
||||
# except:
|
||||
# pass
|
||||
return ini.read_ini(AOpath + 'characters/' + char.lower() + '/char.ini', section, value, default)
|
||||
|
||||
def get_option(section, value, default=""):
|
||||
tempini = ConfigParser()
|
||||
@ -660,7 +661,7 @@ class gui(QtGui.QWidget):
|
||||
time_mod = 40
|
||||
blip = "male"
|
||||
blipsnd = None
|
||||
chatmessage_size = 31
|
||||
chatmessage_size = 32
|
||||
m_chatmessage = []
|
||||
blank_blip = False
|
||||
chatmessage_is_empty = False
|
||||
@ -2287,7 +2288,8 @@ class gui(QtGui.QWidget):
|
||||
else:
|
||||
self.blipsnd = 0
|
||||
|
||||
audio.sethandleattr(self.blipsnd, BASS_ATTRIB_VOL, self.blipslider.value() / 100.0)
|
||||
if self.blipsnd:
|
||||
audio.sethandleattr(self.blipsnd, BASS_ATTRIB_VOL, self.blipslider.value() / 100.0)
|
||||
|
||||
emote_mod = int(self.m_chatmessage[EMOTE_MOD])
|
||||
if emote_mod in (0, 5) and self.m_chatmessage[SCREENSHAKE] == "1":
|
||||
@ -2655,7 +2657,9 @@ class gui(QtGui.QWidget):
|
||||
for char in self.charlist:
|
||||
if not exists(AOpath + 'characters/' + char[0].lower() + '/char.ini'):
|
||||
continue
|
||||
char[2] = get_char_ini(char[0], "options", "gender", "male")
|
||||
char[2] = get_char_ini(char[0], "Options", "gender").lower()
|
||||
if char[2] == "":
|
||||
char[2] = get_char_ini(char[0], "Options", "blips").lower()
|
||||
|
||||
self.realizationbtn.setPressed(False)
|
||||
self.customobject.setPressed(False)
|
||||
@ -2687,11 +2691,6 @@ class gui(QtGui.QWidget):
|
||||
song = song.replace("<and>","&").decode('utf-8')
|
||||
songitem = QtGui.QListWidgetItem()
|
||||
songitem.setText(song)
|
||||
try:
|
||||
if not song.endswith("mp3") and not song.endswith("opus") :
|
||||
print song
|
||||
except:
|
||||
pass
|
||||
if exists(AOpath + 'sounds/music/' + song.lower()):
|
||||
songitem.setBackgroundColor(QtGui.QColor(128, 255, 128))
|
||||
#else:
|
||||
|
Loading…
Reference in New Issue
Block a user