Fix #537 - cap battery causing remote cap transfers to apply incorrect values.

Bump to stable 1.20.1
This commit is contained in:
blitzmann
2016-03-14 21:56:25 -04:00
parent 91980c9f2c
commit c42748a5dd
3 changed files with 4 additions and 3 deletions

View File

@@ -823,7 +823,8 @@ class Fit(object):
return 10 / rechargeRate * sqrt(percent) * (1 - sqrt(percent)) * capacity
def addDrain(self, cycleTime, capNeed, clipSize=0):
resistance = self.ship.getModifiedItemAttr("energyWarfareResistance") or 1
""" Used for both cap drains and cap fills (fills have negative capNeed) """
resistance = self.ship.getModifiedItemAttr("energyWarfareResistance") or 1 if capNeed > 0 else 1
self.__extraDrains.append((cycleTime, capNeed * resistance, clipSize))
def removeDrain(self, i):