Added character saving.

Deleting characters is broken for now due to using wrong session, but I believe creating character works. Further tests needed
This commit is contained in:
blitzmann
2015-09-09 20:33:15 -04:00
parent 3521b3887d
commit ca34217f3b
7 changed files with 53 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
from sqlalchemy.orm import validates, reconstructor
from eos.effectHandlerHelpers import HandledItem
import eos.db
import eos
class Character(object):
@@ -33,7 +34,6 @@ class Character(object):
@classmethod
def getSkillList(cls):
if cls.__itemList is None:
import eos.db
cls.__itemList = eos.db.getItemsByCategory("Skill")
return cls.__itemList
@@ -150,6 +150,10 @@ class Character(object):
def implants(self):
return self.__implants
@property
def isDirty(self):
return getattr(self, "dirty", False)
def iterSkills(self):
for item in self.getSkillList():
yield self.getSkill(item)