record shout in logs + default to male blips if not defined in char.ini (controversial)
This commit is contained in:
parent
19743b5c47
commit
503ed0094b
38
gameview.py
38
gameview.py
@ -3489,6 +3489,16 @@ class GUI(QtGui.QWidget):
|
|||||||
# Some characters use " - " instead of "-" for no preanim.
|
# Some characters use " - " instead of "-" for no preanim.
|
||||||
mChatMessage[PREANIM] = mChatMessage[PREANIM].strip()
|
mChatMessage[PREANIM] = mChatMessage[PREANIM].strip()
|
||||||
|
|
||||||
|
customObjection = "custom"
|
||||||
|
try:
|
||||||
|
objectionMod = int(mChatMessage[SHOUT_MOD])
|
||||||
|
except:
|
||||||
|
if "4&" in mChatMessage[SHOUT_MOD]: # custom objection name
|
||||||
|
objectionMod = 4
|
||||||
|
customObjection = mChatMessage[SHOUT_MOD].split("4&")[1] # get the name
|
||||||
|
else: # just in case of mindfuckery
|
||||||
|
objectionMod = 0
|
||||||
|
|
||||||
# TODO: Make logging format customizable
|
# TODO: Make logging format customizable
|
||||||
t = time.localtime()
|
t = time.localtime()
|
||||||
logcharName = fChar
|
logcharName = fChar
|
||||||
@ -3498,16 +3508,24 @@ class GUI(QtGui.QWidget):
|
|||||||
if fChar.lower() != self.charList[fCharId][0].lower():
|
if fChar.lower() != self.charList[fCharId][0].lower():
|
||||||
logcharName = self.charList[fCharId][0] + ' (' + fChar + ')'
|
logcharName = self.charList[fCharId][0] + ' (' + fChar + ')'
|
||||||
|
|
||||||
chatmsg = mChatMessage[CHATMSG]
|
chatmsg = mChatMessage[CHATMSG].strip()
|
||||||
|
|
||||||
if mChatMessage[SHOWNAME] and mChatMessage[SHOWNAME].lower() != fChar.lower():
|
if mChatMessage[SHOWNAME] and mChatMessage[SHOWNAME].lower() != fChar.lower():
|
||||||
try:
|
try:
|
||||||
logcharName += " (" + mChatMessage[SHOWNAME]+")"
|
logcharName += " (" + mChatMessage[SHOWNAME]+")"
|
||||||
except:
|
except:
|
||||||
logcharName += " (???)"
|
logcharName += " (???)"
|
||||||
|
|
||||||
|
if objectionMod == 1:
|
||||||
|
self.ICLog.append(timestamp + '%s: %s' % (logcharName, "<b>Hold it!</b>"))
|
||||||
|
elif objectionMod == 2 or objectionMod == 4:
|
||||||
|
self.ICLog.append(timestamp + '%s: %s' % (logcharName, "<b>Objection!</b>"))
|
||||||
|
elif objectionMod == 3:
|
||||||
|
self.ICLog.append(timestamp + '%s: %s' % (logcharName, "<b>Take that!</b>"))
|
||||||
|
|
||||||
if evidence == -1:
|
if evidence == -1:
|
||||||
self.ICLog.append(timestamp + '%s: %s' % (logcharName, chatmsg.replace("<", "<")))
|
if chatmsg:
|
||||||
|
self.ICLog.append(timestamp + '%s: %s' % (logcharName, chatmsg.replace("<", "<")))
|
||||||
else:
|
else:
|
||||||
eviname = '(NULL) %d' % evidence
|
eviname = '(NULL) %d' % evidence
|
||||||
try:
|
try:
|
||||||
@ -3518,16 +3536,6 @@ class GUI(QtGui.QWidget):
|
|||||||
self.ICLog.append(timestamp + '%s: %s\n%s presented an evidence: %s' % (logcharName, chatmsg, fChar, eviname.strip()))
|
self.ICLog.append(timestamp + '%s: %s\n%s presented an evidence: %s' % (logcharName, chatmsg, fChar, eviname.strip()))
|
||||||
|
|
||||||
self.isAdditive = (mChatMessage[ADDITIVE] == "1")
|
self.isAdditive = (mChatMessage[ADDITIVE] == "1")
|
||||||
|
|
||||||
customObjection = "custom"
|
|
||||||
try:
|
|
||||||
objectionMod = int(mChatMessage[SHOUT_MOD])
|
|
||||||
except:
|
|
||||||
if "4&" in mChatMessage[SHOUT_MOD]: # custom objection name
|
|
||||||
objectionMod = 4
|
|
||||||
customObjection = mChatMessage[SHOUT_MOD].split("4&")[1] # get the name
|
|
||||||
else: # just in case of mindfuckery
|
|
||||||
objectionMod = 0
|
|
||||||
|
|
||||||
if objectionMod <= 4 and objectionMod >= 1:
|
if objectionMod <= 4 and objectionMod >= 1:
|
||||||
# Skip everything in the queue, show message immediately
|
# Skip everything in the queue, show message immediately
|
||||||
@ -4019,6 +4027,8 @@ class GUI(QtGui.QWidget):
|
|||||||
|
|
||||||
if not self.blip:
|
if not self.blip:
|
||||||
self.blip = self.charList[charid][2].lower()
|
self.blip = self.charList[charid][2].lower()
|
||||||
|
if not self.blip:
|
||||||
|
self.blip = "male"
|
||||||
|
|
||||||
path = testPath(
|
path = testPath(
|
||||||
AOpath + "sounds/blips/"+ self.blip +".wav",
|
AOpath + "sounds/blips/"+ self.blip +".wav",
|
||||||
@ -4639,8 +4649,10 @@ class GUI(QtGui.QWidget):
|
|||||||
if not exists(AOpath + 'characters/' + char[0].lower() + '/char.ini'):
|
if not exists(AOpath + 'characters/' + char[0].lower() + '/char.ini'):
|
||||||
continue
|
continue
|
||||||
char[2] = getCharIni(char[0], "Options", "gender").lower()
|
char[2] = getCharIni(char[0], "Options", "gender").lower()
|
||||||
if char[2] == "":
|
if not char[2]:
|
||||||
char[2] = getCharIni(char[0], "Options", "blips").lower()
|
char[2] = getCharIni(char[0], "Options", "blips").lower()
|
||||||
|
if not char[2]:
|
||||||
|
char[2] = "male"
|
||||||
|
|
||||||
self.btnRealization.setPressed(False)
|
self.btnRealization.setPressed(False)
|
||||||
self.btnCustomObjection.setPressed(False)
|
self.btnCustomObjection.setPressed(False)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user