From 380d74b333a5d834e830cfd58b4cd4abdcfd754e Mon Sep 17 00:00:00 2001 From: blitzman Date: Sun, 20 Nov 2016 01:14:40 -0500 Subject: [PATCH] Fix issue with gangboost not recalculating. We really should ensure that a command fit that has been calcuated does not need ot recalculate unless it's changed / is needed. But that's for a different time. --- eos/effects/chargebonuswarfarecharge.py | 4 +--- eos/saveddata/fit.py | 4 +++- gui/commandView.py | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/eos/effects/chargebonuswarfarecharge.py b/eos/effects/chargebonuswarfarecharge.py index 17ed8aa5c..b7695522e 100644 --- a/eos/effects/chargebonuswarfarecharge.py +++ b/eos/effects/chargebonuswarfarecharge.py @@ -43,7 +43,6 @@ def handler(fit, module, context, **kwargs): fit.ship.boostItemAttr("scanResolution", value, stackingPenalties=True) if id == 17: # Information Burst: Electronic Superiority: EWAR Range and Strength - pass groups = ("ECM", "Sensor Dampener", "Weapon Disruptor", "Target Painter") fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True) fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "falloffEffectiveness", value, stackingPenalties=True) @@ -76,8 +75,7 @@ def handler(fit, module, context, **kwargs): if id == 21: # Skirmish Burst: Interdiction Maneuvers: Tackle Range groups = ("Stasis Web", "Warp Scrambler") - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, - stackingPenalties=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True) if id == 22: # Skirmish Burst: Rapid Deployment: AB/MWD Speed Increase fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner") or mod.item.requiresSkill("High Speed Maneuvering"), "speedFactor", value, stackingPenalties=True) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 318138d4b..310c02233 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -401,6 +401,8 @@ class Fit(object): self.__capUsed = None self.__capRecharge = None self.ecmProjectedStr = 1 + self.commandBonuses = {} + del self.__calculatedTargets[:] del self.__extraDrains[:] @@ -542,7 +544,7 @@ class Fit(object): # projections from the normal fit calculations. But we must ensure that # projection have modifying stuff applied, such as gang boosts and other # local modules that may help - if self.__calculated and not projected: + if self.__calculated and not projected and not withBoosters: logger.debug("Fit has already been calculated and is not projected, returning: %r", self) return diff --git a/gui/commandView.py b/gui/commandView.py index 63bc70221..df00e42d7 100644 --- a/gui/commandView.py +++ b/gui/commandView.py @@ -51,9 +51,7 @@ class CommandViewDrop(wx.PyDropTarget): return t class CommandView(d.Display): - DEFAULT_COLS = ["State", - "Base Name", - ] + DEFAULT_COLS = ["Base Name",] def __init__(self, parent): d.Display.__init__(self, parent, style = wx.LC_SINGLE_SEL | wx.BORDER_NONE)