Fix order of operations (boosting not applied to modules of projected fits)

This commit is contained in:
blitzmann
2014-05-10 22:47:42 -04:00
parent 60a786a6a2
commit af325caecc

View File

@@ -894,17 +894,8 @@ class Fit(object):
else:
c = chain((self.character, self.ship), self.drones, self.boosters, self.appliedImplants, self.modules,
self.projectedDrones, self.projectedModules)
for item in c:
# Registering the item about to affect the fit allows us to track "Affected By" relations correctly
if item is not None:
self.register(item)
item.calculateModifiedAttributes(self, runTime, False)
if forceProjected is True:
targetFit.register(item)
item.calculateModifiedAttributes(targetFit, runTime, True)
if self.gangBoosts is not None:
#print self.gangBoosts
contextMap = {Skill: "skill",
Ship: "ship",
Module: "module",
@@ -928,6 +919,16 @@ class Fit(object):
effect.handler(self, thing, context)
except:
pass
for item in c:
# Registering the item about to affect the fit allows us to track "Affected By" relations correctly
if item is not None:
self.register(item)
item.calculateModifiedAttributes(self, runTime, False)
if forceProjected is True:
targetFit.register(item)
item.calculateModifiedAttributes(targetFit, runTime, True)
for fit in self.projectedFits:
fit.calculateModifiedAttributes(self, dirtyStorage=dirtyStorage)