Add some functionality to implantSet service, and get editor working correctly with implant editor view
This commit is contained in:
@@ -351,10 +351,12 @@ class Character(object):
|
||||
|
||||
implant = eos.types.Implant(eos.db.getItem(itemID))
|
||||
char.implants.append(implant)
|
||||
eos.db.commit()
|
||||
|
||||
def removeImplant(self, charID, implant):
|
||||
char = eos.db.getCharacter(charID)
|
||||
char.implants.remove(implant)
|
||||
eos.db.commit()
|
||||
|
||||
def getImplants(self, charID):
|
||||
char = eos.db.getCharacter(charID)
|
||||
|
||||
@@ -39,6 +39,21 @@ class ImplantSets():
|
||||
def getImplantSet(self, name):
|
||||
return eos.db.getImplantSet(name)
|
||||
|
||||
def getImplants(self, setID):
|
||||
set = eos.db.getImplantSet(setID)
|
||||
return set.implants
|
||||
|
||||
def addImplant(self, setID, itemID):
|
||||
set = eos.db.getImplantSet(setID)
|
||||
implant = eos.types.Implant(eos.db.getItem(itemID))
|
||||
set.implants.append(implant)
|
||||
eos.db.commit()
|
||||
|
||||
def removeImplant(self, setID, implant):
|
||||
set = eos.db.getImplantSet(setID)
|
||||
set.implants.remove(implant)
|
||||
eos.db.commit()
|
||||
|
||||
def newSet(self):
|
||||
p = eos.types.ImplantSet()
|
||||
p.name = ""
|
||||
|
||||
Reference in New Issue
Block a user