Fix effects running when they shouldn't

This commit is contained in:
blitzman
2016-11-21 21:59:44 -05:00
parent cb225eabb3
commit 8605bab4d4

View File

@@ -643,16 +643,21 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
if self.state >= State.OVERHEATED:
for effect in self.item.effects.itervalues():
if effect.runTime == runTime and \
effect.isType("overheat") and \
not forceProjected:
effect.isType("overheat") \
and not forceProjected \
and ((gang and effect.isType("gang")) or not gang):
effect.handler(fit, self, context)
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.isType("active") and self.state >= State.ACTIVE))\
and ((projected and effect.isType("projected")) or not projected)\
and ((gang and effect.isType("gang")) or not gang):
thing = effect.isType("gang")
if gang:
pass
effect.handler(fit, self, context)
@property