Compare commits

..

No commits in common. "357e36955907107e52b5747d2022fd6f275470f6" and "1efa03da97cc64a55777074cb801fb4e7c4ea484" have entirely different histories.

2 changed files with 16 additions and 25 deletions

View File

@ -277,7 +277,7 @@ class AOCharMovie(QtGui.QLabel):
self.scaling = scaling self.scaling = scaling
p_char = p_char.lower() p_char = p_char.lower().decode('utf-8')
p_emote = p_emote.lower() p_emote = p_emote.lower()
original_path = self.test_path([AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif", AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif"]) original_path = self.test_path([AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif", AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif"])
@ -2019,7 +2019,7 @@ class gui(QtGui.QWidget):
msg += str(self.mychatcolor)+"#" msg += str(self.mychatcolor)+"#"
if "cccc_ic_support" in self.features: if "cccc_ic_support" in self.features:
showname = self.showname.decode('utf-8') showname = self.showname
if self.showname == "" and not self.charshowname == "": if self.showname == "" and not self.charshowname == "":
showname = self.charshowname showname = self.charshowname
msg += showname+"#" # custom showname msg += showname+"#" # custom showname
@ -2162,22 +2162,18 @@ class gui(QtGui.QWidget):
if self.additivebtn.isChecked(): if self.additivebtn.isChecked():
self.icchatinput.insert(" ") self.icchatinput.insert(" ")
self.m_chatmessage[CHARNAME] = self.m_chatmessage[CHARNAME].decode("utf-8") f_char = self.m_chatmessage[CHARNAME].decode("utf-8")
self.m_chatmessage[SHOWNAME] = self.m_chatmessage[SHOWNAME].decode('utf-8')
f_char = self.m_chatmessage[CHARNAME]
evidence = int(self.m_chatmessage[EVIDENCE])-1 evidence = int(self.m_chatmessage[EVIDENCE])-1
t = time.localtime() t = time.localtime()
logcharname = f_char logcharname = f_char
#TODO: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal #TODO: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if f_char.lower() != self.charlist[f_char_id][0].lower(): #if f_char.lower() != self.charlist[f_char_id][0].lower():
logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')' # logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')'
if self.m_chatmessage[SHOWNAME] and self.m_chatmessage[SHOWNAME].lower() != f_char.lower(): if self.m_chatmessage[SHOWNAME] and self.m_chatmessage[SHOWNAME].lower() != f_char.lower():
try: try:
logcharname += " ("+self.m_chatmessage[SHOWNAME]+")" logcharname += " ("+self.m_chatmessage[SHOWNAME].decode('utf-8')+")"
except: except:
logcharname += " (???)" logcharname += " (???)"
@ -2310,9 +2306,9 @@ class gui(QtGui.QWidget):
self.effectview.stop() self.effectview.stop()
if not self.m_chatmessage[SHOWNAME]: if not self.m_chatmessage[SHOWNAME]:
self.name.setText(self.m_chatmessage[CHARNAME]) self.name.setText(self.m_chatmessage[CHARNAME].decode("utf-8"))
else: else:
self.name.setText(self.m_chatmessage[SHOWNAME]) self.name.setText(self.m_chatmessage[SHOWNAME].decode("utf-8"))
self.chatbox.hide() self.chatbox.hide()
@ -2858,6 +2854,7 @@ class gui(QtGui.QWidget):
sfx_name = self.m_chatmessage[SFX] sfx_name = self.m_chatmessage[SFX]
if sfx_name == "1" or sfx_name == "0": if sfx_name == "1" or sfx_name == "0":
return return
print self.m_chatmessage[SFX]
self.playSound(sfx_name) self.playSound(sfx_name)
@ -3588,17 +3585,12 @@ class TCP_Thread(QtCore.QThread):
self.parent.areas[type] = [network[i] for i in range(1, len(network))] self.parent.areas[type] = [network[i] for i in range(1, len(network))]
for i in range(self.parent.areas_len): for i in range(self.parent.areas_len):
try: try:
area_players = self.parent.areas[0][i] if self.parent.areas[1][i] == "CASING":
area_status = self.parent.areas[1][i].title() self.parent.areaitems.item(i).setText("%s\n%s | %s\n%s users | %s" % (self.parent.areas[4][i], self.parent.areas[1][i].title(), self.parent.areas[2][i], self.parent.areas[0][i], self.parent.areas[3][i]))
area_cm = self.parent.areas[2][i].decode('utf-8')
area_locked = self.parent.areas[3][i].title()
area_name = self.parent.areas[4][i].decode('utf-8')
if area_status == "Casing":
self.parent.areaitems.item(i).setText("%s\n%s | %s\n%s users | %s" % (area_name, area_status, area_cm, area_players, area_locked))
else: else:
self.parent.areaitems.item(i).setText("%s\n%s\n%s users | %s" % (area_name, area_status, area_players, area_locked)) self.parent.areaitems.item(i).setText("%s\n%s\n%s users | %s" % (self.parent.areas[4][i], self.parent.areas[1][i].title(), self.parent.areas[0][i], self.parent.areas[3][i].title()))
if area_locked == "Locked": if self.parent.areas[3][i] == "LOCKED":
self.parent.areaitems.item(i).setIcon(QtGui.QIcon(AO2XPpath + "icons/" + "lock.png")) self.parent.areaitems.item(i).setIcon(QtGui.QIcon(AO2XPpath + "icons/" + "lock.png"))
else: else:
self.parent.areaitems.item(i).setIcon(QtGui.QIcon(AO2XPpath + "icons/" + "house.png")) self.parent.areaitems.item(i).setIcon(QtGui.QIcon(AO2XPpath + "icons/" + "house.png"))

View File

@ -621,10 +621,9 @@ class AOServerInfo(QtCore.QThread):
areas[type] = [network[i] for i in range(1, len(network))] areas[type] = [network[i] for i in range(1, len(network))]
areas_len = len(areas[type]) areas_len = len(areas[type])
print '[client]', 'The server has %d areas' % areas_len print '[client]', 'The server has %d areas' % areas_len
if musiclist: for i in range(areas_len):
for i in range(areas_len): areas[4].append(musiclist[0])
areas[4].append(musiclist[0]) del musiclist[0]
del musiclist[0]
elif header == 'DONE': elif header == 'DONE':
if self.disconnect: if self.disconnect: