diff --git a/eos/effects/structureenergyneutralizerfalloff.py b/eos/effects/structureenergyneutralizerfalloff.py index 1281e1995..63cb38251 100644 --- a/eos/effects/structureenergyneutralizerfalloff.py +++ b/eos/effects/structureenergyneutralizerfalloff.py @@ -1,9 +1,12 @@ # Not used by any item from eos.types import State + type = "active", "projected" + + def handler(fit, container, context): - if "projected" in context and ((hasattr(container, "state") \ - and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): + if "projected" in context and ((hasattr(container, "state") + and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): amount = container.getModifiedItemAttr("energyNeutralizerAmount") - time = container.getModifiedItemAttr("duration") - fit.addDrain(time, amount, 0) + time = container.getModifiedItemAttr("duration") + fit.addDrain(time, amount, 0) diff --git a/eos/saveddata/drone.py b/eos/saveddata/drone.py index 1ca07a784..4b7abd4eb 100644 --- a/eos/saveddata/drone.py +++ b/eos/saveddata/drone.py @@ -223,8 +223,8 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): for effect in self.item.effects.itervalues(): if effect.runTime == runTime and \ - ((projected == True and effect.isType("projected")) or \ - projected == False and effect.isType("passive")): + ((projected == True and effect.isType("projected")) or + projected == False and effect.isType("passive")): # See GH issue #765 if effect.getattr('grouped'): effect.handler(fit, self, context) diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index 855d2c572..7ce55d331 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -620,11 +620,11 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): for effect in self.item.effects.itervalues(): if effect.runTime == runTime and \ - (effect.isType("offline") or - (effect.isType("passive") and self.state >= State.ONLINE) or \ - (effect.isType("active") and self.state >= State.ACTIVE)) and \ - ((projected and effect.isType("projected")) or not projected): - effect.handler(fit, self, context) + (effect.isType("offline") or + (effect.isType("passive") and self.state >= State.ONLINE) or + (effect.isType("active") and self.state >= State.ACTIVE)) and \ + ((projected and effect.isType("projected")) or not projected): + effect.handler(fit, self, context) @property def cycleTime(self):