Merge remote-tracking branch 'origin/master' into attrGroup
# Conflicts: # eve.db
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
import wx
|
||||
import math
|
||||
|
||||
from gui.utils import anim_effects
|
||||
import math
|
||||
|
||||
import wx
|
||||
|
||||
@@ -73,7 +73,11 @@ class BitmapLoader(object):
|
||||
|
||||
@classmethod
|
||||
def getImage(cls, name, location):
|
||||
return cls.getBitmap(name, location).ConvertToImage()
|
||||
bmp = cls.getBitmap(name, location)
|
||||
if bmp is not None:
|
||||
return bmp.ConvertToImage()
|
||||
else:
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def loadBitmap(cls, name, location):
|
||||
|
||||
@@ -76,10 +76,11 @@ class ImplantView(wx.Panel):
|
||||
|
||||
def OnRadioSelect(self, event):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
sFit = Fit.getInstance()
|
||||
sFit.toggleImplantSource(fitID, ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER)
|
||||
if fitID is not None:
|
||||
sFit = Fit.getInstance()
|
||||
sFit.toggleImplantSource(fitID, ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER)
|
||||
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
|
||||
|
||||
class ImplantDisplay(d.Display):
|
||||
|
||||
@@ -2,6 +2,7 @@ import wx
|
||||
from eos.saveddata.module import Module, State
|
||||
import eos.db
|
||||
from logbook import Logger
|
||||
from service.fit import Fit
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
@@ -23,6 +24,7 @@ class FitAddModuleCommand(wx.Command):
|
||||
self.replace_cmd = None
|
||||
|
||||
def Do(self):
|
||||
sFit = Fit.getInstance()
|
||||
fitID = self.fitID
|
||||
itemID = self.itemID
|
||||
fit = eos.db.getFit(fitID)
|
||||
@@ -57,7 +59,7 @@ class FitAddModuleCommand(wx.Command):
|
||||
# As some items may affect state-limiting attributes of the ship, calculate new attributes first
|
||||
# self.recalc(fit)
|
||||
# Then, check states of all modules and change where needed. This will recalc if needed
|
||||
# self.checkStates(fit, m)
|
||||
sFit.checkStates(fit, self.module)
|
||||
|
||||
# fit.fill()
|
||||
eos.db.commit()
|
||||
|
||||
@@ -30,7 +30,7 @@ class FitChangeStatesCommand(wx.Command):
|
||||
|
||||
def Do(self):
|
||||
fit = eos.db.getFit(self.fitID)
|
||||
|
||||
sFit = Fit.getInstance()
|
||||
baseMod = fit.modules[self.baseModPos]
|
||||
|
||||
# make sure positions only include non-empty positions
|
||||
@@ -61,6 +61,7 @@ class FitChangeStatesCommand(wx.Command):
|
||||
# As some items may affect state-limiting attributes of the ship, calculate new attributes first
|
||||
# self.recalc(fit)
|
||||
# # Then, check states of all modules and change where needed. This will recalc if needed
|
||||
sFit.checkStates(fit, baseMod)
|
||||
# self.checkStates(fit, base)
|
||||
return True
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user