diff --git a/config.py b/config.py index 7b366a209..d65e2d9f7 100644 --- a/config.py +++ b/config.py @@ -24,9 +24,9 @@ saveInRoot = False # Version data -version = "2.5.0b1" +version = "2.5.0" tag = "Stable" -expansionName = "YC120.8" +expansionName = "YC120.10" expansionVersion = "1.0" evemonMinVersion = "4081" diff --git a/eos/effects/emergencyhullenergizer.py b/eos/effects/emergencyhullenergizer.py new file mode 100644 index 000000000..122ef6e46 --- /dev/null +++ b/eos/effects/emergencyhullenergizer.py @@ -0,0 +1,7 @@ +type = "active" +runtime = "late" + + +def handler(fit, src, context): + for dmgType in ('em', 'thermal', 'kinetic', 'explosive'): + fit.ship.forceItemAttr('{}DamageResonance'.format(dmgType), src.getModifiedItemAttr("hull{}DamageResonance".format(dmgType.title()))) diff --git a/eos/effects/massentanglereffect5.py b/eos/effects/massentanglereffect5.py index 3c024d4d7..8ec34a55d 100644 --- a/eos/effects/massentanglereffect5.py +++ b/eos/effects/massentanglereffect5.py @@ -1,10 +1,13 @@ -type = "passive" +type = "active" def handler(fit, src, context): fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("warpScrambleStrength")) fit.ship.boostItemAttr("mass", src.getModifiedItemAttr("massBonusPercentage"), stackingPenalties=True) - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedFactor", src.getModifiedItemAttr("speedFactorBonus"), stackingPenalties=True) - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedBoostFactor", src.getModifiedItemAttr("speedBoostFactorBonus")) - fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"), "activationBlocked", src.getModifiedItemAttr("activationBlockedStrenght")) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedFactor", + src.getModifiedItemAttr("speedFactorBonus"), stackingPenalties=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedBoostFactor", + src.getModifiedItemAttr("speedBoostFactorBonus")) + fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"), "activationBlocked", + src.getModifiedItemAttr("activationBlockedStrenght")) fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("maxVelocityBonus"), stackingPenalties=True) diff --git a/eve.db b/eve.db index 92b11ca5d..055aa6091 100644 Binary files a/eve.db and b/eve.db differ diff --git a/gui/attribute_gauge.py b/gui/attribute_gauge.py index e275b2dc2..27b5c6dbd 100644 --- a/gui/attribute_gauge.py +++ b/gui/attribute_gauge.py @@ -1,7 +1,3 @@ -import wx -import math - -from gui.utils import anim_effects import math import wx diff --git a/gui/bitmap_loader.py b/gui/bitmap_loader.py index c763823ee..2c516b413 100644 --- a/gui/bitmap_loader.py +++ b/gui/bitmap_loader.py @@ -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): diff --git a/gui/builtinAdditionPanes/implantView.py b/gui/builtinAdditionPanes/implantView.py index 323b7c89b..1422f19ae 100644 --- a/gui/builtinAdditionPanes/implantView.py +++ b/gui/builtinAdditionPanes/implantView.py @@ -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): diff --git a/gui/fitCommands/calc/fitAddModule.py b/gui/fitCommands/calc/fitAddModule.py index f0d421baf..cd96b6d4f 100644 --- a/gui/fitCommands/calc/fitAddModule.py +++ b/gui/fitCommands/calc/fitAddModule.py @@ -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() diff --git a/gui/fitCommands/calc/fitChangeState.py b/gui/fitCommands/calc/fitChangeState.py index 4354f6c32..0b901e640 100644 --- a/gui/fitCommands/calc/fitChangeState.py +++ b/gui/fitCommands/calc/fitChangeState.py @@ -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 diff --git a/imgs/icons/10886@1x.png b/imgs/icons/10886@1x.png new file mode 100644 index 000000000..bc33a7cea Binary files /dev/null and b/imgs/icons/10886@1x.png differ diff --git a/imgs/icons/10886@2x.png b/imgs/icons/10886@2x.png new file mode 100644 index 000000000..72b667cce Binary files /dev/null and b/imgs/icons/10886@2x.png differ diff --git a/imgs/icons/10887@1x.png b/imgs/icons/10887@1x.png new file mode 100644 index 000000000..0dc4ceb8d Binary files /dev/null and b/imgs/icons/10887@1x.png differ diff --git a/imgs/icons/10887@2x.png b/imgs/icons/10887@2x.png new file mode 100644 index 000000000..8a85f1071 Binary files /dev/null and b/imgs/icons/10887@2x.png differ diff --git a/imgs/icons/21981@1x.png b/imgs/icons/21981@1x.png deleted file mode 100644 index 38ba32ef5..000000000 Binary files a/imgs/icons/21981@1x.png and /dev/null differ diff --git a/imgs/icons/21981@2x.png b/imgs/icons/21981@2x.png deleted file mode 100644 index 218950733..000000000 Binary files a/imgs/icons/21981@2x.png and /dev/null differ diff --git a/imgs/icons/22042@1x.png b/imgs/icons/22042@1x.png new file mode 100644 index 000000000..ec2b2dd8e Binary files /dev/null and b/imgs/icons/22042@1x.png differ diff --git a/imgs/icons/22042@2x.png b/imgs/icons/22042@2x.png new file mode 100644 index 000000000..064a09a3d Binary files /dev/null and b/imgs/icons/22042@2x.png differ diff --git a/imgs/renders/11865@1x.png b/imgs/renders/11865@1x.png index afd8ac559..c5ce92f59 100644 Binary files a/imgs/renders/11865@1x.png and b/imgs/renders/11865@1x.png differ diff --git a/imgs/renders/11865@2x.png b/imgs/renders/11865@2x.png index 0f15fe5b5..9153f64d0 100644 Binary files a/imgs/renders/11865@2x.png and b/imgs/renders/11865@2x.png differ diff --git a/imgs/renders/1771@1x.png b/imgs/renders/1771@1x.png index cbfa225c0..594a31207 100644 Binary files a/imgs/renders/1771@1x.png and b/imgs/renders/1771@1x.png differ diff --git a/imgs/renders/1771@2x.png b/imgs/renders/1771@2x.png index 93a87718d..a537d8778 100644 Binary files a/imgs/renders/1771@2x.png and b/imgs/renders/1771@2x.png differ diff --git a/imgs/renders/1784@1x.png b/imgs/renders/1784@1x.png index 317f897e0..c7e1587de 100644 Binary files a/imgs/renders/1784@1x.png and b/imgs/renders/1784@1x.png differ diff --git a/imgs/renders/1784@2x.png b/imgs/renders/1784@2x.png index 8b704d704..1579a3866 100644 Binary files a/imgs/renders/1784@2x.png and b/imgs/renders/1784@2x.png differ diff --git a/imgs/renders/1824@1x.png b/imgs/renders/1824@1x.png index 2746fc8ac..3c39a4920 100644 Binary files a/imgs/renders/1824@1x.png and b/imgs/renders/1824@1x.png differ diff --git a/imgs/renders/1824@2x.png b/imgs/renders/1824@2x.png index 5cf64b3aa..caf7fe570 100644 Binary files a/imgs/renders/1824@2x.png and b/imgs/renders/1824@2x.png differ diff --git a/imgs/renders/1840@1x.png b/imgs/renders/1840@1x.png index 5b829445b..d66c9ea5f 100644 Binary files a/imgs/renders/1840@1x.png and b/imgs/renders/1840@1x.png differ diff --git a/imgs/renders/1840@2x.png b/imgs/renders/1840@2x.png index 4d8350c65..188428352 100644 Binary files a/imgs/renders/1840@2x.png and b/imgs/renders/1840@2x.png differ diff --git a/imgs/renders/20137@1x.png b/imgs/renders/20137@1x.png index 50b114455..f3e96ae7a 100644 Binary files a/imgs/renders/20137@1x.png and b/imgs/renders/20137@1x.png differ diff --git a/imgs/renders/20137@2x.png b/imgs/renders/20137@2x.png index 78c64a8dd..1779892e0 100644 Binary files a/imgs/renders/20137@2x.png and b/imgs/renders/20137@2x.png differ diff --git a/imgs/renders/21052@1x.png b/imgs/renders/21052@1x.png index 18f36ce65..5ae1cc314 100644 Binary files a/imgs/renders/21052@1x.png and b/imgs/renders/21052@1x.png differ diff --git a/imgs/renders/21052@2x.png b/imgs/renders/21052@2x.png index 0da5c8fab..88fe72edc 100644 Binary files a/imgs/renders/21052@2x.png and b/imgs/renders/21052@2x.png differ diff --git a/imgs/renders/21217@1x.png b/imgs/renders/21217@1x.png index 243cc6fb6..1db6f4399 100644 Binary files a/imgs/renders/21217@1x.png and b/imgs/renders/21217@1x.png differ diff --git a/imgs/renders/21217@2x.png b/imgs/renders/21217@2x.png index dd6595460..9f33cae74 100644 Binary files a/imgs/renders/21217@2x.png and b/imgs/renders/21217@2x.png differ diff --git a/imgs/renders/21280@1x.png b/imgs/renders/21280@1x.png index 551b3fcee..a69ccc58f 100644 Binary files a/imgs/renders/21280@1x.png and b/imgs/renders/21280@1x.png differ diff --git a/imgs/renders/21280@2x.png b/imgs/renders/21280@2x.png index 60591d1c2..8e71c1f4e 100644 Binary files a/imgs/renders/21280@2x.png and b/imgs/renders/21280@2x.png differ diff --git a/imgs/renders/2160@1x.png b/imgs/renders/2160@1x.png index 9672f7bc9..3699c211a 100644 Binary files a/imgs/renders/2160@1x.png and b/imgs/renders/2160@1x.png differ diff --git a/imgs/renders/2160@2x.png b/imgs/renders/2160@2x.png index 92879afed..3b02baf32 100644 Binary files a/imgs/renders/2160@2x.png and b/imgs/renders/2160@2x.png differ diff --git a/imgs/renders/21766@1x.png b/imgs/renders/21766@1x.png index 1c86ba6dd..c4dacd372 100644 Binary files a/imgs/renders/21766@1x.png and b/imgs/renders/21766@1x.png differ diff --git a/imgs/renders/21766@2x.png b/imgs/renders/21766@2x.png index 02087abae..746d9f943 100644 Binary files a/imgs/renders/21766@2x.png and b/imgs/renders/21766@2x.png differ diff --git a/imgs/renders/21864@1x.png b/imgs/renders/21864@1x.png index 8efe3b7e2..55b34dc6a 100644 Binary files a/imgs/renders/21864@1x.png and b/imgs/renders/21864@1x.png differ diff --git a/imgs/renders/21864@2x.png b/imgs/renders/21864@2x.png index 458bfc02f..c3f37a42e 100644 Binary files a/imgs/renders/21864@2x.png and b/imgs/renders/21864@2x.png differ diff --git a/imgs/renders/21976@1x.png b/imgs/renders/21976@1x.png index c52f0aa6b..29d5502a0 100644 Binary files a/imgs/renders/21976@1x.png and b/imgs/renders/21976@1x.png differ diff --git a/imgs/renders/21976@2x.png b/imgs/renders/21976@2x.png index 93f7ddb54..96ba704b8 100644 Binary files a/imgs/renders/21976@2x.png and b/imgs/renders/21976@2x.png differ diff --git a/imgs/renders/21993@1x.png b/imgs/renders/21993@1x.png index 5269a530f..dd556f7e5 100644 Binary files a/imgs/renders/21993@1x.png and b/imgs/renders/21993@1x.png differ diff --git a/imgs/renders/21993@2x.png b/imgs/renders/21993@2x.png index b008a7731..613f33632 100644 Binary files a/imgs/renders/21993@2x.png and b/imgs/renders/21993@2x.png differ diff --git a/imgs/renders/22007@1x.png b/imgs/renders/22007@1x.png index d5861b6fd..9fd047486 100644 Binary files a/imgs/renders/22007@1x.png and b/imgs/renders/22007@1x.png differ diff --git a/imgs/renders/22007@2x.png b/imgs/renders/22007@2x.png index 4c9328c8c..4f7daa73d 100644 Binary files a/imgs/renders/22007@2x.png and b/imgs/renders/22007@2x.png differ diff --git a/imgs/renders/22142@1x.png b/imgs/renders/22142@1x.png index 9697779ee..bbd81ce5a 100644 Binary files a/imgs/renders/22142@1x.png and b/imgs/renders/22142@1x.png differ diff --git a/imgs/renders/22142@2x.png b/imgs/renders/22142@2x.png index 3e60c06f3..b2dfe5322 100644 Binary files a/imgs/renders/22142@2x.png and b/imgs/renders/22142@2x.png differ diff --git a/imgs/renders/22150@1x.png b/imgs/renders/22150@1x.png index 3124c9d54..3f0a62a40 100644 Binary files a/imgs/renders/22150@1x.png and b/imgs/renders/22150@1x.png differ diff --git a/imgs/renders/22150@2x.png b/imgs/renders/22150@2x.png index 4646d5363..750a4aad6 100644 Binary files a/imgs/renders/22150@2x.png and b/imgs/renders/22150@2x.png differ diff --git a/imgs/renders/22161@1x.png b/imgs/renders/22161@1x.png index 24bd5f37a..2d5a611d2 100644 Binary files a/imgs/renders/22161@1x.png and b/imgs/renders/22161@1x.png differ diff --git a/imgs/renders/22161@2x.png b/imgs/renders/22161@2x.png index 80162ef01..26f32ac08 100644 Binary files a/imgs/renders/22161@2x.png and b/imgs/renders/22161@2x.png differ diff --git a/imgs/renders/22189@1x.png b/imgs/renders/22189@1x.png index d60a33c87..b247ba1a4 100644 Binary files a/imgs/renders/22189@1x.png and b/imgs/renders/22189@1x.png differ diff --git a/imgs/renders/22189@2x.png b/imgs/renders/22189@2x.png index 9330dd283..b6fff3a88 100644 Binary files a/imgs/renders/22189@2x.png and b/imgs/renders/22189@2x.png differ diff --git a/imgs/renders/22233@1x.png b/imgs/renders/22233@1x.png new file mode 100644 index 000000000..22c110277 Binary files /dev/null and b/imgs/renders/22233@1x.png differ diff --git a/imgs/renders/22233@2x.png b/imgs/renders/22233@2x.png new file mode 100644 index 000000000..a33bc7820 Binary files /dev/null and b/imgs/renders/22233@2x.png differ diff --git a/imgs/renders/22234@1x.png b/imgs/renders/22234@1x.png new file mode 100644 index 000000000..27ffbbbd0 Binary files /dev/null and b/imgs/renders/22234@1x.png differ diff --git a/imgs/renders/22234@2x.png b/imgs/renders/22234@2x.png new file mode 100644 index 000000000..00dde9e58 Binary files /dev/null and b/imgs/renders/22234@2x.png differ diff --git a/imgs/renders/2642@1x.png b/imgs/renders/2642@1x.png index 22781db4f..0385a2fd2 100644 Binary files a/imgs/renders/2642@1x.png and b/imgs/renders/2642@1x.png differ diff --git a/imgs/renders/2642@2x.png b/imgs/renders/2642@2x.png index bcc1f5c89..827b32d53 100644 Binary files a/imgs/renders/2642@2x.png and b/imgs/renders/2642@2x.png differ diff --git a/imgs/renders/2737@1x.png b/imgs/renders/2737@1x.png index b52180477..fd4694f0c 100644 Binary files a/imgs/renders/2737@1x.png and b/imgs/renders/2737@1x.png differ diff --git a/imgs/renders/2737@2x.png b/imgs/renders/2737@2x.png index b0de175c7..48c2b48c4 100644 Binary files a/imgs/renders/2737@2x.png and b/imgs/renders/2737@2x.png differ diff --git a/imgs/renders/2930@1x.png b/imgs/renders/2930@1x.png index cb53959f7..38633f3c3 100644 Binary files a/imgs/renders/2930@1x.png and b/imgs/renders/2930@1x.png differ diff --git a/imgs/renders/2930@2x.png b/imgs/renders/2930@2x.png index ef9fe0fa3..0fa786dfa 100644 Binary files a/imgs/renders/2930@2x.png and b/imgs/renders/2930@2x.png differ diff --git a/imgs/renders/301@1x.png b/imgs/renders/301@1x.png index 7289b5453..ca566e6b9 100644 Binary files a/imgs/renders/301@1x.png and b/imgs/renders/301@1x.png differ diff --git a/imgs/renders/301@2x.png b/imgs/renders/301@2x.png index 4ef0ded7c..de7f133cf 100644 Binary files a/imgs/renders/301@2x.png and b/imgs/renders/301@2x.png differ diff --git a/imgs/renders/3205@1x.png b/imgs/renders/3205@1x.png index 322d9d27a..eee980b50 100644 Binary files a/imgs/renders/3205@1x.png and b/imgs/renders/3205@1x.png differ diff --git a/imgs/renders/3205@2x.png b/imgs/renders/3205@2x.png index 746e554e8..967ee07f5 100644 Binary files a/imgs/renders/3205@2x.png and b/imgs/renders/3205@2x.png differ diff --git a/imgs/renders/3207@1x.png b/imgs/renders/3207@1x.png index 769c51579..72621e35d 100644 Binary files a/imgs/renders/3207@1x.png and b/imgs/renders/3207@1x.png differ diff --git a/imgs/renders/3207@2x.png b/imgs/renders/3207@2x.png index 662c6bf83..df46f232d 100644 Binary files a/imgs/renders/3207@2x.png and b/imgs/renders/3207@2x.png differ diff --git a/imgs/renders/3353@1x.png b/imgs/renders/3353@1x.png index ee643cfa1..0b5a566e6 100644 Binary files a/imgs/renders/3353@1x.png and b/imgs/renders/3353@1x.png differ diff --git a/imgs/renders/3353@2x.png b/imgs/renders/3353@2x.png index 9a1d32154..4ab820b78 100644 Binary files a/imgs/renders/3353@2x.png and b/imgs/renders/3353@2x.png differ diff --git a/imgs/renders/3354@1x.png b/imgs/renders/3354@1x.png index 5137bb437..4f06805cc 100644 Binary files a/imgs/renders/3354@1x.png and b/imgs/renders/3354@1x.png differ diff --git a/imgs/renders/3354@2x.png b/imgs/renders/3354@2x.png index 8152458ba..8fd971282 100644 Binary files a/imgs/renders/3354@2x.png and b/imgs/renders/3354@2x.png differ diff --git a/imgs/renders/3356@1x.png b/imgs/renders/3356@1x.png index a24de44ec..70dbdf5a8 100644 Binary files a/imgs/renders/3356@1x.png and b/imgs/renders/3356@1x.png differ diff --git a/imgs/renders/3356@2x.png b/imgs/renders/3356@2x.png index 65a7e4bc5..1d5f6c266 100644 Binary files a/imgs/renders/3356@2x.png and b/imgs/renders/3356@2x.png differ diff --git a/imgs/renders/3360@1x.png b/imgs/renders/3360@1x.png index bb2a89a6c..9f2d144c7 100644 Binary files a/imgs/renders/3360@1x.png and b/imgs/renders/3360@1x.png differ diff --git a/imgs/renders/3360@2x.png b/imgs/renders/3360@2x.png index 706cdb9d9..20f7e1684 100644 Binary files a/imgs/renders/3360@2x.png and b/imgs/renders/3360@2x.png differ diff --git a/imgs/renders/41@1x.png b/imgs/renders/41@1x.png index 935f3daef..71ab534ae 100644 Binary files a/imgs/renders/41@1x.png and b/imgs/renders/41@1x.png differ diff --git a/imgs/renders/41@2x.png b/imgs/renders/41@2x.png index 7272f4b4f..9bc8a9601 100644 Binary files a/imgs/renders/41@2x.png and b/imgs/renders/41@2x.png differ diff --git a/imgs/renders/48@1x.png b/imgs/renders/48@1x.png index 275d097c6..9de44dde9 100644 Binary files a/imgs/renders/48@1x.png and b/imgs/renders/48@1x.png differ diff --git a/imgs/renders/48@2x.png b/imgs/renders/48@2x.png index 6740c0cff..eb69a54f5 100644 Binary files a/imgs/renders/48@2x.png and b/imgs/renders/48@2x.png differ diff --git a/imgs/renders/49@1x.png b/imgs/renders/49@1x.png index 9fd16706e..2cde9edcd 100644 Binary files a/imgs/renders/49@1x.png and b/imgs/renders/49@1x.png differ diff --git a/imgs/renders/49@2x.png b/imgs/renders/49@2x.png index d0834d761..c06572017 100644 Binary files a/imgs/renders/49@2x.png and b/imgs/renders/49@2x.png differ diff --git a/imgs/renders/59@1x.png b/imgs/renders/59@1x.png index 3fafda545..4a97e584f 100644 Binary files a/imgs/renders/59@1x.png and b/imgs/renders/59@1x.png differ diff --git a/imgs/renders/59@2x.png b/imgs/renders/59@2x.png index a67933fc7..1150ec746 100644 Binary files a/imgs/renders/59@2x.png and b/imgs/renders/59@2x.png differ diff --git a/imgs/renders/61@1x.png b/imgs/renders/61@1x.png index 169752d86..8be84d9a0 100644 Binary files a/imgs/renders/61@1x.png and b/imgs/renders/61@1x.png differ diff --git a/imgs/renders/61@2x.png b/imgs/renders/61@2x.png index a8fb1189e..3b5694ffd 100644 Binary files a/imgs/renders/61@2x.png and b/imgs/renders/61@2x.png differ diff --git a/scripts/icons_update.py b/scripts/icons_update.py index 2443b6ed4..50945ff1c 100644 --- a/scripts/icons_update.py +++ b/scripts/icons_update.py @@ -65,8 +65,8 @@ graphics = graphicIDsLoader.load(os.path.join(to_path, 'graphicIDs.fsdbinary')) graphics_py_ob = {} for x, v in graphics.items(): - if hasattr(v, 'iconFolder'): - graphics_py_ob[x] = v.iconFolder + if hasattr(v, 'iconInfo') and hasattr(v.iconInfo, 'folder'): + graphics_py_ob[x] = v.iconInfo.folder # Add children to market group list # {parent: {children}} @@ -230,7 +230,11 @@ if toadd: print(('Adding {} icons...'.format(len(toadd)))) missing = set() for fname in sorted(toadd): - key = graphics_py_ob[int(fname)] + try: + key = graphics_py_ob[int(fname)] + except KeyError: + print("Can't find graphicID {}".format(fname)) + key = "{}/{}_64.png".format(key, fname) for i in range(2): diff --git a/service/fit.py b/service/fit.py index d830dda3e..3cbe96fcf 100644 --- a/service/fit.py +++ b/service/fit.py @@ -558,9 +558,10 @@ class Fit(FitDeprecated): drone.amountActive = 0 changed = True + return changed # If any state was changed, recalculate attributes again - if changed: - self.recalc(fit) + # if changed: + # self.recalc(fit) def refreshFit(self, fitID): pyfalog.debug("Refresh fit for fit ID: {0}", fitID) diff --git a/service/port/efs.py b/service/port/efs.py index 4420adc90..ef224e850 100755 --- a/service/port/efs.py +++ b/service/port/efs.py @@ -1,20 +1,23 @@ +import inspect +import os +import platform +import re +import sys +import traceback import json -import json -from math import log - -from logbook import Logger - import eos.db + +from math import log from config import version as pyfaVersion -from eos.db import gamedata_session, getAttributeInfo, getCategory, getGroup -from eos.effectHandlerHelpers import HandledList -from eos.enum import Enum -from eos.gamedata import Attribute, Effect, Group, Item, ItemEffect -from eos.saveddata.drone import Drone -from eos.saveddata.module import Hardpoint, Module, Slot, State from service.fit import Fit from service.market import Market - +from eos.enum import Enum +from eos.saveddata.module import Hardpoint, Slot, Module, State +from eos.saveddata.drone import Drone +from eos.effectHandlerHelpers import HandledList +from eos.db import gamedata_session, getItemsByCategory, getCategory, getAttributeInfo, getGroup +from eos.gamedata import Category, Group, Item, Traits, Attribute, Effect, ItemEffect +from logbook import Logger pyfalog = Logger(__name__) @@ -26,9 +29,9 @@ class RigSize(Enum): CAPITAL = 4 -class EfsPort: +class EfsPort(): wepTestSet = {} - version = 0.01 + version = 0.02 @staticmethod def attrDirectMap(values, target, source): @@ -88,12 +91,10 @@ class EfsPort: oldPropState = propWithBloom.state propWithBloom.state = State.ONLINE sFit.recalc(fit) - fit = eos.db.getFit(fitID) sp = fit.maxSpeed sig = fit.ship.getModifiedItemAttr("signatureRadius") propWithBloom.state = oldPropState sFit.recalc(fit) - fit = eos.db.getFit(fitID) return {"usingMWD": True, "unpropedSpeed": sp, "unpropedSig": sig} return { "usingMWD": False, @@ -150,6 +151,13 @@ class EfsPort: elif mod.item.group.name == "Warp Scrambler": stats["type"] = "Warp Scrambler" EfsPort.attrDirectMap(["activationBlockedStrenght", "warpScrambleStrength"], stats, mod) + elif mod.item.group.name == "Warp Disrupt Field Generator": + maxRangeDefault = mod.getModifiedItemAttr("warpScrambleRange") + stats["type"] = "Warp Scrambler" + EfsPort.attrDirectMap(["activationBlockedStrenght", "warpScrambleStrength"], stats, mod) + if maxRangeDefault >= 30000: + # We want this to be 0 for disruption scripts as we have no other way to tell scrams from points. + stats["activationBlockedStrenght"] = 0 elif mod.item.group.name == "Target Painter": stats["type"] = "Target Painter" EfsPort.attrDirectMap(["signatureRadiusBonus"], stats, mod) @@ -313,10 +321,13 @@ class EfsPort: explosionRadius = 0 explosionVelocity = 0 aoeFieldRange = 0 + if stats.charge: + name = stats.item.name + ", " + stats.charge.name + else: + name = stats.item.name if stats.hardpoint == Hardpoint.TURRET: tracking = stats.getModifiedItemAttr("trackingSpeed") typeing = "Turret" - name = stats.item.name + ", " + stats.charge.name # Bombs share most attributes with missiles despite not needing the hardpoint elif stats.hardpoint == Hardpoint.MISSILE or "Bomb Launcher" in stats.item.name: maxVelocity = stats.getModifiedChargeAttr("maxVelocity") @@ -325,15 +336,18 @@ class EfsPort: explosionRadius = stats.getModifiedChargeAttr("aoeCloudSize") explosionVelocity = stats.getModifiedChargeAttr("aoeVelocity") typeing = "Missile" - name = stats.item.name + ", " + stats.charge.name elif stats.hardpoint == Hardpoint.NONE: aoeFieldRange = stats.getModifiedItemAttr("empFieldRange") # This also covers non-bomb weapons with dps values and no hardpoints, most notably targeted doomsdays. typeing = "SmartBomb" - name = stats.item.name + # Targeted DDs are the only non drone/fighter weapon without an explict max range + if stats.item.group.name == 'Super Weapon' and stats.maxRange == None: + maxRange = 300000 + else: + maxRange = stats.maxRange statDict = { "dps": stats.dps * n, "capUse": stats.capUse * n, "falloff": stats.falloff, - "type": typeing, "name": name, "optimal": stats.maxRange, + "type": typeing, "name": name, "optimal": maxRange, "numCharges": stats.numCharges, "numShots": stats.numShots, "reloadTime": stats.reloadTime, "cycleTime": stats.cycleTime, "volley": stats.volley * n, "tracking": tracking, "maxVelocity": maxVelocity, "explosionDelay": explosionDelay, "damageReductionFactor": damageReductionFactor, @@ -497,7 +511,7 @@ class EfsPort: # Since the effect modules are fairly opaque a mock test fit is used to test the impact of traits. # standin class used to prevent . notation causing issues when used as an arg - class standin: + class standin(): pass tf = standin() tf.modules = HandledList(turrets + launchers) diff --git a/service/price.py b/service/price.py index ebefe15a1..9a8485274 100644 --- a/service/price.py +++ b/service/price.py @@ -235,4 +235,4 @@ class PriceWorkerThread(threading.Thread): # Import market sources only to initialize price source modules, they register on their own -from .marketSources import * +from service.marketSources import evemarketer, evemarketdata # noqa: E402