From 25a945f9e612762210cf4579dc0314dd1add4ffe Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Thu, 20 Apr 2017 11:37:11 -0700 Subject: [PATCH 1/2] Catch bug where remote reppers have the fueled multiplier applied when they have no charges. --- eos/saveddata/fit.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 04854e568..32cbe5aa8 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -1187,14 +1187,16 @@ class Fit(object): if force_recalc is False: return self.__remoteReps - # We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly - # set all values to 0. + # We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly set all values to 0. for remote_type in self.__remoteReps: self.__remoteReps[remote_type] = 0 for stuff in chain(self.modules, self.drones): remote_type = None - modifier = stuff.getModifiedItemAttr("chargedArmorDamageMultiplier", 1) + if stuff.charge: + fueledMultiplier = stuff.getModifiedItemAttr("chargedArmorDamageMultiplier", 1) + else: + fueledMultiplier = 1 if isinstance(stuff, Module) and (stuff.isEmpty or stuff.state < State.ACTIVE): continue @@ -1249,7 +1251,7 @@ class Fit(object): hp = droneHull else: hp = 0 - self.__remoteReps[remote_type] += (hp * modifier) / duration + self.__remoteReps[remote_type] += (hp * fueledMultiplier) / duration return self.__remoteReps From cd30d743937361fc4ecf91329703f8f1b683bd48 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Thu, 20 Apr 2017 23:54:52 -0400 Subject: [PATCH 2/2] Rename fueled to modifier --- eos/saveddata/fit.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 32cbe5aa8..c9dd3677c 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -1187,21 +1187,24 @@ class Fit(object): if force_recalc is False: return self.__remoteReps - # We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly set all values to 0. + # We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly set + # all values to 0. for remote_type in self.__remoteReps: self.__remoteReps[remote_type] = 0 for stuff in chain(self.modules, self.drones): remote_type = None + + # Only apply the charged multiplier if we have a charge in our ancil reppers (#1135) if stuff.charge: - fueledMultiplier = stuff.getModifiedItemAttr("chargedArmorDamageMultiplier", 1) + modifier = stuff.getModifiedItemAttr("chargedArmorDamageMultiplier", 1) else: - fueledMultiplier = 1 + modifier = 1 if isinstance(stuff, Module) and (stuff.isEmpty or stuff.state < State.ACTIVE): continue elif isinstance(stuff, Drone): - # drones don't have fueled charges, so siomply override modifier with the amount of drones active + # drones don't have fueled charges, so simply override modifier with the amount of drones active modifier = stuff.amountActive # Covert cycleTime to seconds @@ -1251,7 +1254,7 @@ class Fit(object): hp = droneHull else: hp = 0 - self.__remoteReps[remote_type] += (hp * fueledMultiplier) / duration + self.__remoteReps[remote_type] += (hp * modifier) / duration return self.__remoteReps