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