Compare commits
No commits in common. "9af32ac4111fe73e3088ae930455a661a0a4236d" and "e7daec78c708caa844da7db8e4cd12ed85a36e50" have entirely different histories.
9af32ac411
...
e7daec78c7
15
gameview.py
15
gameview.py
@ -2041,18 +2041,9 @@ class GUI(QtGui.QWidget):
|
|||||||
inifile = ConfigParser()
|
inifile = ConfigParser()
|
||||||
inifile.read(path)
|
inifile.read(path)
|
||||||
for section in inifile.sections():
|
for section in inifile.sections():
|
||||||
name = ini.read_ini(inifile, section, "name").replace('\\n', '\n').replace('\\"', '"').rstrip()
|
name = ini.read_ini(inifile, section, "name").decode('utf-8').replace('\\n', '\n')
|
||||||
description = ini.read_ini(inifile, section, "description").replace('\\n', '\n').replace('\\"', '"').rstrip()
|
description = ini.read_ini(inifile, section, "description").decode('utf-8').replace('\\n', '\n')
|
||||||
image = ini.read_ini(inifile, section, "image", "empty.png")
|
image = ini.read_ini(inifile, section, "image", "empty.png")
|
||||||
|
|
||||||
# Remove opening and closing quotes
|
|
||||||
if description[0] == '"' and description[-1] == '"':
|
|
||||||
description = description[1:-1]
|
|
||||||
|
|
||||||
# Not all evidence files are plain unicode
|
|
||||||
name = name.decode("unicode_escape") if "\\x" in name else name.decode('utf-8')
|
|
||||||
description = description.decode("unicode_escape") if "\\x" in description else description.decode('utf-8')
|
|
||||||
|
|
||||||
evidence.append([name, description, image])
|
evidence.append([name, description, image])
|
||||||
|
|
||||||
if self.privateinv or is_autoload:
|
if self.privateinv or is_autoload:
|
||||||
@ -2089,8 +2080,6 @@ class GUI(QtGui.QWidget):
|
|||||||
return QtGui.QMessageBox.information(self, "Can't transfer evidence", 'The evidence "%s" already exists in the %s inventory.' % (evi[0], target_str))
|
return QtGui.QMessageBox.information(self, "Can't transfer evidence", 'The evidence "%s" already exists in the %s inventory.' % (evi[0], target_str))
|
||||||
else:
|
else:
|
||||||
if self.privateinv:
|
if self.privateinv:
|
||||||
for i in range(len(evi)):
|
|
||||||
evi[i] = evi[i].replace('#', '<num>').replace('%', '<percent>').replace('&', '<and>').replace('$', '<dollar>').replace('\\n', '\n')
|
|
||||||
self.tcp.send('PE#' + evi[0] + '#' + evi[1] + '#' + evi[2] + '#%')
|
self.tcp.send('PE#' + evi[0] + '#' + evi[1] + '#' + evi[2] + '#%')
|
||||||
else:
|
else:
|
||||||
self.privateevidence.append(evi)
|
self.privateevidence.append(evi)
|
||||||
|
Loading…
Reference in New Issue
Block a user