more clean up
This commit is contained in:
@@ -134,7 +134,6 @@ class Fit(object):
|
|||||||
self.__capRecharge = None
|
self.__capRecharge = None
|
||||||
self.__calculatedTargets = []
|
self.__calculatedTargets = []
|
||||||
self.factorReload = False
|
self.factorReload = False
|
||||||
self.fleet = None
|
|
||||||
self.boostsFits = set()
|
self.boostsFits = set()
|
||||||
self.gangBoosts = None
|
self.gangBoosts = None
|
||||||
self.ecmProjectedStr = 1
|
self.ecmProjectedStr = 1
|
||||||
@@ -471,14 +470,6 @@ class Fit(object):
|
|||||||
self.register(thing)
|
self.register(thing)
|
||||||
effect.handler(self, thing, context, warfareBuffID = warfareBuffID)
|
effect.handler(self, thing, context, warfareBuffID = warfareBuffID)
|
||||||
|
|
||||||
# if effect.isType("offline") or (effect.isType("passive") and thing.state >= State.ONLINE) or \
|
|
||||||
# (effect.isType("active") and thing.state >= State.ACTIVE):
|
|
||||||
# # Run effect, and get proper bonuses applied
|
|
||||||
# try:
|
|
||||||
# self.register(thing)
|
|
||||||
# effect.handler(self, thing, context)
|
|
||||||
# except:
|
|
||||||
# pass
|
|
||||||
else:
|
else:
|
||||||
# Run effect, and get proper bonuses applied
|
# Run effect, and get proper bonuses applied
|
||||||
try:
|
try:
|
||||||
@@ -504,7 +495,6 @@ class Fit(object):
|
|||||||
# Don't inspect this, we genuinely want to reassign self
|
# Don't inspect this, we genuinely want to reassign self
|
||||||
# noinspection PyMethodFirstArgAssignment
|
# noinspection PyMethodFirstArgAssignment
|
||||||
self = copy.deepcopy(self)
|
self = copy.deepcopy(self)
|
||||||
self.fleet = copied.fleet
|
|
||||||
logger.debug("Handling self projection - making shadow copy of fit. %r => %r", copied, self)
|
logger.debug("Handling self projection - making shadow copy of fit. %r => %r", copied, self)
|
||||||
# we delete the fit because when we copy a fit, flush() is
|
# we delete the fit because when we copy a fit, flush() is
|
||||||
# called to properly handle projection updates. However, we do
|
# called to properly handle projection updates. However, we do
|
||||||
@@ -517,24 +507,6 @@ class Fit(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
fit.calculateModifiedAttributes(self, True)
|
fit.calculateModifiedAttributes(self, True)
|
||||||
#
|
|
||||||
# for thing in chain(fit.modules, fit.implants, fit.character.skills, (fit.ship,)):
|
|
||||||
# if thing.item is None:
|
|
||||||
# continue
|
|
||||||
# for effect in thing.item.effects.itervalues():
|
|
||||||
# # And check if it actually has gang boosting effects
|
|
||||||
# if effect.isType("gang"):
|
|
||||||
# effect.handler(self, thing, ("commandRun"))
|
|
||||||
|
|
||||||
# if self.fleet is not None and withBoosters is True:
|
|
||||||
# logger.debug("Fleet is set, gathering gang boosts")
|
|
||||||
#
|
|
||||||
# self.gangBoosts = self.fleet.recalculateLinear(withBoosters=withBoosters)
|
|
||||||
#
|
|
||||||
# timer.checkpoint("Done calculating gang boosts for %r"%self)
|
|
||||||
|
|
||||||
# elif self.fleet is None:
|
|
||||||
# self.gangBoosts = None
|
|
||||||
|
|
||||||
# If we're not explicitly asked to project fit onto something,
|
# If we're not explicitly asked to project fit onto something,
|
||||||
# set self as target fit
|
# set self as target fit
|
||||||
|
|||||||
@@ -235,7 +235,8 @@ class Fit(object):
|
|||||||
self.recalc(fit, withBoosters=True)
|
self.recalc(fit, withBoosters=True)
|
||||||
|
|
||||||
def getFit(self, fitID, projected=False, basic=False):
|
def getFit(self, fitID, projected=False, basic=False):
|
||||||
''' Gets fit from database, and populates fleet data.
|
''' Gets fit from database
|
||||||
|
|
||||||
Projected is a recursion flag that is set to reduce recursions into projected fits
|
Projected is a recursion flag that is set to reduce recursions into projected fits
|
||||||
Basic is a flag to simply return the fit without any other processing
|
Basic is a flag to simply return the fit without any other processing
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user