Merge pull request #1267 from w9jds/input-fix

Amounts window crashes pyfa if you paste with characters
This commit is contained in:
Ryan Holmes
2017-08-15 21:47:22 -04:00
committed by GitHub
11 changed files with 26 additions and 18 deletions

View File

@@ -19,10 +19,10 @@ debug = False
saveInRoot = False
# Version data
version = "1.29.5"
version = "1.30.1"
tag = "git"
expansionName = "Singularity"
expansionVersion = "1158190"
expansionName = "YC119.7"
expansionVersion = "1.0"
evemonMinVersion = "4081"
pyfaPath = None

View File

@@ -7,4 +7,4 @@ type = "passive"
def handler(fit, subsystem, context):
fit.ship.increaseItemAttr("capacity", subsystem.getModifiedItemAttr("capacity") or 0)
fit.ship.increaseItemAttr("capacity", subsystem.getModifiedItemAttr("cargoCapacityAdd") or 0)

View File

@@ -2,6 +2,7 @@
#
# Used by:
# Modules from group: Rig Anchor (4 of 4)
# Implants named like: Agency Speed Booster (3 of 3)
# Implants named like: grade Snake (16 of 18)
# Modules named like: Auxiliary Thrusters (8 of 8)
# Implant: Quafe Zero

View File

@@ -1,6 +1,7 @@
# shieldBoostAmplifierPassive
#
# Used by:
# Implants named like: Agency Tank Booster (3 of 3)
# Implants named like: grade Crystal (15 of 18)
type = "passive"

View File

@@ -1,6 +1,7 @@
# structuralAnalysisEffect
#
# Used by:
# Implants named like: Agency Tank Booster (3 of 3)
# Implants named like: Inherent Implants 'Noble' Repair Proficiency RP (6 of 6)
# Modules named like: Auxiliary Nano Pump (8 of 8)
# Implant: Imperial Navy Modified 'Noble' Implant

View File

@@ -333,13 +333,16 @@ class Skill(HandledItem):
@property
def level(self):
# Ensure that All 5/0 character have proper skill levels (in case database gets corrupted)
if self.character.name == "All 5":
self.activeLevel = self.__level = 5
elif self.character.name == "All 0":
self.activeLevel = self.__level = 0
elif self.character.alphaClone:
return min(self.activeLevel, self.character.alphaClone.getSkillLevel(self)) or 0
# @todo: there is a phantom bug that keep popping up about skills not having a character... See #1234
# Remove this at some point when the cause can be determined.
if self.character:
# Ensure that All 5/0 character have proper skill levels (in case database gets corrupted)
if self.character.name == "All 5":
self.activeLevel = self.__level = 5
elif self.character.name == "All 0":
self.activeLevel = self.__level = 0
elif self.character.alphaClone:
return min(self.activeLevel, self.character.alphaClone.getSkillLevel(self)) or 0
return self.activeLevel or 0

BIN
eve.db

Binary file not shown.

View File

@@ -20,7 +20,7 @@
# noinspection PyPackageRequirements
import wx
import gui.display as d
import gui.marketBrowser as marketBrowser
from gui.builtinMarketBrowser.events import ITEM_SELECTED
import gui.mainFrame
from gui.builtinViewColumns.state import State
from gui.contextMenu import ContextMenu
@@ -94,7 +94,7 @@ class ImplantDisplay(d.Display):
self.lastFitId = None
self.mainFrame.Bind(GE.FIT_CHANGED, self.fitChanged)
self.mainFrame.Bind(marketBrowser.ITEM_SELECTED, self.addItem)
self.mainFrame.Bind(ITEM_SELECTED, self.addItem)
self.Bind(wx.EVT_LEFT_DCLICK, self.removeItem)
self.Bind(wx.EVT_LEFT_DOWN, self.click)
self.Bind(wx.EVT_KEY_UP, self.kbEvent)

View File

@@ -4,6 +4,7 @@ import gui.mainFrame
import gui.globalEvents as GE
# noinspection PyPackageRequirements
import wx
import re
from service.fit import Fit
from eos.saveddata.cargo import Cargo as es_Cargo
from eos.saveddata.fighter import Fighter as es_Fighter
@@ -61,15 +62,16 @@ class AmountChanger(wx.Dialog):
return
sFit = Fit.getInstance()
cleanInput = re.sub(r'[^0-9.]', '', self.input.GetLineText(0).strip())
mainFrame = gui.mainFrame.MainFrame.getInstance()
fitID = mainFrame.getActiveFit()
if isinstance(self.thing, es_Cargo):
sFit.addCargo(fitID, self.thing.item.ID, int(float(self.input.GetLineText(0))), replace=True)
sFit.addCargo(fitID, self.thing.item.ID, int(float(cleanInput)), replace=True)
elif isinstance(self.thing, es_Fit):
sFit.changeAmount(fitID, self.thing, int(float(self.input.GetLineText(0))))
sFit.changeAmount(fitID, self.thing, int(float(cleanInput)))
elif isinstance(self.thing, es_Fighter):
sFit.changeActiveFighters(fitID, self.thing, int(float(self.input.GetLineText(0))))
sFit.changeActiveFighters(fitID, self.thing, int(float(cleanInput)))
wx.PostEvent(mainFrame, GE.FitChanged(fitID=fitID))

View File

@@ -2,7 +2,7 @@ from gui.contextMenu import ContextMenu
import gui.mainFrame
# noinspection PyPackageRequirements
import wx
from gui.shipBrowser import FitSelected
from gui.builtinShipBrowser.events import FitSelected
from service.settings import ContextMenuSettings

View File

@@ -2,7 +2,7 @@
import wx
from gui.contextMenu import ContextMenu
import gui.mainFrame
from gui.shipBrowser import Stage3Selected
from gui.builtinShipBrowser.events import Stage3Selected
from service.fit import Fit
from service.settings import ContextMenuSettings