Merge branch 'master' into singularity

This commit is contained in:
DarkPhoenix
2015-06-25 12:12:33 +03:00
4 changed files with 23 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
# Used by:
# Module: Triage Module I
type = "active"
runTime = "early"
def handler(fit, module, context):
# Remote armor reps
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"),

View File

@@ -3,6 +3,7 @@
# Used by:
# Module: Triage Module II
type = "active"
runTime = "early"
def handler(fit, module, context):
# Remote armor reps
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"),

View File

@@ -147,6 +147,7 @@ class CharacterEditor(wx.Frame):
def restrict(self):
self.btnRename.Enable(False)
self.btnDelete.Enable(False)
self.aview.stDisabledTip.Show(True)
self.aview.inputID.Enable(False)
self.aview.inputKey.Enable(False)
self.aview.charChoice.Enable(False)
@@ -158,6 +159,7 @@ class CharacterEditor(wx.Frame):
def unrestrict(self):
self.btnRename.Enable(True)
self.btnDelete.Enable(True)
self.aview.stDisabledTip.Show(False)
self.aview.inputID.Enable(True)
self.aview.inputKey.Enable(True)
self.aview.btnFetchCharList.Enable(True)
@@ -537,6 +539,15 @@ class APIView (wx.Panel):
pmainSizer = wx.BoxSizer(wx.VERTICAL)
hintSizer = wx.BoxSizer( wx.HORIZONTAL )
hintSizer.AddStretchSpacer()
self.stDisabledTip = wx.StaticText( self, wx.ID_ANY, u"You cannot add API Details for All 0 and All 5 characters. Please select another character or make a new one.", style=wx.ALIGN_CENTER )
self.stDisabledTip.Wrap( -1 )
hintSizer.Add( self.stDisabledTip, 0, wx.TOP | wx.BOTTOM, 15 )
hintSizer.AddStretchSpacer()
pmainSizer.Add(hintSizer, 0, wx.EXPAND, 5)
fgSizerInput = wx.FlexGridSizer(3, 2, 0, 0)
fgSizerInput.AddGrowableCol(1)
fgSizerInput.SetFlexibleDirection(wx.BOTH)

View File

@@ -398,8 +398,11 @@ class Fit(object):
if m.isValidState(State.ACTIVE):
m.state = State.ACTIVE
# 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)
fit.fill()
eos.db.commit()
@@ -857,7 +860,10 @@ class Fit(object):
if drone.amountActive > 0 and not drone.canBeApplied(fit):
drone.amountActive = 0
changed = True
return changed
# If any state was changed, recalculate attributes again
if changed:
self.recalc(fit)
def toggleModulesState(self, fitID, base, modules, click):
proposedState = self.__getProposedState(base, click)
@@ -873,11 +879,8 @@ class Fit(object):
# 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
changed = self.checkStates(fit, base)
# If any state was changed, recalulate attributes again
if changed is True:
self.recalc(fit)
# Then, check states of all modules and change where needed. This will recalc if needed
self.checkStates(fit, base)
# Old state : New State
localMap = {State.OVERHEATED: State.ACTIVE,
@@ -922,5 +925,5 @@ class Fit(object):
def recalc(self, fit, withBoosters=False):
if fit.factorReload is not self.serviceFittingOptions["useGlobalForceReload"]:
fit.factorReload = self.serviceFittingOptions["useGlobalForceReload"]
fit.clear()
fit.clear()
fit.calculateModifiedAttributes(withBoosters=withBoosters, dirtyStorage=self.dirtyFitIDs)