Quick hack to run command boosts inside the runtime. See #839

This commit is contained in:
blitzman
2016-11-29 22:58:33 -05:00
parent a5b5da6d27
commit 5259df2828

View File

@@ -486,6 +486,8 @@ class Fit(object):
except:
pass
self.commandBonuses.clear()
def calculateModifiedAttributes(self, targetFit=None, withBoosters=False, dirtyStorage=None):
timer = Timer(u'Fit: {}, {}'.format(self.ID, self.name), logger)
logger.debug("Starting fit calculation on: %r, withBoosters: %s", self, withBoosters)
@@ -608,10 +610,13 @@ class Fit(object):
# targetFit.register(item, origin=self)
item.calculateModifiedAttributes(targetFit, runTime, False, True)
timer.checkpoint('Done with runtime: %s'%runTime)
print "Command: "
print self.commandBonuses
print "Command: "
print self.commandBonuses
if not withBoosters and self.commandBonuses:
self.__runCommandBoosts()
timer.checkpoint('Done with runtime: %s'%runTime)
# Mark fit as calculated
self.__calculated = True
@@ -622,9 +627,6 @@ class Fit(object):
if fit.getProjectionInfo(self.ID).active:
fit.calculateModifiedAttributes(self, withBoosters=withBoosters, dirtyStorage=dirtyStorage)
if not withBoosters and self.commandBonuses:
self.__runCommandBoosts()
timer.checkpoint('Done with fit calculation')
if shadow: