Quick hack to run command boosts inside the runtime. See #839
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user