Add save character as dialog
This commit is contained in:
@@ -199,11 +199,11 @@ class Character(object):
|
||||
char = eos.db.getCharacter(charID)
|
||||
char.saveLevels()
|
||||
|
||||
def saveCharacterAs(self, charID):
|
||||
def saveCharacterAs(self, charID, newName):
|
||||
"""Save edited skills as a new character"""
|
||||
char = eos.db.getCharacter(charID)
|
||||
newChar = copy.deepcopy(char)
|
||||
newChar.name = newChar.name + " (saved as)"
|
||||
newChar.name = newName
|
||||
eos.db.save(newChar)
|
||||
|
||||
# revert old char
|
||||
@@ -266,7 +266,7 @@ class Character(object):
|
||||
|
||||
def getApiDetails(self, charID):
|
||||
char = eos.db.getCharacter(charID)
|
||||
if char.chars is not None:
|
||||
if char.chars is not None:
|
||||
chars = json.loads(char.chars)
|
||||
else:
|
||||
chars = None
|
||||
|
||||
Reference in New Issue
Block a user