Fix issue with ship bonuses not applying when fit is projected (#374)
This commit is contained in:
@@ -23,7 +23,9 @@ from sqlalchemy.orm import validates, reconstructor
|
||||
from eos.effectHandlerHelpers import HandledItem
|
||||
import eos.db
|
||||
import eos
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class Character(object):
|
||||
__itemList = None
|
||||
@@ -221,6 +223,11 @@ class Character(object):
|
||||
if map[key](val) == False: raise ValueError(str(val) + " is not a valid value for " + key)
|
||||
else: return val
|
||||
|
||||
def __repr__(self):
|
||||
return "Character(ID={}, name={}) at {}".format(
|
||||
self.ID, self.name, hex(id(self))
|
||||
)
|
||||
|
||||
class Skill(HandledItem):
|
||||
def __init__(self, item, level=0, ro=False, learned=True):
|
||||
self.__item = item if not isinstance(item, int) else None
|
||||
|
||||
@@ -390,9 +390,9 @@ class Fit(object):
|
||||
self.__modifier = currModifier
|
||||
self.__origin = origin
|
||||
if hasattr(currModifier, "itemModifiedAttributes"):
|
||||
currModifier.itemModifiedAttributes.fit = self
|
||||
currModifier.itemModifiedAttributes.fit = origin or self
|
||||
if hasattr(currModifier, "chargeModifiedAttributes"):
|
||||
currModifier.chargeModifiedAttributes.fit = self
|
||||
currModifier.chargeModifiedAttributes.fit = origin or self
|
||||
|
||||
def getModifier(self):
|
||||
return self.__modifier
|
||||
|
||||
@@ -121,3 +121,8 @@ class Ship(ItemAttrShortcut, HandledItem):
|
||||
def __deepcopy__(self, memo):
|
||||
copy = Ship(self.item)
|
||||
return copy
|
||||
|
||||
def __repr__(self):
|
||||
return "Ship(ID={}, name={}) at {}".format(
|
||||
self.item.ID, self.item.name, hex(id(self))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user