From a7b01ece2271213476509bd121376cd975479e41 Mon Sep 17 00:00:00 2001 From: Andreas Zuber Date: Tue, 14 May 2019 10:03:20 +0200 Subject: [PATCH 1/6] Add link to Gentoo pyfa overlay --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5c6457a5..09de999fd 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,14 @@ Apart from the official release, there is also a [Homebrew](http://brew.sh) opti $ brew install Caskroom/cask/pyfa ``` -### Linux Distro-specific Packages +### Linux and BSD Distro-specific Packages The following is a list of pyfa packages available for certain distributions. Please note that these packages are maintained by third-parties and are not evaluated by the pyfa developers. * Debian/Ubuntu/derivatives: https://github.com/AdamMajer/Pyfa/releases * Arch: https://aur.archlinux.org/packages/pyfa/ * openSUSE: https://build.opensuse.org/package/show/home:rmk2/pyfa * FreeBSD: http://www.freshports.org/games/pyfa/ (see [#484](https://github.com/pyfa-org/Pyfa/issues/484) for instructions) +* Gentoo: https://github.com/ZeroPointEnergy/gentoo-pyfa-overlay ### Dependencies If you wish to help with development or simply need to run pyfa through a Python interpreter, the following software is required: From d59b6696cab1cc476ef72d4e23dfe70c08984545 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 14 May 2019 14:22:09 +0300 Subject: [PATCH 2/6] Remove links to unmaintained packages --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 09de999fd..d2830d71b 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,10 @@ Apart from the official release, there is also a [Homebrew](http://brew.sh) opti $ brew install Caskroom/cask/pyfa ``` -### Linux and BSD Distro-specific Packages +### Linux Distro-specific Packages The following is a list of pyfa packages available for certain distributions. Please note that these packages are maintained by third-parties and are not evaluated by the pyfa developers. -* Debian/Ubuntu/derivatives: https://github.com/AdamMajer/Pyfa/releases * Arch: https://aur.archlinux.org/packages/pyfa/ -* openSUSE: https://build.opensuse.org/package/show/home:rmk2/pyfa -* FreeBSD: http://www.freshports.org/games/pyfa/ (see [#484](https://github.com/pyfa-org/Pyfa/issues/484) for instructions) * Gentoo: https://github.com/ZeroPointEnergy/gentoo-pyfa-overlay ### Dependencies From 8c0817245faeec178067c51c6816d1a811bb2667 Mon Sep 17 00:00:00 2001 From: "J. Taylor Mayfield" Date: Fri, 17 May 2019 15:27:17 -0500 Subject: [PATCH 3/6] Include skill prerequisites for applied implants and boosters in fit skill check. --- service/character.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/character.py b/service/character.py index 37103a448..b5e7d1e6e 100644 --- a/service/character.py +++ b/service/character.py @@ -429,7 +429,7 @@ class Character(object): def checkRequirements(self, fit): # toCheck = [] reqs = {} - for thing in itertools.chain(fit.modules, fit.drones, fit.fighters, (fit.ship,)): + for thing in itertools.chain(fit.modules, fit.drones, fit.fighters, (fit.ship,), fit.appliedImplants, fit.boosters): if isinstance(thing, es_Module) and thing.slot == es_Slot.RIG: continue for attr in ("item", "charge"): From e48631956da0066c63d903182700e78a9df6543d Mon Sep 17 00:00:00 2001 From: MaruMaruOO Date: Wed, 22 May 2019 02:35:47 -0400 Subject: [PATCH 4/6] Add typeIDs for cargo to EFS exports. --- service/port/efs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/service/port/efs.py b/service/port/efs.py index 7c9a5bc6d..10e615cf0 100755 --- a/service/port/efs.py +++ b/service/port/efs.py @@ -632,6 +632,10 @@ class EfsPort: defaultSpoolValue = 1 spoolOptions = SpoolOptions(SpoolType.SCALE, defaultSpoolValue, True) + cargoIDs = [] + for cargo in fit.cargo: + cargoIDs.append(cargo.itemID) + def roundNumbers(data, digits): if isinstance(data, str): return @@ -670,7 +674,7 @@ class EfsPort: "droneControlRange": fitModAttr("droneControlRange"), "mass": fitModAttr("mass"), "unpropedSpeed": propData["unpropedSpeed"], "unpropedSig": propData["unpropedSig"], "usingMWD": propData["usingMWD"], "mwdPropSpeed": mwdPropSpeed, "projections": projections, - "modTypeIDs": modTypeIDs, "moduleNames": moduleNames, + "modTypeIDs": modTypeIDs, "moduleNames": moduleNames, "cargoItemIDs": cargoIDs, "pyfaVersion": pyfaVersion, "efsExportVersion": EfsPort.version } # Recursively round any numbers in dicts to 6 decimal places. From bba0df5f505d745e7a39dbf7d556babe4906c14f Mon Sep 17 00:00:00 2001 From: Aaron Opfer Date: Sun, 26 May 2019 04:33:15 -0500 Subject: [PATCH 5/6] improve sizing on esi fit import browser On my machine, using the ESI import feature and clicking "Fetch Fits" gives the appearance of nothing happening. Turns out, this was because by default the tree on the left-hand side of the window has zero width by default and the parent window needs to be resized to see the fits. Fix this by setting a minimum size for the fitting browser tree and increase the default window size to compensate. --- gui/esiFittings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/esiFittings.py b/gui/esiFittings.py index 244df76ec..8fa9c632b 100644 --- a/gui/esiFittings.py +++ b/gui/esiFittings.py @@ -24,7 +24,7 @@ class EveFittings(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, id=wx.ID_ANY, title="Browse EVE Fittings", pos=wx.DefaultPosition, - size=wx.Size(550, 450), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL) + size=wx.Size(750, 450), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL) self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)) @@ -49,6 +49,7 @@ class EveFittings(wx.Frame): self.fitTree = FittingsTreeView(self) browserSizer.Add(self.fitTree, 1, wx.ALL | wx.EXPAND, 5) + browserSizer.SetItemMinSize(0, 200, 0) contentSizer.Add(browserSizer, 1, wx.EXPAND, 0) fitSizer = wx.BoxSizer(wx.VERTICAL) From 066f29660d45bc2181451ca055735fff5fea05bd Mon Sep 17 00:00:00 2001 From: MaruMaruOO Date: Mon, 27 May 2019 02:18:10 -0400 Subject: [PATCH 6/6] Added repair and cap data to EFS exports. --- service/port/efs.py | 70 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 6 deletions(-) diff --git a/service/port/efs.py b/service/port/efs.py index 10e615cf0..3b45f0ba6 100755 --- a/service/port/efs.py +++ b/service/port/efs.py @@ -18,6 +18,7 @@ from eos.gamedata import Attribute, Effect, Group, Item, ItemEffect from eos.utils.spoolSupport import SpoolType, SpoolOptions from gui.fitCommands.calc.module.localAdd import CalcAddLocalModuleCommand from gui.fitCommands.calc.module.localRemove import CalcRemoveLocalModulesCommand +from gui.fitCommands.calc.module.changeCharges import CalcChangeModuleChargesCommand from gui.fitCommands.helpers import ModuleInfo @@ -26,7 +27,7 @@ pyfalog = Logger(__name__) class EfsPort: wepTestSet = {} - version = 0.03 + version = 0.04 @staticmethod def attrDirectMap(values, target, source): @@ -96,6 +97,63 @@ class EfsPort: "unpropedSig": fit.ship.getModifiedItemAttr("signatureRadius") } + @staticmethod + def getModsInGroups(fit, modGroupNames): + matchingMods = list(filter(lambda mod: mod.item and mod.item.group.name in modGroupNames, fit.modules)) + # Sort mods to prevent the order needlessly changing as pyfa updates. + matchingMods.sort(key=lambda mod: mod.item.ID) + matchingMods.sort(key=lambda mod: mod.item.group.ID) + return matchingMods + + # Note this also includes data for any cap boosters as they "repair" cap. + @staticmethod + def getRepairData(fit, sFit): + modGroupNames = [ + "Shield Booster", "Armor Repair Unit", + "Ancillary Shield Booster", "Ancillary Armor Repairer", + "Hull Repair Unit", "Capacitor Booster", + ] + repairMods = EfsPort.getModsInGroups(fit, modGroupNames) + repairs = []; + for mod in repairMods: + stats = {} + EfsPort.attrDirectMap(["duration", "capacitorNeed"], stats, mod) + if mod.item.group.name in ["Armor Repair Unit", "Ancillary Armor Repairer"]: + stats["type"] = "Armor Repairer" + EfsPort.attrDirectMap(["armorDamageAmount"], stats, mod) + if mod.item.group.name == "Ancillary Armor Repairer": + stats["numShots"] = mod.numShots + EfsPort.attrDirectMap(["reloadTime", "chargedArmorDamageMultiplier"], stats, mod) + elif mod.item.group.name in ["Shield Booster", "Ancillary Shield Booster"]: + stats["type"] = "Shield Booster" + EfsPort.attrDirectMap(["shieldBonus"], stats, mod) + if mod.item.group.name == "Ancillary Shield Booster": + stats["numShots"] = mod.numShots + EfsPort.attrDirectMap(["reloadTime"], stats, mod) + c = mod.charge + if c: + sFit.recalc(fit) + CalcChangeModuleChargesCommand( + fit.ID, + projected=False, + chargeMap={mod.position: None}, + commit=False).Do() + sFit.recalc(fit) + stats["unloadedCapacitorNeed"] = mod.getModifiedItemAttr("capacitorNeed") + CalcChangeModuleChargesCommand( + fit.ID, + projected=False, + chargeMap={mod.position: c.typeID}, + commit=False).Do() + sFit.recalc(fit) + elif mod.item.group.name == "Capacitor Booster": + # The capacitorNeed is negative, which provides the boost. + stats["type"] = "Capacitor Booster" + stats["numShots"] = mod.numShots + EfsPort.attrDirectMap(["reloadTime"], stats, mod) + repairs.append(stats) + return repairs + @staticmethod def getOutgoingProjectionData(fit): # This is a subset of module groups capable of projection and a superset of those currently used by efs @@ -108,10 +166,7 @@ class EfsPort: "Ancillary Remote Shield Booster", "Ancillary Remote Armor Repairer", "Titan Phenomena Generator", "Non-Repeating Hardeners", "Mutadaptive Remote Armor Repairer" ] - projectedMods = list(filter(lambda mod: mod.item and mod.item.group.name in modGroupNames, fit.modules)) - # Sort projections to prevent the order needlessly changing as pyfa updates. - projectedMods.sort(key=lambda mod: mod.item.ID) - projectedMods.sort(key=lambda mod: mod.item.group.ID) + projectedMods = EfsPort.getModsInGroups(fit, modGroupNames) projections = [] for mod in projectedMods: maxRangeDefault = 0 @@ -636,6 +691,8 @@ class EfsPort: for cargo in fit.cargo: cargoIDs.append(cargo.itemID) + repairs = EfsPort.getRepairData(fit, sFit) + def roundNumbers(data, digits): if isinstance(data, str): return @@ -664,6 +721,7 @@ class EfsPort: "scanStrength": fit.scanStrength, "weaponDPS": fit.getWeaponDps(spoolOptions=spoolOptions).total, "alignTime": fit.alignTime, "signatureRadius": fitModAttr("signatureRadius"), "weapons": weaponSystems, "scanRes": fitModAttr("scanResolution"), "capUsed": fit.capUsed, "capRecharge": fit.capRecharge, + "capacitorCapacity": fitModAttr("capacitorCapacity"), "rechargeRate": fitModAttr("rechargeRate"), "rigSlots": fitModAttr("rigSlots"), "lowSlots": fitModAttr("lowSlots"), "midSlots": fitModAttr("medSlots"), "highSlots": fitModAttr("hiSlots"), "turretSlots": fitModAttr("turretSlotsLeft"), "launcherSlots": fitModAttr("launcherSlotsLeft"), @@ -674,7 +732,7 @@ class EfsPort: "droneControlRange": fitModAttr("droneControlRange"), "mass": fitModAttr("mass"), "unpropedSpeed": propData["unpropedSpeed"], "unpropedSig": propData["unpropedSig"], "usingMWD": propData["usingMWD"], "mwdPropSpeed": mwdPropSpeed, "projections": projections, - "modTypeIDs": modTypeIDs, "moduleNames": moduleNames, "cargoItemIDs": cargoIDs, + "repairs": repairs, "modTypeIDs": modTypeIDs, "moduleNames": moduleNames, "cargoItemIDs": cargoIDs, "pyfaVersion": pyfaVersion, "efsExportVersion": EfsPort.version } # Recursively round any numbers in dicts to 6 decimal places.