diff --git a/eos/saveddata/booster.py b/eos/saveddata/booster.py index ba01618fd..8864ace65 100644 --- a/eos/saveddata/booster.py +++ b/eos/saveddata/booster.py @@ -122,7 +122,7 @@ class Booster(HandledItem, ItemAttrShortcut): (effect.isType("passive") or effect.isType("boosterSideEffect")): if effect.isType("boosterSideEffect") and effect not in self.activeSideEffectEffects: continue - effect.handler(fit, self, ("booster",), None) + effect.handler(fit, self, ("booster",), None, effect=effect) @validates("ID", "itemID", "ammoID", "active") def validator(self, key, val): diff --git a/eos/saveddata/character.py b/eos/saveddata/character.py index 4cc1bf566..084f33d37 100644 --- a/eos/saveddata/character.py +++ b/eos/saveddata/character.py @@ -422,7 +422,7 @@ class Skill(HandledItem): (not fit.isStructure or effect.isType("structure")) and \ effect.activeByDefault: try: - effect.handler(fit, self, ("skill",), None) + effect.handler(fit, self, ("skill",), None, effect=effect) except AttributeError: continue diff --git a/eos/saveddata/drone.py b/eos/saveddata/drone.py index 1703b48e2..5dbfdfb5d 100644 --- a/eos/saveddata/drone.py +++ b/eos/saveddata/drone.py @@ -334,7 +334,7 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): if self.charge: for effect in self.charge.effects.values(): if effect.runTime == runTime and effect.activeByDefault: - effect.handler(fit, self, ("droneCharge",), projectionRange) + effect.handler(fit, self, ("droneCharge",), projectionRange, effect=effect) def __deepcopy__(self, memo): copy = Drone(self.item) diff --git a/eos/saveddata/implant.py b/eos/saveddata/implant.py index c7e4f48a7..92ae10474 100644 --- a/eos/saveddata/implant.py +++ b/eos/saveddata/implant.py @@ -95,7 +95,7 @@ class Implant(HandledItem, ItemAttrShortcut): return for effect in self.item.effects.values(): if effect.runTime == runTime and effect.isType("passive") and effect.activeByDefault: - effect.handler(fit, self, ("implant",), None) + effect.handler(fit, self, ("implant",), None, effect=effect) @validates("fitID", "itemID", "active") def validator(self, key, val): diff --git a/eos/saveddata/mode.py b/eos/saveddata/mode.py index 33a1754df..0de41140d 100644 --- a/eos/saveddata/mode.py +++ b/eos/saveddata/mode.py @@ -54,7 +54,7 @@ class Mode(ItemAttrShortcut, HandledItem): if self.item: for effect in self.item.effects.values(): if effect.runTime == runTime and effect.activeByDefault: - effect.handler(fit, self, ("module",), None) + effect.handler(fit, self, ("module",), None, effect=effect) def __deepcopy__(self, memo): copy = Mode(self.item) diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index b37c91199..68faedf3d 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -882,7 +882,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): and not forceProjected \ and effect.activeByDefault \ and ((gang and effect.isType("gang")) or not gang): - effect.handler(fit, self, context, projectionRange) + effect.handler(fit, self, context, projectionRange, effect=effect) for effect in self.item.effects.values(): if effect.runTime == runTime and \ diff --git a/eos/saveddata/ship.py b/eos/saveddata/ship.py index d032bbfbe..4b87b1bd9 100644 --- a/eos/saveddata/ship.py +++ b/eos/saveddata/ship.py @@ -98,7 +98,7 @@ class Ship(ItemAttrShortcut, HandledItem): # skillbook modifiers will use the stale modifier value # GH issue #351 fit.register(self) - effect.handler(fit, self, ("ship",), None) + effect.handler(fit, self, ("ship",), None, effect=effect) def validateModeItem(self, item, owner=None): """ Checks if provided item is a valid mode """ diff --git a/service/port/efs.py b/service/port/efs.py index 5930a2263..47975a629 100755 --- a/service/port/efs.py +++ b/service/port/efs.py @@ -589,18 +589,18 @@ class EfsPort: preTraitMultipliers = getCurrentMultipliers(tf) for effect in fit.ship.item.effects.values(): if effect.isImplemented: - effect.handler(tf, tf.ship, [], None) + effect.handler(tf, tf.ship, [], None, effect=effect) # Factor in mode effects for T3 Destroyers if fit.mode is not None: for effect in fit.mode.item.effects.values(): if effect.isImplemented: - effect.handler(tf, fit.mode, [], None) + effect.handler(tf, fit.mode, [], None, effect=effect) if fit.ship.item.groupID == getGroup("Strategic Cruiser").ID: subSystems = list(filter(lambda mod: mod.slot == FittingSlot.SUBSYSTEM and mod.item, fit.modules)) for sub in subSystems: for effect in sub.item.effects.values(): if effect.isImplemented: - effect.handler(tf, sub, [], None) + effect.handler(tf, sub, [], None, effect=effect) postTraitMultipliers = getCurrentMultipliers(tf) getMaxRatio = lambda dictA, dictB, key: max(map(lambda a, b: b / a, dictA[key], dictB[key])) multipliers["turret"] = round(getMaxRatio(preTraitMultipliers, postTraitMultipliers, "turrets"), 6)