Categorize other calc commands

This commit is contained in:
DarkPhoenix
2019-04-14 12:37:24 +03:00
parent 700e249bf3
commit 5ac9604fab
84 changed files with 95 additions and 97 deletions

View File

View File

@@ -35,6 +35,6 @@ class FitAddCargoCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing addition of cargo {} to fit {}'.format(self.cargoInfo, self.fitID))
from .fitRemoveCargo import FitRemoveCargoCommand
from .remove import FitRemoveCargoCommand
cmd = FitRemoveCargoCommand(fitID=self.fitID, cargoInfo=self.cargoInfo)
return cmd.Do()

View File

@@ -32,6 +32,6 @@ class FitRemoveCargoCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of cargo {} to fit {}'.format(self.cargoInfo, self.fitID))
from gui.fitCommands.calc.fitAddCargo import FitAddCargoCommand
from .add import FitAddCargoCommand
cmd = FitAddCargoCommand(fitID=self.fitID, cargoInfo=CargoInfo(itemID=self.cargoInfo.itemID, amount=self.savedRemovedAmount))
return cmd.Do()

View File

@@ -54,6 +54,6 @@ class FitAddCommandCommand(wx.Command):
commandFit = Fit.getInstance().getFit(self.commandFitID)
if commandFit is None:
return True
from .fitRemoveCommand import FitRemoveCommandCommand
from .remove import FitRemoveCommandCommand
cmd = FitRemoveCommandCommand(fitID=self.fitID, commandFitID=self.commandFitID)
return cmd.Do()

View File

@@ -38,6 +38,6 @@ class FitRemoveCommandCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of command fit {} for fit {}'.format(self.commandFitID, self.fitID))
from .fitAddCommand import FitAddCommandCommand
from .add import FitAddCommandCommand
cmd = FitAddCommandCommand(fitID=self.fitID, commandFitID=self.commandFitID, state=self.savedState)
return cmd.Do()

View File

View File

@@ -62,6 +62,6 @@ class FitAddDroneCommand(wx.Command):
drone.amount = self.savedDroneInfo.amount
drone.amountActive = self.savedDroneInfo.amountActive
return True
from .fitRemoveDrone import FitRemoveDroneCommand
from .localRemove import FitRemoveDroneCommand
cmd = FitRemoveDroneCommand(fitID=self.fitID, position=self.savedPosition, amount=self.droneInfo.amount)
return cmd.Do()

View File

@@ -61,6 +61,6 @@ class FitAddProjectedDroneCommand(wx.Command):
drone.amountActive = self.savedDroneInfo.amountActive
return True
# Removing new stack
from .fitRemoveProjectedDrone import FitRemoveProjectedDroneCommand
from .projectedRemove import FitRemoveProjectedDroneCommand
cmd = FitRemoveProjectedDroneCommand(fitID=self.fitID, droneInfo=self.droneInfo)
return cmd.Do()

View File

@@ -45,6 +45,6 @@ class FitRemoveProjectedDroneCommand(wx.Command):
drone.amountActive = self.savedDroneInfo.amountActive
return True
# Make new stack
from .fitAddProjectedDrone import FitAddProjectedDroneCommand
from .projectedAdd import FitAddProjectedDroneCommand
cmd = FitAddProjectedDroneCommand(fitID=self.fitID, droneInfo=self.savedDroneInfo)
return cmd.Do()

View File

@@ -8,7 +8,7 @@ from service.fit import Fit
pyfalog = Logger(__name__)
class FitToggleProjectedDroneCommand(wx.Command):
class FitToggleProjectedDroneStateCommand(wx.Command):
def __init__(self, fitID, itemID, forceAmountActive=None):
wx.Command.__init__(self, True, 'Toggle Projected Drone State')
@@ -42,5 +42,5 @@ class FitToggleProjectedDroneCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing toggling of projected drone {} state for fit {}'.format(self.itemID, self.fitID))
cmd = FitToggleProjectedDroneCommand(fitID=self.fitID, itemID=self.itemID, forceAmountActive=self.savedAmountActive)
cmd = FitToggleProjectedDroneStateCommand(fitID=self.fitID, itemID=self.itemID, forceAmountActive=self.savedAmountActive)
return cmd.Do()

View File

View File

@@ -58,7 +58,7 @@ class FitAddFighterCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing addition of fighter {} to fit {}'.format(self.fighterInfo, self.fitID))
from .fitRemoveFighter import FitRemoveFighterCommand
from .localRemove import FitRemoveFighterCommand
cmd = FitRemoveFighterCommand(fitID=self.fitID, position=self.position)
cmd.Do()
return True

View File

@@ -28,6 +28,6 @@ class FitRemoveFighterCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of fighter at position {} from fit {}'.format(self.position, self.fitID))
from gui.fitCommands.calc.fitAddFighter import FitAddFighterCommand
from .localAdd import FitAddFighterCommand
cmd = FitAddFighterCommand(fitID=self.fitID, fighterInfo=self.savedFighterInfo, position=self.position)
return cmd.Do()

View File

@@ -41,6 +41,6 @@ class FitAddProjectedFighterCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing addition of projected fighter {} onto: {}'.format(self.fighterInfo, self.fitID))
from .fitRemoveProjectedFighter import FitRemoveProjectedFighterCommand
from .projectedRemove import FitRemoveProjectedFighterCommand
cmd = FitRemoveProjectedFighterCommand(fitID=self.fitID, position=self.position)
return cmd.Do()

View File

@@ -28,6 +28,6 @@ class FitRemoveProjectedFighterCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of projected fighter at position {} from fit {}'.format(self.position, self.fitID))
from .fitAddProjectedFighter import FitAddProjectedFighterCommand
from .projectedAdd import FitAddProjectedFighterCommand
cmd = FitAddProjectedFighterCommand(fitID=self.fitID, fighterInfo=self.savedFighterInfo)
return cmd.Do()

View File

@@ -58,6 +58,6 @@ class FitAddImplantCommand(wx.Command):
if self.oldImplantInfo and self.oldPosition:
cmd = FitAddImplantCommand(fitID=self.fitID, implantInfo=self.oldImplantInfo, position=self.oldPosition)
return cmd.Do()
from .fitRemoveImplant import FitRemoveImplantCommand
from .remove import FitRemoveImplantCommand
cmd = FitRemoveImplantCommand(fitID=self.fitID, position=self.newPosition)
return cmd.Do()

View File

View File

@@ -8,10 +8,10 @@ from service.fit import Fit
pyfalog = Logger(__name__)
class FitChangeModuleSpoolupCommand(wx.Command):
class FitChangeModuleSpoolCommand(wx.Command):
def __init__(self, fitID, position, spoolType, spoolAmount, projected=False):
wx.Command.__init__(self, True, 'Change Module Spoolup')
wx.Command.__init__(self, True, 'Change Module Spool')
self.fitID = fitID
self.position = position
self.spoolType = spoolType
@@ -39,7 +39,7 @@ class FitChangeModuleSpoolupCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing change of module spoolup at position {} to {} type {} amount on fit {}'.format(self.position, self.spoolType, self.spoolAmount, self.fitID))
cmd = FitChangeModuleSpoolupCommand(
cmd = FitChangeModuleSpoolCommand(
fitID=self.fitID,
position=self.position,
spoolType=self.savedSpoolType,

View File

@@ -32,7 +32,7 @@ class FitAddModuleCommand(wx.Command):
if newMod.item.category.name == 'Subsystem':
for oldMod in fit.modules:
if oldMod.getModifiedItemAttr('subSystemSlot') == newMod.getModifiedItemAttr('subSystemSlot') and newMod.slot == oldMod.slot:
from .fitReplaceModule import FitReplaceModuleCommand
from .localReplace import FitReplaceModuleCommand
self.subsystemCmd = FitReplaceModuleCommand(fitID=self.fitID, position=oldMod.modPosition, newModInfo=self.newModInfo)
return self.subsystemCmd.Do()
@@ -57,7 +57,7 @@ class FitAddModuleCommand(wx.Command):
# We added a subsystem module, which actually ran the replace command. Run the undo for that guy instead
if self.subsystemCmd is not None:
return self.subsystemCmd.Undo()
from .fitRemoveModule import FitRemoveModuleCommand
from .localRemove import FitRemoveModuleCommand
if self.savedPosition is None:
return False
cmd = FitRemoveModuleCommand(fitID=self.fitID, positions=[self.savedPosition])

View File

@@ -42,8 +42,6 @@ class FitChangeModuleStatesCommand(wx.Command):
if proposedState != mod.state:
pyfalog.debug('Toggle {} state: {} for fit ID: {}'.format(mod, proposedState, self.fitID))
mod.state = proposedState
# if we haven't change the state (eg, overheat -> overheat), simply fail the command
if not changed:
return False
eos.db.commit()

View File

@@ -43,6 +43,6 @@ class FitCloneModuleCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing cloning from position {} to position {} for fit ID {}'.format(self.srcPosition, self.dstPosition, self.fitID))
from .fitRemoveModule import FitRemoveModuleCommand
from .localRemove import FitRemoveModuleCommand
cmd = FitRemoveModuleCommand(fitID=self.fitID, positions=[self.dstPosition])
return cmd.Do()

View File

@@ -37,7 +37,7 @@ class FitRemoveModuleCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of modules {} on fit {}'.format(self.savedModInfos, self.fitID))
results = []
from gui.fitCommands.calc.fitReplaceModule import FitReplaceModuleCommand
from .localReplace import FitReplaceModuleCommand
for position, modInfo in self.savedModInfos.items():
cmd = FitReplaceModuleCommand(fitID=self.fitID, position=position, newModInfo=modInfo)
results.append(cmd.Do())

View File

@@ -52,7 +52,7 @@ class FitReplaceModuleCommand(wx.Command):
pyfalog.debug('Undoing replacement of module at position {} to {} on fit {}'.format(self.newModInfo, self.position, self.fitID))
# Remove if there was no module
if self.oldModInfo is None:
from gui.fitCommands.calc.fitRemoveModule import FitRemoveModuleCommand
from .localRemove import FitRemoveModuleCommand
cmd = FitRemoveModuleCommand(fitID=self.fitID, positions=[self.position])
return cmd.Do()
# Replace if there was

View File

@@ -54,6 +54,6 @@ class FitAddProjectedModuleCommand(wx.Command):
if self.oldPosition is not None and self.oldModInfo is not None:
cmd = FitAddProjectedModuleCommand(fitID=self.fitID, modInfo=self.oldModInfo, position=self.oldPosition)
return cmd.Do()
from gui.fitCommands.calc.fitRemoveProjectedModule import FitRemoveProjectedModuleCommand
from .projectedRemove import FitRemoveProjectedModuleCommand
cmd = FitRemoveProjectedModuleCommand(self.fitID, self.newPosition)
return cmd.Do()

View File

@@ -28,6 +28,6 @@ class FitRemoveProjectedModuleCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of projected module {} on fit {}'.format(self.savedModInfo, self.fitID))
from gui.fitCommands.calc.fitAddProjectedModule import FitAddProjectedModuleCommand
from .projectedAdd import FitAddProjectedModuleCommand
cmd = FitAddProjectedModuleCommand(fitID=self.fitID, modInfo=self.savedModInfo, position=self.position)
return cmd.Do()

View File

@@ -54,6 +54,6 @@ class FitAddProjectedFitCommand(wx.Command):
projectedFit = Fit.getInstance().getFit(self.projectedFitID)
if projectedFit is None:
return True
from .fitRemoveProjectedFit import FitRemoveProjectedFitCommand
from .remove import FitRemoveProjectedFitCommand
cmd = FitRemoveProjectedFitCommand(fitID=self.fitID, projectedFitID=self.projectedFitID)
return cmd.Do()

View File

@@ -38,6 +38,6 @@ class FitRemoveProjectedFitCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing removal of projected fit {} for fit {}'.format(self.projectedFitID, self.fitID))
from .fitAddProjectedFit import FitAddProjectedFitCommand
from .add import FitAddProjectedFitCommand
cmd = FitAddProjectedFitCommand(fitID=self.fitID, projectedFitID=self.projectedFitID, state=self.savedState)
return cmd.Do()

View File

@@ -10,7 +10,7 @@ from service.market import Market
pyfalog = Logger(__name__)
class FitChangeModeCommand(wx.Command):
class FitChangeShipModeCommand(wx.Command):
def __init__(self, fitID, itemID):
wx.Command.__init__(self, True, 'Set Mode')
@@ -30,5 +30,5 @@ class FitChangeModeCommand(wx.Command):
def Undo(self):
pyfalog.debug('Undoing changing mode to {} for fit {}'.format(self.itemID, self.fitID))
cmd = FitChangeModeCommand(self.fitID, self.savedItemID)
cmd = FitChangeShipModeCommand(self.fitID, self.savedItemID)
return cmd.Do()

View File

@@ -4,7 +4,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import CargoInfo
from .calc.fitAddCargo import FitAddCargoCommand
from .calc.cargo.add import FitAddCargoCommand
class GuiAddCargoCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeModuleCharges import FitChangeModuleChargesCommand
from .calc.module.changeCharges import FitChangeModuleChargesCommand
class GuiModuleAddChargeCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitAddCommand import FitAddCommandCommand
from .calc.commandFit.add import FitAddCommandCommand
class GuiAddCommandCommand(wx.Command):

View File

@@ -4,7 +4,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import DroneInfo
from .calc.fitAddDrone import FitAddDroneCommand
from .calc.drone.localAdd import FitAddDroneCommand
class GuiAddDroneCommand(wx.Command):

View File

@@ -4,7 +4,7 @@ import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import FighterInfo
from service.fit import Fit
from .calc.fitAddFighter import FitAddFighterCommand
from .calc.fighter.localAdd import FitAddFighterCommand
class GuiAddFighterCommand(wx.Command):

View File

@@ -6,9 +6,9 @@ from service.market import Market
from service.fit import Fit
from gui import globalEvents as GE
from gui.fitCommands.helpers import ModuleInfo
from .calc.fitAddModule import FitAddModuleCommand
from .calc.fitReplaceModule import FitReplaceModuleCommand
from .calc.fitChangeModuleCharges import FitChangeModuleChargesCommand
from .calc.module.localAdd import FitAddModuleCommand
from .calc.module.localReplace import FitReplaceModuleCommand
from .calc.module.changeCharges import FitChangeModuleChargesCommand
pyfalog = Logger(__name__)

View File

@@ -4,10 +4,10 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import ModuleInfo, DroneInfo, FighterInfo
from .calc.fitAddProjectedModule import FitAddProjectedModuleCommand
from .calc.fitAddProjectedFit import FitAddProjectedFitCommand
from .calc.fitAddProjectedFighter import FitAddProjectedFighterCommand
from .calc.fitAddProjectedDrone import FitAddProjectedDroneCommand
from .calc.module.projectedAdd import FitAddProjectedModuleCommand
from .calc.projectedFit.add import FitAddProjectedFitCommand
from .calc.fighter.projectedAdd import FitAddProjectedFighterCommand
from .calc.drone.projectedAdd import FitAddProjectedDroneCommand
from logbook import Logger
import eos.db
pyfalog = Logger(__name__)

View File

@@ -3,11 +3,11 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.calc.fitChangeModuleCharges import FitChangeModuleChargesCommand
from gui.fitCommands.calc.fitReplaceModule import FitReplaceModuleCommand
from gui.fitCommands.calc.fitRemoveCargo import FitRemoveCargoCommand
from gui.fitCommands.calc.module.changeCharges import FitChangeModuleChargesCommand
from gui.fitCommands.calc.module.localReplace import FitReplaceModuleCommand
from gui.fitCommands.calc.cargo.remove import FitRemoveCargoCommand
from gui.fitCommands.helpers import ModuleInfo
from .calc.fitAddCargo import FitAddCargoCommand
from .calc.cargo.add import FitAddCargoCommand
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -1,7 +1,7 @@
import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeCargoAmount import FitChangeCargoAmountCommand
from .calc.cargo.changeAmount import FitChangeCargoAmountCommand
from service.fit import Fit
from gui.fitCommands.helpers import CargoInfo
from logbook import Logger

View File

@@ -1,7 +1,7 @@
import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeDroneAmount import FitChangeDroneAmountCommand
from .calc.drone.localChangeAmount import FitChangeDroneAmountCommand
from service.fit import Fit
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -1,7 +1,7 @@
import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeFighterAmount import FitChangeFighterAmountCommand
from .calc.fighter.localChangeAmount import FitChangeFighterAmountCommand
from service.fit import Fit
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -1,7 +1,7 @@
import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeProjectedDroneAmount import FitChangeProjectedDroneAmountCommand
from .calc.drone.projectedChangeAmount import FitChangeProjectedDroneAmountCommand
from service.fit import Fit
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -1,7 +1,7 @@
import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeProjectedFighterAmount import FitChangeProjectedFighterAmountCommand
from .calc.fighter.projectedChangeAmount import FitChangeProjectedFighterAmountCommand
from service.fit import Fit
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -1,7 +1,7 @@
import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeProjectedFitAmount import FitChangeProjectedFitAmountCommand
from .calc.projectedFit.changeAmount import FitChangeProjectedFitAmountCommand
from service.fit import Fit
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -5,7 +5,7 @@ import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import ModuleInfo
from service.fit import Fit
from .calc.fitAddModule import FitAddModuleCommand
from .calc.module.localAdd import FitAddModuleCommand
pyfalog = Logger(__name__)

View File

@@ -5,7 +5,7 @@ import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import ModuleInfo
from service.fit import Fit
from .calc.fitAddModule import FitAddModuleCommand
from .calc.module.localAdd import FitAddModuleCommand
pyfalog = Logger(__name__)

View File

@@ -7,12 +7,12 @@ from gui.fitCommands.helpers import ModuleInfo, FighterInfo, BoosterInfo
from .calc.implant.remove import FitRemoveImplantCommand
from .calc.implant.add import FitAddImplantCommand
from .calc.booster.add import FitAddBoosterCommand
from .calc.fitRemoveCargo import FitRemoveCargoCommand
from .calc.fitAddCargo import FitAddCargoCommand
from .calc.fitReplaceModule import FitReplaceModuleCommand
from .calc.fitAddFighter import FitAddFighterCommand
from .calc.fitRemoveFighter import FitRemoveFighterCommand
from .calc.fitRebaseItem import FitRebaseItemCommand
from .calc.cargo.remove import FitRemoveCargoCommand
from .calc.cargo.add import FitAddCargoCommand
from .calc.module.localReplace import FitReplaceModuleCommand
from .calc.fighter.localAdd import FitAddFighterCommand
from .calc.fighter.localRemove import FitRemoveFighterCommand
from .calc.itemRebase import FitRebaseItemCommand
class GuiMetaSwapCommand(wx.Command):

View File

@@ -3,12 +3,12 @@ from logbook import Logger
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.calc.fitRemoveCargo import FitRemoveCargoCommand
from gui.fitCommands.calc.fitRemoveModule import FitRemoveModuleCommand
from gui.fitCommands.calc.fitReplaceModule import FitReplaceModuleCommand
from gui.fitCommands.calc.cargo.remove import FitRemoveCargoCommand
from gui.fitCommands.calc.module.localRemove import FitRemoveModuleCommand
from gui.fitCommands.calc.module.localReplace import FitReplaceModuleCommand
from gui.fitCommands.helpers import ModuleInfo
from service.fit import Fit
from .calc.fitAddCargo import FitAddCargoCommand
from .calc.cargo.add import FitAddCargoCommand
pyfalog = Logger(__name__)

View File

@@ -4,7 +4,7 @@ import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import ModuleInfo
from service.fit import Fit
from .calc.fitReplaceModule import FitReplaceModuleCommand
from .calc.module.localReplace import FitReplaceModuleCommand
class GuiMutaConvertCommand(wx.Command):

View File

@@ -4,7 +4,7 @@ import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import ModuleInfo
from service.fit import Fit
from .calc.fitReplaceModule import FitReplaceModuleCommand
from .calc.module.localReplace import FitReplaceModuleCommand
class GuiMutaRevertCommand(wx.Command):

View File

@@ -5,10 +5,10 @@ import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import CargoInfo
from service.fit import Fit
from .calc.fitRebaseItem import FitRebaseItemCommand
from .calc.fitChangeModuleCharges import FitChangeModuleChargesCommand
from .calc.fitAddCargo import FitAddCargoCommand
from .calc.fitRemoveCargo import FitRemoveCargoCommand
from .calc.itemRebase import FitRebaseItemCommand
from .calc.module.changeCharges import FitChangeModuleChargesCommand
from .calc.cargo.add import FitAddCargoCommand
from .calc.cargo.remove import FitRemoveCargoCommand

View File

@@ -6,7 +6,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.helpers import CargoInfo
from .calc.fitRemoveCargo import FitRemoveCargoCommand
from .calc.cargo.remove import FitRemoveCargoCommand
class GuiRemoveCargoCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitRemoveCommand import FitRemoveCommandCommand
from .calc.commandFit.remove import FitRemoveCommandCommand
class GuiRemoveCommandCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitRemoveDrone import FitRemoveDroneCommand
from .calc.drone.localRemove import FitRemoveDroneCommand
class GuiRemoveDroneCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitRemoveFighter import FitRemoveFighterCommand
from .calc.fighter.localRemove import FitRemoveFighterCommand
class GuiRemoveFighterCommand(wx.Command):

View File

@@ -4,7 +4,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .helpers import ModuleInfo
from .calc.fitRemoveModule import FitRemoveModuleCommand
from .calc.module.localRemove import FitRemoveModuleCommand
class GuiModuleRemoveCommand(wx.Command):

View File

@@ -3,11 +3,11 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitRemoveProjectedModule import FitRemoveProjectedModuleCommand
from .calc.fitRemoveProjectedFit import FitRemoveProjectedFitCommand
from .calc.fitRemoveProjectedFighter import FitRemoveProjectedFighterCommand
from .calc.module.projectedRemove import FitRemoveProjectedModuleCommand
from .calc.projectedFit.remove import FitRemoveProjectedFitCommand
from .calc.fighter.projectedRemove import FitRemoveProjectedFighterCommand
from logbook import Logger
from .calc.fitRemoveProjectedDrone import FitRemoveProjectedDroneCommand
from .calc.drone.projectedRemove import FitRemoveProjectedDroneCommand
from gui.fitCommands.helpers import DroneInfo
from eos.saveddata.drone import Drone

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeMode import FitChangeModeCommand
from .calc.shipModeChange import FitChangeShipModeCommand
class GuiSetModeCommand(wx.Command):
@@ -16,7 +16,7 @@ class GuiSetModeCommand(wx.Command):
self.itemID = itemID
def Do(self):
if self.internal_history.Submit(FitChangeModeCommand(self.fitID, self.itemID)):
if self.internal_history.Submit(FitChangeShipModeCommand(self.fitID, self.itemID)):
self.sFit.recalc(self.fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID))
return True

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeModuleSpoolup import FitChangeModuleSpoolupCommand
from .calc.module.changeSpool import FitChangeModuleSpoolCommand
class GuiSetSpoolup(wx.Command):
@@ -20,7 +20,7 @@ class GuiSetSpoolup(wx.Command):
self.context = context
def Do(self):
if self.internal_history.Submit(FitChangeModuleSpoolupCommand(
if self.internal_history.Submit(FitChangeModuleSpoolCommand(
fitID=self.fitID,
position=self.position,
spoolType=self.spoolType,

View File

@@ -3,8 +3,8 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.calc.fitSwapModule import FitSwapModuleCommand
from .calc.fitCloneModule import FitCloneModuleCommand
from gui.fitCommands.calc.module.localSwap import FitSwapModuleCommand
from .calc.module.localClone import FitCloneModuleCommand
from logbook import Logger
pyfalog = Logger(__name__)

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitToggleCommandFit import FitToggleCommandFitStateCommand
from .calc.commandFit.toggleState import FitToggleCommandFitStateCommand
class GuiToggleCommandCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitToggleDrone import FitToggleDroneStateCommand
from .calc.drone.localToggleState import FitToggleDroneStateCommand
class GuiToggleDroneCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitToggleFighter import FitToggleFighterStateCommand
from .calc.fighter.localToggleState import FitToggleFighterStateCommand
class GuiToggleFighterCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitToggleFighterAbility import FitToggleFighterAbilityStateCommand
from .calc.fighter.abilityToggle import FitToggleFighterAbilityStateCommand
class GuiToggleFighterAbilityCommand(wx.Command):

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeModuleStates import FitChangeModuleStatesCommand
from .calc.module.localChangeStates import FitChangeModuleStatesCommand
class GuiModuleStateChangeCommand(wx.Command):

View File

@@ -7,10 +7,10 @@ from eos.saveddata.fit import Fit as FitType
from eos.saveddata.module import Module as ModuleType
from gui import globalEvents as GE
from service.fit import Fit
from .calc.fitToggleProjectedDrone import FitToggleProjectedDroneCommand
from .calc.fitToggleProjectedFighter import FitToggleProjectedFighterStateCommand
from .calc.fitToggleProjectedFit import FitToggleProjectedFitCommand
from .calc.fitChangeProjectedModuleState import FitChangeProjectedModuleStateCommand
from .calc.drone.projectedToggleState import FitToggleProjectedDroneStateCommand
from .calc.fighter.projectedToggleState import FitToggleProjectedFighterStateCommand
from .calc.projectedFit.toggleState import FitToggleProjectedFitCommand
from .calc.module.projectedChangeState import FitChangeProjectedModuleStateCommand
class GuiToggleProjectedCommand(wx.Command):
@@ -29,7 +29,7 @@ class GuiToggleProjectedCommand(wx.Command):
self.commandType = FitChangeProjectedModuleStateCommand
self.args = (self.fitID, position, click)
elif isinstance(thing, DroneType):
self.commandType = FitToggleProjectedDroneCommand
self.commandType = FitToggleProjectedDroneStateCommand
self.args = (self.fitID, thing.itemID)
elif isinstance(thing, FighterType):
position = fit.projectedFighters.index(thing)

View File

@@ -16,8 +16,8 @@ from eos.effectHandlerHelpers import HandledList
from eos.db import gamedata_session, getCategory, getAttributeInfo, getGroup
from eos.gamedata import Attribute, Effect, Group, Item, ItemEffect
from eos.utils.spoolSupport import SpoolType, SpoolOptions
from gui.fitCommands.calc.fitAddModule import FitAddModuleCommand
from gui.fitCommands.calc.fitRemoveModule import FitRemoveModuleCommand
from gui.fitCommands.calc.module.localAdd import FitAddModuleCommand
from gui.fitCommands.calc.module.localRemove import FitRemoveModuleCommand
from gui.fitCommands.helpers import ModuleInfo