diff --git a/eos/saveddata/fighter.py b/eos/saveddata/fighter.py index 694970343..8c515b945 100644 --- a/eos/saveddata/fighter.py +++ b/eos/saveddata/fighter.py @@ -53,6 +53,20 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): self.build() + standardAttackActive = False + for ability in self.abilities: + if ability.effect.isImplemented and ability.effect.handlerName == 'fighterabilityattackm': + # Activate "standard attack" if available + ability.active = True + standardAttackActive = True + else: + # Activate all other abilities (Neut, Web, etc) except propmods if no standard attack is active + if ability.effect.isImplemented and \ + standardAttackActive is False and \ + ability.effect.handlerName != 'fighterabilitymicrowarpdrive' and \ + ability.effect.handlerName != 'fighterabilityevasivemaneuvers': + ability.active = True + @reconstructor def init(self): """Initialize a fighter from the database and validate""" diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index a1c2b62e0..eab0b9fa0 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -128,8 +128,6 @@ class FittingViewDrop(wx.DropTarget): return t - - class FittingView(d.Display): DEFAULT_COLS = ["State", "Ammo Icon", diff --git a/service/fit.py b/service/fit.py index a4624692a..87b8f02a9 100644 --- a/service/fit.py +++ b/service/fit.py @@ -861,6 +861,7 @@ class Fit(object): self.recalc(fit) return True + @deprecated def addFighter(self, fitID, itemID, recalc=True): pyfalog.debug("Adding fighters ({0}) to fit ID: {1}", itemID, fitID) if fitID is None: @@ -880,19 +881,6 @@ class Fit(object): fighter = es_Fighter(item) used = fit.getSlotsUsed(fighter.slot) total = fit.getNumSlots(fighter.slot) - standardAttackActive = False - for ability in fighter.abilities: - if ability.effect.isImplemented and ability.effect.handlerName == 'fighterabilityattackm': - # Activate "standard attack" if available - ability.active = True - standardAttackActive = True - else: - # Activate all other abilities (Neut, Web, etc) except propmods if no standard attack is active - if ability.effect.isImplemented and \ - standardAttackActive is False and \ - ability.effect.handlerName != 'fighterabilitymicrowarpdrive' and \ - ability.effect.handlerName != 'fighterabilityevasivemaneuvers': - ability.active = True if used >= total: fighter.active = False