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.

This commit is contained in:
blitzman
2016-11-20 01:14:40 -05:00
parent eade4f0ebd
commit 380d74b333
3 changed files with 5 additions and 7 deletions

View File

@@ -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)

View File

@@ -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