Merge pull request #1267 from w9jds/input-fix
Amounts window crashes pyfa if you paste with characters
This commit is contained in:
@@ -19,10 +19,10 @@ debug = False
|
|||||||
saveInRoot = False
|
saveInRoot = False
|
||||||
|
|
||||||
# Version data
|
# Version data
|
||||||
version = "1.29.5"
|
version = "1.30.1"
|
||||||
tag = "git"
|
tag = "git"
|
||||||
expansionName = "Singularity"
|
expansionName = "YC119.7"
|
||||||
expansionVersion = "1158190"
|
expansionVersion = "1.0"
|
||||||
evemonMinVersion = "4081"
|
evemonMinVersion = "4081"
|
||||||
|
|
||||||
pyfaPath = None
|
pyfaPath = None
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ type = "passive"
|
|||||||
|
|
||||||
|
|
||||||
def handler(fit, subsystem, context):
|
def handler(fit, subsystem, context):
|
||||||
fit.ship.increaseItemAttr("capacity", subsystem.getModifiedItemAttr("capacity") or 0)
|
fit.ship.increaseItemAttr("capacity", subsystem.getModifiedItemAttr("cargoCapacityAdd") or 0)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Modules from group: Rig Anchor (4 of 4)
|
# 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)
|
# Implants named like: grade Snake (16 of 18)
|
||||||
# Modules named like: Auxiliary Thrusters (8 of 8)
|
# Modules named like: Auxiliary Thrusters (8 of 8)
|
||||||
# Implant: Quafe Zero
|
# Implant: Quafe Zero
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# shieldBoostAmplifierPassive
|
# shieldBoostAmplifierPassive
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
|
# Implants named like: Agency Tank Booster (3 of 3)
|
||||||
# Implants named like: grade Crystal (15 of 18)
|
# Implants named like: grade Crystal (15 of 18)
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# structuralAnalysisEffect
|
# structuralAnalysisEffect
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
|
# Implants named like: Agency Tank Booster (3 of 3)
|
||||||
# Implants named like: Inherent Implants 'Noble' Repair Proficiency RP (6 of 6)
|
# Implants named like: Inherent Implants 'Noble' Repair Proficiency RP (6 of 6)
|
||||||
# Modules named like: Auxiliary Nano Pump (8 of 8)
|
# Modules named like: Auxiliary Nano Pump (8 of 8)
|
||||||
# Implant: Imperial Navy Modified 'Noble' Implant
|
# Implant: Imperial Navy Modified 'Noble' Implant
|
||||||
|
|||||||
@@ -333,13 +333,16 @@ class Skill(HandledItem):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def level(self):
|
def level(self):
|
||||||
# Ensure that All 5/0 character have proper skill levels (in case database gets corrupted)
|
# @todo: there is a phantom bug that keep popping up about skills not having a character... See #1234
|
||||||
if self.character.name == "All 5":
|
# Remove this at some point when the cause can be determined.
|
||||||
self.activeLevel = self.__level = 5
|
if self.character:
|
||||||
elif self.character.name == "All 0":
|
# Ensure that All 5/0 character have proper skill levels (in case database gets corrupted)
|
||||||
self.activeLevel = self.__level = 0
|
if self.character.name == "All 5":
|
||||||
elif self.character.alphaClone:
|
self.activeLevel = self.__level = 5
|
||||||
return min(self.activeLevel, self.character.alphaClone.getSkillLevel(self)) or 0
|
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
|
return self.activeLevel or 0
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import wx
|
import wx
|
||||||
import gui.display as d
|
import gui.display as d
|
||||||
import gui.marketBrowser as marketBrowser
|
from gui.builtinMarketBrowser.events import ITEM_SELECTED
|
||||||
import gui.mainFrame
|
import gui.mainFrame
|
||||||
from gui.builtinViewColumns.state import State
|
from gui.builtinViewColumns.state import State
|
||||||
from gui.contextMenu import ContextMenu
|
from gui.contextMenu import ContextMenu
|
||||||
@@ -94,7 +94,7 @@ class ImplantDisplay(d.Display):
|
|||||||
self.lastFitId = None
|
self.lastFitId = None
|
||||||
|
|
||||||
self.mainFrame.Bind(GE.FIT_CHANGED, self.fitChanged)
|
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_DCLICK, self.removeItem)
|
||||||
self.Bind(wx.EVT_LEFT_DOWN, self.click)
|
self.Bind(wx.EVT_LEFT_DOWN, self.click)
|
||||||
self.Bind(wx.EVT_KEY_UP, self.kbEvent)
|
self.Bind(wx.EVT_KEY_UP, self.kbEvent)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import gui.mainFrame
|
|||||||
import gui.globalEvents as GE
|
import gui.globalEvents as GE
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import wx
|
import wx
|
||||||
|
import re
|
||||||
from service.fit import Fit
|
from service.fit import Fit
|
||||||
from eos.saveddata.cargo import Cargo as es_Cargo
|
from eos.saveddata.cargo import Cargo as es_Cargo
|
||||||
from eos.saveddata.fighter import Fighter as es_Fighter
|
from eos.saveddata.fighter import Fighter as es_Fighter
|
||||||
@@ -61,15 +62,16 @@ class AmountChanger(wx.Dialog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
sFit = Fit.getInstance()
|
sFit = Fit.getInstance()
|
||||||
|
cleanInput = re.sub(r'[^0-9.]', '', self.input.GetLineText(0).strip())
|
||||||
mainFrame = gui.mainFrame.MainFrame.getInstance()
|
mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||||
fitID = mainFrame.getActiveFit()
|
fitID = mainFrame.getActiveFit()
|
||||||
|
|
||||||
if isinstance(self.thing, es_Cargo):
|
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):
|
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):
|
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))
|
wx.PostEvent(mainFrame, GE.FitChanged(fitID=fitID))
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from gui.contextMenu import ContextMenu
|
|||||||
import gui.mainFrame
|
import gui.mainFrame
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import wx
|
import wx
|
||||||
from gui.shipBrowser import FitSelected
|
from gui.builtinShipBrowser.events import FitSelected
|
||||||
from service.settings import ContextMenuSettings
|
from service.settings import ContextMenuSettings
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import wx
|
import wx
|
||||||
from gui.contextMenu import ContextMenu
|
from gui.contextMenu import ContextMenu
|
||||||
import gui.mainFrame
|
import gui.mainFrame
|
||||||
from gui.shipBrowser import Stage3Selected
|
from gui.builtinShipBrowser.events import Stage3Selected
|
||||||
from service.fit import Fit
|
from service.fit import Fit
|
||||||
from service.settings import ContextMenuSettings
|
from service.settings import ContextMenuSettings
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user