Merge fit attributes with ship
This commit is contained in:
@@ -43,14 +43,6 @@ except ImportError:
|
||||
|
||||
class Fit(object):
|
||||
"""Represents a fitting, with modules, ship, implants, etc."""
|
||||
EXTRA_ATTRIBUTES = {"armorRepair": 0,
|
||||
"hullRepair": 0,
|
||||
"shieldRepair": 0,
|
||||
"maxActiveDrones": 0,
|
||||
"maxTargetsLockedFromSkills": 2,
|
||||
"droneControlRange": 20000,
|
||||
"cloaked": False,
|
||||
"siege": False}
|
||||
|
||||
PEAK_RECHARGE = 0.25
|
||||
|
||||
@@ -127,8 +119,7 @@ class Fit(object):
|
||||
self.boostsFits = set()
|
||||
self.gangBoosts = None
|
||||
self.ecmProjectedStr = 1
|
||||
self.extraAttributes = ModifiedAttributeDict(self)
|
||||
self.extraAttributes.original = self.EXTRA_ATTRIBUTES
|
||||
self.extraAttributes = self.ship.itemModifiedAttributes
|
||||
|
||||
@property
|
||||
def targetResists(self):
|
||||
|
||||
@@ -26,6 +26,17 @@ import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class Ship(ItemAttrShortcut, HandledItem):
|
||||
EXTRA_ATTRIBUTES = {
|
||||
"armorRepair": 0,
|
||||
"hullRepair": 0,
|
||||
"shieldRepair": 0,
|
||||
"maxActiveDrones": 0,
|
||||
"maxTargetsLockedFromSkills": 2,
|
||||
"droneControlRange": 20000,
|
||||
"cloaked": False,
|
||||
"siege": False
|
||||
}
|
||||
|
||||
def __init__(self, item):
|
||||
|
||||
if item.category.name != "Ship":
|
||||
@@ -34,7 +45,8 @@ class Ship(ItemAttrShortcut, HandledItem):
|
||||
self.__item = item
|
||||
self.__modeItems = self.__getModeItems()
|
||||
self.__itemModifiedAttributes = ModifiedAttributeDict()
|
||||
self.__itemModifiedAttributes.original = self.item.attributes
|
||||
self.__itemModifiedAttributes.original = dict(self.item.attributes)
|
||||
self.__itemModifiedAttributes.original.update(self.EXTRA_ATTRIBUTES)
|
||||
|
||||
self.commandBonus = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user