More work on the character selection part of the char editor, everything except copy is working now

This commit is contained in:
cncfanatics
2010-09-07 22:23:25 +02:00
parent 868ef2e39d
commit bee02f625e
2 changed files with 94 additions and 34 deletions

View File

@@ -55,3 +55,16 @@ class Character():
def getSkillLevel(self, charID, skillID):
skill = eos.db.getCharacter(charID).getSkill(skillID)
return skill.level if skill.learned else "Not learned"
def rename(self, charID, newName):
char = eos.db.getCharacter(charID)
char.name = newName
eos.db.commit()
def new(self):
char = eos.types.Character("New Character")
eos.db.save(char)
return char.ID
def getCharName(self, charID):
return eos.db.getCharacter(charID).name