Revert "Stop applying neut resistance twice" and instead remove the resistance application from addDrain()
This reverts commit 7b32fe08ac.
This commit is contained in:
@@ -13,6 +13,9 @@ def handler(fit, src, context, **kwargs):
|
||||
hasattr(src, "amountActive")):
|
||||
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
|
||||
|
||||
if 'effect' in kwargs:
|
||||
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
||||
|
||||
time = src.getModifiedItemAttr("duration")
|
||||
|
||||
fit.addDrain(src, time, amount, 0)
|
||||
|
||||
@@ -12,6 +12,9 @@ def handler(fit, src, context, **kwargs):
|
||||
amount = src.getModifiedItemAttr("powerTransferAmount")
|
||||
time = src.getModifiedItemAttr("duration")
|
||||
|
||||
if 'effect' in kwargs:
|
||||
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
||||
|
||||
if "projected" in context:
|
||||
fit.addDrain(src, time, amount, 0)
|
||||
elif "module" in context:
|
||||
|
||||
@@ -2,11 +2,16 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Remote Capacitor Transmitter (41 of 41)
|
||||
from eos.modifiedAttributeDict import ModifiedAttributeDict
|
||||
type = "projected", "active"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
def handler(fit, src, context, **kwargs):
|
||||
if "projected" in context:
|
||||
amount = src.getModifiedItemAttr("powerTransferAmount")
|
||||
duration = src.getModifiedItemAttr("duration")
|
||||
|
||||
if 'effect' in kwargs:
|
||||
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
||||
|
||||
fit.addDrain(src, duration, -amount, 0)
|
||||
|
||||
@@ -1193,8 +1193,7 @@ class Fit(object):
|
||||
if energyNeutralizerSignatureResolution:
|
||||
capNeed = capNeed * min(1, signatureRadius / energyNeutralizerSignatureResolution)
|
||||
|
||||
resistance = self.ship.getModifiedItemAttr("energyWarfareResistance") or 1 if capNeed > 0 else 1
|
||||
self.__extraDrains.append((cycleTime, capNeed * resistance, clipSize))
|
||||
self.__extraDrains.append((cycleTime, capNeed, clipSize))
|
||||
|
||||
def removeDrain(self, i):
|
||||
del self.__extraDrains[i]
|
||||
|
||||
Reference in New Issue
Block a user