Round results a little to get rid of float error
This commit is contained in:
@@ -36,6 +36,7 @@ from eos.saveddata.character import Character
|
||||
from eos.saveddata.citadel import Citadel
|
||||
from eos.saveddata.module import Module
|
||||
from eos.saveddata.ship import Ship
|
||||
from eos.utils.float import floatUnerr
|
||||
from eos.utils.stats import DmgTypes, RRTypes
|
||||
|
||||
|
||||
@@ -1316,13 +1317,13 @@ class Fit:
|
||||
self.__savedCapSimData[startingCap] = []
|
||||
return None
|
||||
|
||||
def getCapGainFromMod(self, mod):
|
||||
def getCapRegenGainFromMod(self, mod):
|
||||
"""Return how much cap regen do we gain from having this module"""
|
||||
currentRegen = self.calculateCapRecharge()
|
||||
nomodRegen = self.calculateCapRecharge(
|
||||
capacity=self.ship.getModifiedItemAttrWithoutAfflictor("capacitorCapacity", mod),
|
||||
rechargeRate=self.ship.getModifiedItemAttrWithoutAfflictor("rechargeRate", mod) / 1000.0)
|
||||
return currentRegen - nomodRegen
|
||||
return floatUnerr(currentRegen - nomodRegen)
|
||||
|
||||
def getRemoteReps(self, spoolOptions=None):
|
||||
if spoolOptions not in self.__remoteRepMap:
|
||||
|
||||
Reference in New Issue
Block a user