From 5259df282883f442660bbf328954551713c3fbe9 Mon Sep 17 00:00:00 2001 From: blitzman Date: Tue, 29 Nov 2016 22:58:33 -0500 Subject: [PATCH] Quick hack to run command boosts inside the runtime. See #839 --- eos/saveddata/fit.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index dc1cf491b..dce646aa8 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -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: