Remove unnecessary backslash

and a bit of reformatting
This commit is contained in:
Ebag333
2016-10-19 08:58:19 -07:00
parent 4036ac8cd2
commit a8061c9276
3 changed files with 14 additions and 11 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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):