Allow splitting drone stacks again

This commit is contained in:
DarkPhoenix
2019-04-16 16:53:22 +03:00
parent e57fce39fe
commit 7ae8d1dc1a
7 changed files with 85 additions and 102 deletions

View File

@@ -98,39 +98,6 @@ class FitDeprecated(object):
self.recalc(fit)
return True
@staticmethod
@deprecated
def splitDrones(fit, d, amount, l):
pyfalog.debug("Splitting drones for fit ID: {0}", fit)
total = d.amount
active = d.amountActive > 0
d.amount = amount
d.amountActive = amount if active else 0
newD = es_Drone(d.item)
newD.amount = total - amount
newD.amountActive = newD.amount if active else 0
l.append(newD)
eos.db.commit()
@deprecated
def splitProjectedDroneStack(self, fitID, d, amount):
pyfalog.debug("Splitting projected drone stack for fit ID: {0}", fitID)
if fitID is None:
return False
fit = eos.db.getFit(fitID)
self.splitDrones(fit, d, amount, fit.projectedDrones)
@deprecated
def splitDroneStack(self, fitID, d, amount):
pyfalog.debug("Splitting drone stack for fit ID: {0}", fitID)
if fitID is None:
return False
fit = eos.db.getFit(fitID)
self.splitDrones(fit, d, amount, fit.drones)
@deprecated
def removeDrone(self, fitID, i, numDronesToRemove=1, recalc=True):
pyfalog.debug("Removing {0} drones for fit ID: {1}", numDronesToRemove, fitID)