Rework projected drone fit commands

This commit is contained in:
DarkPhoenix
2019-04-13 16:25:49 +03:00
parent 5f8ccb9831
commit 7f870cf675
6 changed files with 101 additions and 87 deletions

View File

@@ -9,6 +9,7 @@ from .calc.fitRemoveProjectedFighter import FitRemoveProjectedFighterCommand
from logbook import Logger
from .calc.fitRemoveProjectedDrone import FitRemoveProjectedDroneCommand
from gui.fitCommands.helpers import DroneInfo
from eos.saveddata.drone import Drone
from eos.saveddata.module import Module
from eos.saveddata.fighter import Fighter
@@ -33,7 +34,7 @@ class GuiRemoveProjectedCommand(wx.Command):
fit = self.sFit.getFit(fitID)
if isinstance(thing, Drone):
self.data = fit.projectedDrones.index(thing)
self.data = DroneInfo(itemID=thing.itemID, amount=1, amountActive=1)
self.type = 'drone'
elif isinstance(thing, Module):
self.type = 'module'