Quick hack to run command boosts inside the runtime. See #839
This commit is contained in:
@@ -486,6 +486,8 @@ class Fit(object):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
self.commandBonuses.clear()
|
||||||
|
|
||||||
def calculateModifiedAttributes(self, targetFit=None, withBoosters=False, dirtyStorage=None):
|
def calculateModifiedAttributes(self, targetFit=None, withBoosters=False, dirtyStorage=None):
|
||||||
timer = Timer(u'Fit: {}, {}'.format(self.ID, self.name), logger)
|
timer = Timer(u'Fit: {}, {}'.format(self.ID, self.name), logger)
|
||||||
logger.debug("Starting fit calculation on: %r, withBoosters: %s", self, withBoosters)
|
logger.debug("Starting fit calculation on: %r, withBoosters: %s", self, withBoosters)
|
||||||
@@ -608,10 +610,13 @@ class Fit(object):
|
|||||||
# targetFit.register(item, origin=self)
|
# targetFit.register(item, origin=self)
|
||||||
item.calculateModifiedAttributes(targetFit, runTime, False, True)
|
item.calculateModifiedAttributes(targetFit, runTime, False, True)
|
||||||
|
|
||||||
timer.checkpoint('Done with runtime: %s'%runTime)
|
print "Command: "
|
||||||
|
print self.commandBonuses
|
||||||
|
|
||||||
print "Command: "
|
if not withBoosters and self.commandBonuses:
|
||||||
print self.commandBonuses
|
self.__runCommandBoosts()
|
||||||
|
|
||||||
|
timer.checkpoint('Done with runtime: %s'%runTime)
|
||||||
|
|
||||||
# Mark fit as calculated
|
# Mark fit as calculated
|
||||||
self.__calculated = True
|
self.__calculated = True
|
||||||
@@ -622,9 +627,6 @@ class Fit(object):
|
|||||||
if fit.getProjectionInfo(self.ID).active:
|
if fit.getProjectionInfo(self.ID).active:
|
||||||
fit.calculateModifiedAttributes(self, withBoosters=withBoosters, dirtyStorage=dirtyStorage)
|
fit.calculateModifiedAttributes(self, withBoosters=withBoosters, dirtyStorage=dirtyStorage)
|
||||||
|
|
||||||
if not withBoosters and self.commandBonuses:
|
|
||||||
self.__runCommandBoosts()
|
|
||||||
|
|
||||||
timer.checkpoint('Done with fit calculation')
|
timer.checkpoint('Done with fit calculation')
|
||||||
|
|
||||||
if shadow:
|
if shadow:
|
||||||
|
|||||||
Reference in New Issue
Block a user