another effect hack
This commit is contained in:
parent
8c1b29473c
commit
4c24e465f7
16
gameview.py
16
gameview.py
@ -2518,7 +2518,7 @@ class GUI(QtGui.QWidget):
|
|||||||
msg += emote[2]+"#" #anim
|
msg += emote[2]+"#" #anim
|
||||||
msg += text+"#"
|
msg += text+"#"
|
||||||
msg += self.charside+"#"
|
msg += self.charside+"#"
|
||||||
msg += emote[4]+"#" #sfx
|
msg += (ini.get_effect_sound(self.effectdropdown.currentText(), self.charname) if self.effectdropdown.currentIndex() > 0 else emote[4])+"#" #sfx
|
||||||
msg += str(modifier)+"#" #emote modifier
|
msg += str(modifier)+"#" #emote modifier
|
||||||
msg += str(self.mychar)+"#" #character ID
|
msg += str(self.mychar)+"#" #character ID
|
||||||
msg += emote[5]+"#" #sfx delay
|
msg += emote[5]+"#" #sfx delay
|
||||||
@ -2784,6 +2784,9 @@ class GUI(QtGui.QWidget):
|
|||||||
m_chatmessage[n_string] = p_contents[n_string]
|
m_chatmessage[n_string] = p_contents[n_string]
|
||||||
else:
|
else:
|
||||||
m_chatmessage[n_string] = ""
|
m_chatmessage[n_string] = ""
|
||||||
|
|
||||||
|
# For debugging
|
||||||
|
# print m_chatmessage
|
||||||
|
|
||||||
f_char_id = int(m_chatmessage[CHAR_ID])
|
f_char_id = int(m_chatmessage[CHAR_ID])
|
||||||
|
|
||||||
@ -3172,6 +3175,11 @@ class GUI(QtGui.QWidget):
|
|||||||
text_delay = ini.read_ini_int(AOpath+"characters/"+f_char+"/char.ini", "textdelay", f_preanim, -1)
|
text_delay = ini.read_ini_int(AOpath+"characters/"+f_char+"/char.ini", "textdelay", f_preanim, -1)
|
||||||
sfx_delay = int(self.m_chatmessage[SFX_DELAY]) * 60
|
sfx_delay = int(self.m_chatmessage[SFX_DELAY]) * 60
|
||||||
|
|
||||||
|
if sfx_delay > 0:
|
||||||
|
self.sfx_delay_timer.start(sfx_delay)
|
||||||
|
else:
|
||||||
|
self.play_sfx()
|
||||||
|
|
||||||
preanim_duration = ao2_duration
|
preanim_duration = ao2_duration
|
||||||
|
|
||||||
anim_to_find = AOpath+"characters/"+f_char+"/"+f_preanim+".gif"
|
anim_to_find = AOpath+"characters/"+f_char+"/"+f_preanim+".gif"
|
||||||
@ -3184,6 +3192,7 @@ class GUI(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.anim_state = 1
|
self.anim_state = 1
|
||||||
self.preanim_done()
|
self.preanim_done()
|
||||||
|
return
|
||||||
|
|
||||||
self.char.play_pre(f_char, f_preanim, preanim_duration, self.scaling[0])
|
self.char.play_pre(f_char, f_preanim, preanim_duration, self.scaling[0])
|
||||||
if noninterrupting:
|
if noninterrupting:
|
||||||
@ -3191,11 +3200,6 @@ class GUI(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.anim_state = 1
|
self.anim_state = 1
|
||||||
|
|
||||||
if sfx_delay > 0:
|
|
||||||
self.sfx_delay_timer.start(sfx_delay)
|
|
||||||
else:
|
|
||||||
self.play_sfx()
|
|
||||||
|
|
||||||
if text_delay >= 0:
|
if text_delay >= 0:
|
||||||
pass #text delay timer, but not now.
|
pass #text delay timer, but not now.
|
||||||
|
|
||||||
|
6
ini.py
6
ini.py
@ -116,9 +116,9 @@ def get_effect_sound(fx_name, char):
|
|||||||
inifile = ConfigParser()
|
inifile = ConfigParser()
|
||||||
inifile.read(p_path)
|
inifile.read(p_path)
|
||||||
for section in inifile.sections():
|
for section in inifile.sections():
|
||||||
if fx_name == read_ini(inifile, section, "name", "").rstrip():
|
if fx_name == read_ini(inifile, section, "name", "").strip():
|
||||||
return read_ini(inifile, section, "sound", "").rstrip()
|
return read_ini(inifile, section, "sound", "").strip()
|
||||||
return read_sectionless_ini(default_path, fx_name)
|
return read_sectionless_ini(default_path, fx_name).strip()
|
||||||
|
|
||||||
def get_effects(char):
|
def get_effects(char):
|
||||||
p_effect = read_ini("base/characters/"+char+"/char.ini", "options", "effects", "default/effects")
|
p_effect = read_ini("base/characters/"+char+"/char.ini", "options", "effects", "default/effects")
|
||||||
|
Loading…
Reference in New Issue
Block a user