Merge pull request #1093 from pyfa-org/master
Bring dev up to date with master
This commit is contained in:
@@ -215,7 +215,7 @@ class DatabaseCleanup(object):
|
||||
row = results.first()
|
||||
|
||||
if row and row['num']:
|
||||
query = "UPDATE '{0}' SET '{1}Amount' = '0' WHERE {1}Amount IS NULL OR Amount = ''".format(profileType,
|
||||
query = "UPDATE '{0}' SET '{1}Amount' = '0' WHERE {1}Amount IS NULL OR {1}Amount = ''".format(profileType,
|
||||
damageType)
|
||||
delete = DatabaseCleanup.ExecuteSQLQuery(saveddata_engine, query)
|
||||
pyfalog.error("Database corruption found. Cleaning up {0} records.", delete.rowcount)
|
||||
|
||||
@@ -728,12 +728,6 @@ class Fit(object):
|
||||
self.register(item)
|
||||
item.calculateModifiedAttributes(self, runTime, False)
|
||||
|
||||
if projected is True and projectionInfo and item not in chain.from_iterable(r):
|
||||
# apply effects onto target fit
|
||||
for _ in xrange(projectionInfo.amount):
|
||||
targetFit.register(item, origin=self)
|
||||
item.calculateModifiedAttributes(targetFit, runTime, True)
|
||||
|
||||
if targetFit and withBoosters and item in self.modules:
|
||||
# Apply the gang boosts to target fit
|
||||
# targetFit.register(item, origin=self)
|
||||
@@ -746,6 +740,16 @@ class Fit(object):
|
||||
if not withBoosters and self.commandBonuses:
|
||||
self.__runCommandBoosts(runTime)
|
||||
|
||||
# Projection effects have been broken out of the main loop, see GH issue #1081
|
||||
|
||||
if projected is True and projectionInfo:
|
||||
for item in chain.from_iterable(u):
|
||||
if item is not None:
|
||||
# apply effects onto target fit
|
||||
for _ in xrange(projectionInfo.amount):
|
||||
targetFit.register(item, origin=self)
|
||||
item.calculateModifiedAttributes(targetFit, runTime, True)
|
||||
|
||||
timer.checkpoint('Done with runtime: %s' % runTime)
|
||||
|
||||
# Mark fit as calculated
|
||||
|
||||
Reference in New Issue
Block a user