Fix issue with layout-modifying modules (need to build fill() into the recalc itself at some point)

This commit is contained in:
blitzmann
2018-07-31 21:29:59 -04:00
parent cfb7a70da5
commit 098f0f92ee
3 changed files with 5 additions and 2 deletions

View File

@@ -35,7 +35,6 @@ from eos.saveddata.character import Character
from eos.saveddata.citadel import Citadel
from eos.saveddata.module import Module, State, Slot, Hardpoint
from logbook import Logger
pyfalog = Logger(__name__)
@@ -913,6 +912,9 @@ class Fit(object):
Fill this fit's module slots with enough dummy slots so that all slots are used.
This is mostly for making the life of gui's easier.
GUI's can call fill() and then stop caring about empty slots completely.
todo: want to get rid of using this from the gui/commands, and instead make it a more built-in feature within
recalc. Figure out a way to keep track of any changes to slot layout and call this automatically
"""
if self.ship is None:
return

View File

@@ -4,6 +4,7 @@ import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitAddModule import FitAddModuleCommand
from .calc.fitReplaceModule import FitReplaceModuleCommand
from service.fit import Fit
class GuiModuleAddCommand(wx.Command):
def __init__(self, fitID, itemID, position=None):

View File

@@ -1256,5 +1256,5 @@ class Fit(object):
fit.clear()
fit.calculateModifiedAttributes()
fit.fill()
pyfalog.info("=" * 10 + "recalc time: " + str(time() - start_time) + "=" * 10)