Disable implants for read-only characters

This commit is contained in:
blitzmann
2016-03-19 22:10:09 -04:00
parent ff56e70b81
commit 6f1872fb94
2 changed files with 10 additions and 24 deletions

View File

@@ -32,7 +32,9 @@ import eos.db
import eos.types
import service
import config
import logging
logger = logging.getLogger(__name__)
class CharacterImportThread(threading.Thread):
def __init__(self, paths, callback):
@@ -343,6 +345,10 @@ class Character(object):
def addImplant(self, charID, itemID):
char = eos.db.getCharacter(charID)
if char.ro:
logger.error("Trying to add implant to read-only character")
return
implant = eos.types.Implant(eos.db.getItem(itemID))
char.implants.append(implant)