record shout in logs + default to male blips if not defined in char.ini (controversial)
This commit is contained in:
parent
19743b5c47
commit
503ed0094b
36
gameview.py
36
gameview.py
@ -3489,6 +3489,16 @@ class GUI(QtGui.QWidget):
|
||||
# Some characters use " - " instead of "-" for no preanim.
|
||||
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
|
||||
t = time.localtime()
|
||||
logcharName = fChar
|
||||
@ -3498,7 +3508,7 @@ class GUI(QtGui.QWidget):
|
||||
if fChar.lower() != self.charList[fCharId][0].lower():
|
||||
logcharName = self.charList[fCharId][0] + ' (' + fChar + ')'
|
||||
|
||||
chatmsg = mChatMessage[CHATMSG]
|
||||
chatmsg = mChatMessage[CHATMSG].strip()
|
||||
|
||||
if mChatMessage[SHOWNAME] and mChatMessage[SHOWNAME].lower() != fChar.lower():
|
||||
try:
|
||||
@ -3506,7 +3516,15 @@ class GUI(QtGui.QWidget):
|
||||
except:
|
||||
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 chatmsg:
|
||||
self.ICLog.append(timestamp + '%s: %s' % (logcharName, chatmsg.replace("<", "<")))
|
||||
else:
|
||||
eviname = '(NULL) %d' % evidence
|
||||
@ -3519,16 +3537,6 @@ class GUI(QtGui.QWidget):
|
||||
|
||||
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:
|
||||
# Skip everything in the queue, show message immediately
|
||||
self.inboxQueue = []
|
||||
@ -4019,6 +4027,8 @@ class GUI(QtGui.QWidget):
|
||||
|
||||
if not self.blip:
|
||||
self.blip = self.charList[charid][2].lower()
|
||||
if not self.blip:
|
||||
self.blip = "male"
|
||||
|
||||
path = testPath(
|
||||
AOpath + "sounds/blips/"+ self.blip +".wav",
|
||||
@ -4639,8 +4649,10 @@ class GUI(QtGui.QWidget):
|
||||
if not exists(AOpath + 'characters/' + char[0].lower() + '/char.ini'):
|
||||
continue
|
||||
char[2] = getCharIni(char[0], "Options", "gender").lower()
|
||||
if char[2] == "":
|
||||
if not char[2]:
|
||||
char[2] = getCharIni(char[0], "Options", "blips").lower()
|
||||
if not char[2]:
|
||||
char[2] = "male"
|
||||
|
||||
self.btnRealization.setPressed(False)
|
||||
self.btnCustomObjection.setPressed(False)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user