diff --git a/README.md b/README.md index e4feb9699..d42f5a6fe 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,13 @@ The latest version along with release notes can always be found on the project's ## Installation Windows and OS X users are supplied self-contained builds of pyfa on the [latest releases](https://github.com/pyfa-org/Pyfa/releases/latest) page. An `.exe` installer is also available for Windows builds. Linux users can run pyfa using their distribution's Python interpreter. There is no official self-contained package for Linux, however, there are a number of third-party packages available through distribution-specific repositories. -### OS X -If you got [Homebrew](http://brew.sh), simply fire up in terminal: +#### OS X +There are two different distributives for OS X: `-mac` and `-mac-deprecated`. + +* `-mac`: based on wxPython 3.0.2.0 and has updated libraries. This is the recommended build. +* `-mac-deprecated`: utilizes older binaries running on wxPython 2.8; because of this, some features are not available (currently CREST support and Attribute Overrides). Additionally, as development happens primarily on wxPython 3.0, a few GUI bugs may pop up as `-mac-deprecated` is not actively tested. However, due to some general issues with wxPython 3.0, especially on some newer OS X versions, `-mac-deprecated` is still offered for those that need it. + +There is also a [Homebrew](http://brew.sh) option for installing pyfa on OS X. Please note this is maintained by a third-party and is not tested by pyfa developers. Simply fire up in terminal: ``` $ brew cask install pyfa ``` @@ -59,4 +64,4 @@ pyfa is licensed under the GNU GPL v3.0, see LICENSE * Email: sable.blitzmann@gmail.com ## CCP Copyright Notice -EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to Osmium to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, Osmium. CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for any damage arising from the use of this website. +EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. CCP hf. has granted permission to pyfa to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, pyfa. CCP is in no way responsible for the content on or functioning of this program, nor can it be liable for any damage arising from the use of this program. diff --git a/config.py b/config.py index e95917f68..86c4a16d3 100644 --- a/config.py +++ b/config.py @@ -18,10 +18,10 @@ debug = False saveInRoot = False # Version data -version = "1.21.3" +version = "1.22.1" tag = "git" -expansionName = "Citadel" -expansionVersion = "1.11" +expansionName = "YC 118.6" +expansionVersion = "1.0" evemonMinVersion = "4081" pyfaPath = None diff --git a/eos/db/gamedata/queries.py b/eos/db/gamedata/queries.py index 93c43fc38..32c0f766f 100644 --- a/eos/db/gamedata/queries.py +++ b/eos/db/gamedata/queries.py @@ -194,7 +194,7 @@ def searchItems(nameLike, where=None, join=None, eager=None): items = gamedata_session.query(Item).options(*processEager(eager)).join(*join) for token in nameLike.split(' '): token_safe = u"%{0}%".format(sqlizeString(token)) - items = items.filter(processWhere(Item.name.like(token_safe, escape="\\"), where)) + items = items.filter(and_(Item.name.like(token_safe, escape="\\"), where)) items = items.limit(100).all() return items diff --git a/eos/db/saveddata/__init__.py b/eos/db/saveddata/__init__.py index e43c6e601..c97707f68 100644 --- a/eos/db/saveddata/__init__.py +++ b/eos/db/saveddata/__init__.py @@ -14,6 +14,7 @@ __all__ = [ "targetResists", "override", "crest", - "implantSet" + "implantSet", + "loadDefaultDatabaseValues" ] diff --git a/eos/db/saveddata/fighter.py b/eos/db/saveddata/fighter.py index 1daa37ae7..2f4089756 100644 --- a/eos/db/saveddata/fighter.py +++ b/eos/db/saveddata/fighter.py @@ -20,7 +20,7 @@ from sqlalchemy import Table, Column, Integer, ForeignKey, Boolean from sqlalchemy.orm import mapper from eos.db import saveddata_meta -from eos.types import Fighter +from eos.types import Fighter, Fit from sqlalchemy.orm import * from sqlalchemy.sql import and_ from eos.effectHandlerHelpers import * @@ -42,6 +42,7 @@ fighter_abilities_table = Table("fightersAbilities", saveddata_meta, mapper(Fighter, fighters_table, properties = { + "owner": relation(Fit), "_Fighter__abilities": relation( FighterAbility, backref="fighter", diff --git a/eos/db/saveddata/loadDefaultDatabaseValues.py b/eos/db/saveddata/loadDefaultDatabaseValues.py new file mode 100644 index 000000000..8661e23fa --- /dev/null +++ b/eos/db/saveddata/loadDefaultDatabaseValues.py @@ -0,0 +1,190 @@ +#=============================================================================== +# Copyright (C) 2010 Diego Duclos +# +# This file is part of pyfa. +# +# pyfa is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# pyfa is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with pyfa. If not, see . +#=============================================================================== + +import eos.db +import eos.types + +class ImportError(Exception): + pass + +class DefaultDatabaseValues(): + instance = None + + @classmethod + def importDamageProfileDefaults(self): + damageProfileList = [] + damageProfileList.append(["Uniform", "25", "25", "25", "25"]) + damageProfileList.append(["[Generic]EM", "100", "0", "0", "0"]) + damageProfileList.append(["[Generic]Thermal", "0", "100", "0", "0"]) + damageProfileList.append(["[Generic]Kinetic", "0", "0", "100", "0"]) + damageProfileList.append(["[Generic]Explosive", "0", "0", "0", "100"]) + damageProfileList.append(["[NPC][Asteroid] Blood Raiders", "5067", "4214", "0", "0"]) + damageProfileList.append(["[Bombs]Concussion Bomb", "0", "0", "6400", "0"]) + damageProfileList.append(["[Bombs]Electron Bomb", "6400", "0", "0", "0"]) + damageProfileList.append(["[Bombs]Scorch Bomb", "0", "6400", "0", "0"]) + damageProfileList.append(["[Bombs]Shrapnel Bomb", "0", "0", "0", "6400"]) + damageProfileList.append(["[Frequency Crystals][T2] Gleam", "56", "56", "0", "0"]) + damageProfileList.append(["[Frequency Crystals][T2] Aurora", "40", "24", "0", "0"]) + damageProfileList.append(["[Frequency Crystals][T2] Scorch", "72", "16", "0", "0"]) + damageProfileList.append(["[Frequency Crystals][T2] Conflagration", "61.6", "61.6", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Gamma", "61.6", "35.2", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Infrared", "44", "17.6", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Microwave", "35.2", "17.6", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Multifrequency", "61.6", "44", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Radio", "44", "0", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Standard", "44", "26.4", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Ultraviolet", "52.8", "26.4", "0", "0"]) + damageProfileList.append(["[Frequency Crystals]Xray", "52.8", "35.2", "0", "0"]) + damageProfileList.append(["[Hybrid Charges][T2] Void", "0", "61.6", "61.6", "0"]) + damageProfileList.append(["[Hybrid Charges][T2] Null", "0", "48", "40", "0"]) + damageProfileList.append(["[Hybrid Charges][T2] Javelin", "0", "64", "48", "0"]) + damageProfileList.append(["[Hybrid Charges][T2] Spike", "0", "32", "32", "0"]) + damageProfileList.append(["[Hybrid Charges]Antimatter", "0", "48", "67.2", "0"]) + damageProfileList.append(["[Hybrid Charges]Iridium", "0", "28.8", "38.4", "0"]) + damageProfileList.append(["[Hybrid Charges]Iron", "0", "19.2", "28.8", "0"]) + damageProfileList.append(["[Hybrid Charges]Lead", "0", "28.8", "48", "0"]) + damageProfileList.append(["[Hybrid Charges]Plutonium", "0", "48", "57.6", "0"]) + damageProfileList.append(["[Hybrid Charges]Thorium", "0", "38.4", "48", "0"]) + damageProfileList.append(["[Hybrid Charges]Tungsten", "0", "19.2", "38.4", "0"]) + damageProfileList.append(["[Hybrid Charges]Uranium", "0", "38.4", "57.6", "0"]) + damageProfileList.append(["[Missiles]Mjolnir", "100", "0", "0", "0"]) + damageProfileList.append(["[Missiles]Inferno", "0", "100", "0", "0"]) + damageProfileList.append(["[Missiles]Scourge", "0", "0", "100", "0"]) + damageProfileList.append(["[Missiles]Nova", "0", "0", "0", "100"]) + damageProfileList.append(["[Missiles][Structure) Standup Missile", "100", "100", "100", "100"]) + damageProfileList.append(["[Projectile Ammo][T2] Tremor", "0", "0", "24", "40"]) + damageProfileList.append(["[Projectile Ammo][T2] Quake", "0", "0", "40", "72"]) + damageProfileList.append(["[Projectile Ammo][T2] Hail", "0", "0", "26.4", "96.8"]) + damageProfileList.append(["[Projectile Ammo][T2] Barrage", "0", "0", "40", "48"]) + damageProfileList.append(["[Projectile Ammo]Carbonized Lead", "0", "0", "35.2", "8.8"]) + damageProfileList.append(["[Projectile Ammo]Depleted Uranium", "0", "26.4", "17.6", "26.4"]) + damageProfileList.append(["[Projectile Ammo]EMP", "79.2", "0", "8.8", "17.6"]) + damageProfileList.append(["[Projectile Ammo]Fusion", "0", "0", "17.6", "88"]) + damageProfileList.append(["[Projectile Ammo]Nuclear", "0", "0", "8.8", "35.2"]) + damageProfileList.append(["[Projectile Ammo]Phased Plasma", "0", "88", "17.6", "0"]) + damageProfileList.append(["[Projectile Ammo]Proton", "26.4", "0", "17.6", "0"]) + damageProfileList.append(["[Projectile Ammo]Titanium Sabot", "0", "0", "52.8", "176"]) + damageProfileList.append(["[NPC][Burner] Cruor (Blood Raiders)", "90", "90", "0", "0"]) + damageProfileList.append(["[NPC][Burner] Dramiel (Angel)", "55", "0", "20", "96"]) + damageProfileList.append(["[NPC][Burner] Daredevil (Serpentis)", "0", "110", "154", "0"]) + damageProfileList.append(["[NPC][Burner] Succubus (Sanshas Nation)", "135", "30", "0", "0"]) + damageProfileList.append(["[NPC][Burner] Worm (Guristas)", "0", "0", "228", "0"]) + damageProfileList.append(["[NPC][Burner] Enyo", "0", "147", "147", "0"]) + damageProfileList.append(["[NPC][Burner] Hawk", "0", "0", "247", "0"]) + damageProfileList.append(["[NPC][Burner] Jaguar", "36", "0", "50", "182"]) + damageProfileList.append(["[NPC][Burner] Vengeance", "232", "0", "0", "0"]) + damageProfileList.append(["[NPC][Burner] Ashimmu (Blood Raiders)", "260", "100", "0", "0"]) + damageProfileList.append(["[NPC][Burner] Talos", "0", "413", "413", "0"]) + damageProfileList.append(["[NPC][Burner] Sentinel", "0", "75", "0", "90"]) + damageProfileList.append(["[NPC][Asteroid] Angel Cartel", "1838", "562", "2215", "3838"]) + damageProfileList.append(["[NPC][Deadspace] Angel Cartel", "369", "533", "1395", "3302"]) + damageProfileList.append(["[NPC][Deadspace] Blood Raiders", "6040", "5052", "10", "15"]) + damageProfileList.append(["[NPC][Asteroid] Guristas", "0", "1828", "7413", "0"]) + damageProfileList.append(["[NPC][Deadspace] Guristas", "0", "1531", "9680", "0"]) + damageProfileList.append(["[NPC][Asteroid] Rogue Drone", "394", "666", "1090", "1687"]) + damageProfileList.append(["[NPC][Deadspace] Rogue Drone", "276", "1071", "1069", "871"]) + damageProfileList.append(["[NPC][Asteroid] Sanshas Nation", "5586", "4112", "0", "0"]) + damageProfileList.append(["[NPC][Deadspace] Sanshas Nation", "3009", "2237", "0", "0"]) + damageProfileList.append(["[NPC][Asteroid] Serpentis", "0", "5373", "4813", "0"]) + damageProfileList.append(["[NPC][Deadspace] Serpentis", "0", "3110", "1929", "0"]) + damageProfileList.append(["[NPC][Mission] Amarr Empire", "4464", "3546", "97", "0"]) + damageProfileList.append(["[NPC][Mission] Caldari State", "0", "2139", "4867", "0"]) + damageProfileList.append(["[NPC][Mission] CONCORD", "336", "134", "212", "412"]) + damageProfileList.append(["[NPC][Mission] Gallente Federation", "9", "3712", "2758", "0"]) + damageProfileList.append(["[NPC][Mission] Khanid", "612", "483", "43", "6"]) + damageProfileList.append(["[NPC][Mission] Minmatar Republic", "1024", "388", "1655", "4285"]) + damageProfileList.append(["[NPC][Mission] Mordus Legion", "25", "262", "625", "0"]) + damageProfileList.append(["[NPC][Mission] Thukker", "0", "52", "10", "79"]) + damageProfileList.append(["[NPC][Other] Sleepers", "1472", "1472", "1384", "1384"]) + damageProfileList.append(["[NPC][Other] Sansha Incursion", "1682", "1347", "3678", "3678"]) + + for damageProfileRow in damageProfileList: + name, em, therm, kin, exp = damageProfileRow + damageProfile = eos.db.getDamagePattern(name) + if damageProfile is None: + damageProfile = eos.types.DamagePattern(em, therm, kin, exp) + damageProfile.name = name + eos.db.save(damageProfile) + + @classmethod + def importResistProfileDefaults(self): + targetResistProfileList = [] + targetResistProfileList.append(["Uniform (25%)", "0.25", "0.25", "0.25", "0.25"]) + targetResistProfileList.append(["Uniform (50%)", "0.50", "0.50", "0.50", "0.50"]) + targetResistProfileList.append(["Uniform (75%)", "0.75", "0.75", "0.75", "0.75"]) + targetResistProfileList.append(["[T1 Resist]Shield", "0.0", "0.20", "0.40", "0.50"]) + targetResistProfileList.append(["[T1 Resist]Armor", "0.50", "0.45", "0.25", "0.10"]) + targetResistProfileList.append(["[T1 Resist]Hull", "0.33", "0.33", "0.33", "0.33"]) + targetResistProfileList.append(["[T1 Resist]Shield (+T2 DCU)", "0.125", "0.30", "0.475", "0.562"]) + targetResistProfileList.append(["[T1 Resist]Armor (+T2 DCU)", "0.575", "0.532", "0.363", "0.235"]) + targetResistProfileList.append(["[T1 Resist]Hull (+T2 DCU)", "0.598", "0.598", "0.598", "0.598"]) + targetResistProfileList.append(["[NPC][Asteroid] Angel Cartel", "0.54", "0.42", "0.37", "0.32"]) + targetResistProfileList.append(["[NPC][Asteroid] Blood Raiders", "0.34", "0.39", "0.45", "0.52"]) + targetResistProfileList.append(["[NPC][Asteroid] Guristas", "0.55", "0.35", "0.3", "0.48"]) + targetResistProfileList.append(["[NPC][Asteroid] Rogue Drones", "0.35", "0.38", "0.44", "0.49"]) + targetResistProfileList.append(["[NPC][Asteroid] Sanshas Nation", "0.35", "0.4", "0.47", "0.53"]) + targetResistProfileList.append(["[NPC][Asteroid] Serpentis", "0.49", "0.38", "0.29", "0.51"]) + targetResistProfileList.append(["[NPC][Deadspace] Angel Cartel", "0.59", "0.48", "0.4", "0.32"]) + targetResistProfileList.append(["[NPC][Deadspace] Blood Raiders", "0.31", "0.39", "0.47", "0.56"]) + targetResistProfileList.append(["[NPC][Deadspace] Guristas", "0.57", "0.39", "0.31", "0.5"]) + targetResistProfileList.append(["[NPC][Deadspace] Rogue Drones", "0.42", "0.42", "0.47", "0.49"]) + targetResistProfileList.append(["[NPC][Deadspace] Sanshas Nation", "0.31", "0.39", "0.47", "0.56"]) + targetResistProfileList.append(["[NPC][Deadspace] Serpentis", "0.49", "0.38", "0.29", "0.56"]) + targetResistProfileList.append(["[NPC][Mission] Amarr Empire", "0.34", "0.38", "0.42", "0.46"]) + targetResistProfileList.append(["[NPC][Mission] Caldari State", "0.51", "0.38", "0.3", "0.51"]) + targetResistProfileList.append(["[NPC][Mission] CONCORD", "0.47", "0.46", "0.47", "0.47"]) + targetResistProfileList.append(["[NPC][Mission] Gallente Federation", "0.51", "0.38", "0.31", "0.52"]) + targetResistProfileList.append(["[NPC][Mission] Khanid", "0.51", "0.42", "0.36", "0.4"]) + targetResistProfileList.append(["[NPC][Mission] Minmatar Republic", "0.51", "0.46", "0.41", "0.35"]) + targetResistProfileList.append(["[NPC][Mission] Mordus Legion", "0.32", "0.48", "0.4", "0.62"]) + targetResistProfileList.append(["[NPC][Other] Sleeper", "0.61", "0.61", "0.61", "0.61"]) + targetResistProfileList.append(["[NPC][Other] Sansha Incursion", "0.65", "0.63", "0.64", "0.65"]) + targetResistProfileList.append(["[NPC][Burner] Cruor (Blood Raiders)", "0.8", "0.73", "0.69", "0.67"]) + targetResistProfileList.append(["[NPC][Burner] Dramiel (Angel)", "0.35", "0.48", "0.61", "0.68"]) + targetResistProfileList.append(["[NPC][Burner] Daredevil (Serpentis)", "0.69", "0.59", "0.59", "0.43"]) + targetResistProfileList.append(["[NPC][Burner] Succubus (Sanshas Nation)", "0.35", "0.48", "0.61", "0.68"]) + targetResistProfileList.append(["[NPC][Burner] Worm (Guristas)", "0.48", "0.58", "0.69", "0.74"]) + targetResistProfileList.append(["[NPC][Burner] Enyo", "0.58", "0.72", "0.86", "0.24"]) + targetResistProfileList.append(["[NPC][Burner] Hawk", "0.3", "0.86", "0.79", "0.65"]) + targetResistProfileList.append(["[NPC][Burner] Jaguar", "0.78", "0.65", "0.48", "0.56"]) + targetResistProfileList.append(["[NPC][Burner] Vengeance", "0.66", "0.56", "0.75", "0.86"]) + targetResistProfileList.append(["[NPC][Burner] Ashimmu (Blood Raiders)", "0.8", "0.76", "0.68", "0.7"]) + targetResistProfileList.append(["[NPC][Burner] Talos", "0.68", "0.59", "0.59", "0.43"]) + targetResistProfileList.append(["[NPC][Burner] Sentinel", "0.58", "0.45", "0.52", "0.66"]) + + for targetResistProfileRow in targetResistProfileList: + name, em, therm, kin, exp = targetResistProfileRow + resistsProfile = eos.db.eos.db.getTargetResists(name) + if resistsProfile is None: + resistsProfile = eos.types.TargetResists(em, therm, kin, exp) + resistsProfile.name = name + eos.db.save(resistsProfile) + + @classmethod + def importRequiredDefaults(self): + damageProfileList = [] + damageProfileList.append(["Uniform", "25", "25", "25", "25"]) + + for damageProfileRow in damageProfileList: + name, em, therm, kin, exp = damageProfileRow + damageProfile = eos.db.getDamagePattern(name) + if damageProfile is None: + damageProfile = eos.types.DamagePattern(em, therm, kin, exp) + damageProfile.name = name + eos.db.save(damageProfile) diff --git a/eos/db/util.py b/eos/db/util.py index d3efbc0f2..47a950c80 100644 --- a/eos/db/util.py +++ b/eos/db/util.py @@ -18,7 +18,7 @@ #=============================================================================== from sqlalchemy.orm import eagerload -from sqlalchemy.sql import and_ +from sqlalchemy.sql import and_, or_ replace = {"attributes": "_Item__attributes", "modules": "_Fit__modules", diff --git a/eos/effects/adaptivearmorhardener.py b/eos/effects/adaptivearmorhardener.py index f2951320b..c3955ebf0 100644 --- a/eos/effects/adaptivearmorhardener.py +++ b/eos/effects/adaptivearmorhardener.py @@ -6,5 +6,13 @@ type = "active" def handler(fit, module, context): for type in ("kinetic", "thermal", "explosive", "em"): attr = "armor%sDamageResonance" % type.capitalize() + + #Adjust RAH to match the current damage pattern + damagePattern = fit.damagePattern + attrDamagePattern = "%sAmount" % type + damagePatternModifier = getattr(damagePattern,attrDamagePattern)/float(sum((damagePattern.emAmount,damagePattern.thermalAmount,damagePattern.kineticAmount,damagePattern.explosiveAmount))) + modifiedResistModifier = (1-(((1-module.getModifiedItemAttr(attr))*4)*(damagePatternModifier))) + module.forceItemAttr(attr, modifiedResistModifier) + fit.ship.multiplyItemAttr(attr, module.getModifiedItemAttr(attr), stackingPenalties=True, penaltyGroup="preMul") diff --git a/eos/effects/boosterarmorhppenalty.py b/eos/effects/boosterarmorhppenalty.py index 836b419da..247ecae3e 100644 --- a/eos/effects/boosterarmorhppenalty.py +++ b/eos/effects/boosterarmorhppenalty.py @@ -1,7 +1,7 @@ # boosterArmorHpPenalty # # Used by: -# Implants from group: Booster (12 of 42) +# Implants from group: Booster (12 of 45) type = "boosterSideEffect" def handler(fit, booster, context): fit.ship.boostItemAttr("armorHP", booster.getModifiedItemAttr("boosterArmorHPPenalty")) diff --git a/eos/effects/boosterarmorrepairamountpenalty.py b/eos/effects/boosterarmorrepairamountpenalty.py index 06f365339..eaf28ae3e 100644 --- a/eos/effects/boosterarmorrepairamountpenalty.py +++ b/eos/effects/boosterarmorrepairamountpenalty.py @@ -1,7 +1,9 @@ # boosterArmorRepairAmountPenalty # # Used by: -# Implants from group: Booster (9 of 42) +# Implants named like: Drop Booster (3 of 4) +# Implants named like: Mindflood Booster (3 of 4) +# Implants named like: Sooth Sayer Booster (3 of 4) type = "boosterSideEffect" def handler(fit, booster, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Armor Repair Unit", diff --git a/eos/effects/boostermaxvelocitypenalty.py b/eos/effects/boostermaxvelocitypenalty.py index 23f3ca1bc..410f89c53 100644 --- a/eos/effects/boostermaxvelocitypenalty.py +++ b/eos/effects/boostermaxvelocitypenalty.py @@ -1,7 +1,7 @@ # boosterMaxVelocityPenalty # # Used by: -# Implants from group: Booster (12 of 42) +# Implants from group: Booster (12 of 45) type = "boosterSideEffect" def handler(fit, booster, context): fit.ship.boostItemAttr("maxVelocity", booster.getModifiedItemAttr("boosterMaxVelocityPenalty")) diff --git a/eos/effects/boostershieldcapacitypenalty.py b/eos/effects/boostershieldcapacitypenalty.py index 7ba52d68d..690ec5b82 100644 --- a/eos/effects/boostershieldcapacitypenalty.py +++ b/eos/effects/boostershieldcapacitypenalty.py @@ -1,7 +1,7 @@ # boosterShieldCapacityPenalty # # Used by: -# Implants from group: Booster (12 of 42) +# Implants from group: Booster (12 of 45) type = "boosterSideEffect" def handler(fit, booster, context): fit.ship.boostItemAttr("shieldCapacity", booster.getModifiedItemAttr("boosterShieldCapacityPenalty")) diff --git a/eos/effects/boosterturretoptimalrangepenalty.py b/eos/effects/boosterturretoptimalrangepenalty.py index 8bdebc804..cc9fd9224 100644 --- a/eos/effects/boosterturretoptimalrangepenalty.py +++ b/eos/effects/boosterturretoptimalrangepenalty.py @@ -1,7 +1,9 @@ # boosterTurretOptimalRangePenalty # # Used by: -# Implants from group: Booster (9 of 42) +# Implants named like: Blue Pill Booster (3 of 5) +# Implants named like: Mindflood Booster (3 of 4) +# Implants named like: Sooth Sayer Booster (3 of 4) type = "boosterSideEffect" def handler(fit, booster, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), diff --git a/eos/effects/capitallauncherskillcruisecitadelemdamage1.py b/eos/effects/capitallauncherskillcruisecitadelemdamage1.py index a6fbc2b97..de758b0f0 100644 --- a/eos/effects/capitallauncherskillcruisecitadelemdamage1.py +++ b/eos/effects/capitallauncherskillcruisecitadelemdamage1.py @@ -1,4 +1,4 @@ -# capitalLauncherSkillCruiseCitadelEmDamage1 +# capitalLauncherSkillCruiseCitadelEmDamage1 # # Used by: # Skill: XL Cruise Missiles diff --git a/eos/effects/decreasetargetspeed.py b/eos/effects/decreasetargetspeed.py index d19823d8d..7a6fbf9b0 100644 --- a/eos/effects/decreasetargetspeed.py +++ b/eos/effects/decreasetargetspeed.py @@ -1,7 +1,4 @@ -# decreaseTargetSpeed -# -# Used by: -# Drones from group: Stasis Webifying Drone (3 of 3) +# Not used by any item type = "active", "projected" def handler(fit, module, context): if "projected" not in context: diff --git a/eos/effects/dohacking.py b/eos/effects/dohacking.py index f3b8155e3..59b61ce7f 100644 --- a/eos/effects/dohacking.py +++ b/eos/effects/dohacking.py @@ -1,7 +1,7 @@ # doHacking # # Used by: -# Modules from group: Data Miners (13 of 14) +# Modules from group: Data Miners (15 of 16) # Module: QA Cross Protocol Analyzer type = "active" def handler(fit, module, context): diff --git a/eos/effects/dronedamagebonusrequringdrones.py b/eos/effects/dronedamagebonusrequringdrones.py index 80bcff017..0baf75d99 100644 --- a/eos/effects/dronedamagebonusrequringdrones.py +++ b/eos/effects/dronedamagebonusrequringdrones.py @@ -1,7 +1,4 @@ -# droneDamageBonusRequringDrones -# -# Used by: -# Skill: Drone Interfacing +# Not used by any item type = "passive" def handler(fit, skill, context): fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"), diff --git a/eos/effects/elitebonuscommanddestroyermwdsigradius3.py b/eos/effects/elitebonuscommanddestroyermwdsigradius3.py index 34abe1494..330679036 100644 --- a/eos/effects/elitebonuscommanddestroyermwdsigradius3.py +++ b/eos/effects/elitebonuscommanddestroyermwdsigradius3.py @@ -1,7 +1,4 @@ -# eliteBonusCommandDestroyerMWDSigRadius3 -# -# Used by: -# Ships from group: Command Destroyers (4 of 4) +# Not used by any item type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"), "signatureRadiusBonus", src.getModifiedItemAttr("eliteBonusCommandDestroyer3"), skill="Command Destroyers") diff --git a/eos/effects/elitebonuslogisticremotearmorrepaircapneed1.py b/eos/effects/elitebonuslogisticremotearmorrepaircapneed1.py index 7f4e10117..f92fc8c87 100644 --- a/eos/effects/elitebonuslogisticremotearmorrepaircapneed1.py +++ b/eos/effects/elitebonuslogisticremotearmorrepaircapneed1.py @@ -3,6 +3,5 @@ # Used by: # Ship: Oneiros type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers") diff --git a/eos/effects/elitebonuslogisticremotearmorrepaircapneed2.py b/eos/effects/elitebonuslogisticremotearmorrepaircapneed2.py index 7e39fddbb..283490e87 100644 --- a/eos/effects/elitebonuslogisticremotearmorrepaircapneed2.py +++ b/eos/effects/elitebonuslogisticremotearmorrepaircapneed2.py @@ -3,6 +3,5 @@ # Used by: # Ship: Guardian type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers") diff --git a/eos/effects/elitebonuslogisticshieldtransfercapneed1.py b/eos/effects/elitebonuslogisticshieldtransfercapneed1.py index d0024995a..d8bdb5441 100644 --- a/eos/effects/elitebonuslogisticshieldtransfercapneed1.py +++ b/eos/effects/elitebonuslogisticshieldtransfercapneed1.py @@ -4,6 +4,5 @@ # Ship: Basilisk # Ship: Etana type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster", - "capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics1"), skill="Logistics Cruisers") diff --git a/eos/effects/elitebonuslogisticshieldtransfercapneed2.py b/eos/effects/elitebonuslogisticshieldtransfercapneed2.py index 7e731892d..4acb6ef52 100644 --- a/eos/effects/elitebonuslogisticshieldtransfercapneed2.py +++ b/eos/effects/elitebonuslogisticshieldtransfercapneed2.py @@ -3,6 +3,5 @@ # Used by: # Ship: Scimitar type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster", - "capacitorNeed", ship.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "capacitorNeed", src.getModifiedItemAttr("eliteBonusLogistics2"), skill="Logistics Cruisers") diff --git a/eos/effects/elitereconbonusenergyneutamount2.py b/eos/effects/elitereconbonusenergyneutamount2.py index 6570460dd..ddbf0af85 100644 --- a/eos/effects/elitereconbonusenergyneutamount2.py +++ b/eos/effects/elitereconbonusenergyneutamount2.py @@ -6,4 +6,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships") + "energyNeutralizerAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships") diff --git a/eos/effects/emshieldcompensationhardeningbonusgroupshieldamp.py b/eos/effects/emshieldcompensationhardeningbonusgroupshieldamp.py index b71bbe25d..61f79b11c 100644 --- a/eos/effects/emshieldcompensationhardeningbonusgroupshieldamp.py +++ b/eos/effects/emshieldcompensationhardeningbonusgroupshieldamp.py @@ -4,5 +4,5 @@ # Skill: EM Shield Compensation type = "passive" def handler(fit, skill, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier", + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier", "emDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level) \ No newline at end of file diff --git a/eos/effects/energydestabilizationnew.py b/eos/effects/energydestabilizationnew.py index fefadab40..d2c3b8e03 100644 --- a/eos/effects/energydestabilizationnew.py +++ b/eos/effects/energydestabilizationnew.py @@ -1,13 +1,10 @@ -# energyDestabilizationNew -# -# Used by: -# Drones from group: Energy Neutralizer Drone (3 of 3) +# Not used by any item from eos.types import State type = "active", "projected" def handler(fit, container, context): if "projected" in context and ((hasattr(container, "state") \ and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): multiplier = container.amountActive if hasattr(container, "amountActive") else 1 - amount = container.getModifiedItemAttr("energyDestabilizationAmount") + amount = container.getModifiedItemAttr("energyNeutralizerAmount") time = container.getModifiedItemAttr("duration") fit.addDrain(time, amount * multiplier, 0) diff --git a/eos/effects/energyneutralizerentity.py b/eos/effects/energyneutralizerentity.py new file mode 100644 index 000000000..993df4a39 --- /dev/null +++ b/eos/effects/energyneutralizerentity.py @@ -0,0 +1,12 @@ +# energyNeutralizerEntity +# +# Used by: +# Drones from group: Energy Neutralizer Drone (3 of 3) +from eos.types import State +type = "active", "projected" +def handler(fit, container, context): + if "projected" in context and ((hasattr(container, "state") \ + and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): + amount = container.getModifiedItemAttr("energyNeutralizerAmount") + time = container.getModifiedItemAttr("duration") + fit.addDrain(time, amount, 0) diff --git a/eos/effects/energyneutralizerfalloff.py b/eos/effects/energyneutralizerfalloff.py index 402f20333..b0702ad29 100644 --- a/eos/effects/energyneutralizerfalloff.py +++ b/eos/effects/energyneutralizerfalloff.py @@ -1,14 +1,12 @@ # energyNeutralizerFalloff # # Used by: -# Drones from group: Energy Neutralizer Drone (3 of 3) # Modules from group: Energy Neutralizer (51 of 51) from eos.types import State type = "active", "projected" def handler(fit, container, context): if "projected" in context and ((hasattr(container, "state") \ and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): - multiplier = container.amountActive if hasattr(container, "amountActive") else 1 - amount = container.getModifiedItemAttr("energyDestabilizationAmount") + amount = container.getModifiedItemAttr("energyNeutralizerAmount") time = container.getModifiedItemAttr("duration") - fit.addDrain(time, amount * multiplier, 0) + fit.addDrain(time, amount, 0) diff --git a/eos/effects/energytransfer.py b/eos/effects/energytransfer.py index 3c82a340c..8390cf52c 100644 --- a/eos/effects/energytransfer.py +++ b/eos/effects/energytransfer.py @@ -1,7 +1,4 @@ -# energyTransfer -# -# Used by: -# Modules from group: Remote Capacitor Transmitter (38 of 38) +# Not used by any item type = "projected", "active" def handler(fit, module, context): if "projected" in context: diff --git a/eos/effects/entityecmfalloff.py b/eos/effects/entityecmfalloff.py new file mode 100644 index 000000000..a5cdf9ad8 --- /dev/null +++ b/eos/effects/entityecmfalloff.py @@ -0,0 +1,11 @@ +# entityECMFalloff +# +# Used by: +# Drones named like: EC (3 of 3) +type = "projected", "active" +def handler(fit, module, context): + if "projected" in context: + # jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str)) + strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType))/fit.scanStrength + + fit.ecmProjectedStr *= strModifier diff --git a/eos/effects/entityenergyneutralizerfalloff.py b/eos/effects/entityenergyneutralizerfalloff.py new file mode 100644 index 000000000..138f2e667 --- /dev/null +++ b/eos/effects/entityenergyneutralizerfalloff.py @@ -0,0 +1,12 @@ +# entityEnergyNeutralizerFalloff +# +# Used by: +# Drones from group: Energy Neutralizer Drone (3 of 3) +from eos.types import State +type = "active", "projected" +def handler(fit, container, context): + if "projected" in context and ((hasattr(container, "state") \ + and container.state >= State.ACTIVE) or hasattr(container, "amountActive")): + amount = container.getModifiedItemAttr("energyNeutralizerAmount") + time = container.getModifiedItemAttr("energyNeutralizerDuration") + fit.addDrain(time, amount, 0) diff --git a/eos/effects/entosisdurationmultiply.py b/eos/effects/entosisdurationmultiply.py index b89423f8d..a4262caa5 100644 --- a/eos/effects/entosisdurationmultiply.py +++ b/eos/effects/entosisdurationmultiply.py @@ -1,8 +1,12 @@ # entosisDurationMultiply # # Used by: -# Ships from group: Supercarrier (5 of 5) -# Items from market group: Ships > Capital Ships (22 of 32) +# Ships from group: Carrier (4 of 4) +# Ships from group: Dreadnought (5 of 5) +# Ships from group: Force Auxiliary (4 of 4) +# Ships from group: Supercarrier (6 of 6) +# Ships from group: Titan (5 of 5) +# Ship: Rorqual type = "passive" def handler(fit, ship, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Infomorph Psychology"), diff --git a/eos/effects/ewtargetpaint.py b/eos/effects/ewtargetpaint.py index 1f13ea821..4be80da74 100644 --- a/eos/effects/ewtargetpaint.py +++ b/eos/effects/ewtargetpaint.py @@ -1,7 +1,4 @@ -# ewTargetPaint -# -# Used by: -# Drones named like: TP (3 of 3) +# Not used by any item type = "projected", "active" def handler(fit, container, context): if "projected" in context: diff --git a/eos/effects/explosiveshieldcompensationhardeningbonusgroupshieldamp.py b/eos/effects/explosiveshieldcompensationhardeningbonusgroupshieldamp.py index abe48656f..3703083d1 100644 --- a/eos/effects/explosiveshieldcompensationhardeningbonusgroupshieldamp.py +++ b/eos/effects/explosiveshieldcompensationhardeningbonusgroupshieldamp.py @@ -4,5 +4,5 @@ # Skill: Explosive Shield Compensation type = "passive" def handler(fit, skill, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier", + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier", "explosiveDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level) \ No newline at end of file diff --git a/eos/effects/fighterabilityattackm.py b/eos/effects/fighterabilityattackm.py index dd41d77dc..d2d14119c 100644 --- a/eos/effects/fighterabilityattackm.py +++ b/eos/effects/fighterabilityattackm.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. diff --git a/eos/effects/fighterabilityecm.py b/eos/effects/fighterabilityecm.py index e211e7424..c18825aad 100644 --- a/eos/effects/fighterabilityecm.py +++ b/eos/effects/fighterabilityecm.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. diff --git a/eos/effects/fighterabilityenergyneutralizer.py b/eos/effects/fighterabilityenergyneutralizer.py index ca0460e15..0315e4301 100644 --- a/eos/effects/fighterabilityenergyneutralizer.py +++ b/eos/effects/fighterabilityenergyneutralizer.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. diff --git a/eos/effects/fighterabilitylaunchbomb.py b/eos/effects/fighterabilitylaunchbomb.py index 55e5eca15..bc76f2a19 100644 --- a/eos/effects/fighterabilitylaunchbomb.py +++ b/eos/effects/fighterabilitylaunchbomb.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. @@ -10,5 +11,8 @@ prefix = "fighterAbilityLaunchBomb" type = "active" +# This flag is required for effects that use charges in order to properly calculate reload time +hasCharges = True + def handler(fit, src, context): pass \ No newline at end of file diff --git a/eos/effects/fighterabilitymicrowarpdrive.py b/eos/effects/fighterabilitymicrowarpdrive.py index 7d5bc13e6..9e2303ec4 100644 --- a/eos/effects/fighterabilitymicrowarpdrive.py +++ b/eos/effects/fighterabilitymicrowarpdrive.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. diff --git a/eos/effects/fighterabilitymissiles.py b/eos/effects/fighterabilitymissiles.py index 16e7ee8b2..c002ea5ac 100644 --- a/eos/effects/fighterabilitymissiles.py +++ b/eos/effects/fighterabilitymissiles.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. @@ -10,5 +11,8 @@ prefix = "fighterAbilityMissiles" type = "active" +# This flag is required for effects that use charges in order to properly calculate reload time +hasCharges = True + def handler(fit, src, context): pass \ No newline at end of file diff --git a/eos/effects/fighterabilitystasiswebifier.py b/eos/effects/fighterabilitystasiswebifier.py index 2a3aa0393..f067859bc 100644 --- a/eos/effects/fighterabilitystasiswebifier.py +++ b/eos/effects/fighterabilitystasiswebifier.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. diff --git a/eos/effects/fighterabilitywarpdisruption.py b/eos/effects/fighterabilitywarpdisruption.py index 8e74b35d7..b0e0c281d 100644 --- a/eos/effects/fighterabilitywarpdisruption.py +++ b/eos/effects/fighterabilitywarpdisruption.py @@ -1,3 +1,4 @@ +# Not used by any item """ Since fighter abilities do not have any sort of item entity in the EVE database, we must derive the abilities from the effects, and thus this effect file contains some custom information useful only to fighters. diff --git a/eos/effects/fueledarmorrepair.py b/eos/effects/fueledarmorrepair.py index 0077e287d..91f1ffc65 100644 --- a/eos/effects/fueledarmorrepair.py +++ b/eos/effects/fueledarmorrepair.py @@ -6,8 +6,10 @@ runTime = "late" type = "active" def handler(fit, module, context): if module.charge and module.charge.name == "Nanite Repair Paste": - module.multiplyItemAttr("armorDamageAmount", 3) + multiplier = 3 + else: + multiplier = 1 - amount = module.getModifiedItemAttr("armorDamageAmount") + amount = module.getModifiedItemAttr("armorDamageAmount") * multiplier speed = module.getModifiedItemAttr("duration") / 1000.0 fit.extraAttributes.increase("armorRepair", amount / speed) diff --git a/eos/effects/kineticshieldcompensationhardeningbonusgroupshieldamp.py b/eos/effects/kineticshieldcompensationhardeningbonusgroupshieldamp.py index 6e54d9488..d230979b7 100644 --- a/eos/effects/kineticshieldcompensationhardeningbonusgroupshieldamp.py +++ b/eos/effects/kineticshieldcompensationhardeningbonusgroupshieldamp.py @@ -4,6 +4,6 @@ # Skill: Kinetic Shield Compensation type = "passive" def handler(fit, skill, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier", + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier", "kineticDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level) \ No newline at end of file diff --git a/eos/effects/maraudermodeeffect26.py b/eos/effects/maraudermodeeffect26.py index 61d228dd2..74b730de6 100644 --- a/eos/effects/maraudermodeeffect26.py +++ b/eos/effects/maraudermodeeffect26.py @@ -1,7 +1,4 @@ -# marauderModeEffect26 -# -# Used by: -# Module: Bastion Module I +# Not used by any item type = "active" runTime = "early" def handler(fit, module, context): diff --git a/eos/effects/modifyshieldresonancepostpercent.py b/eos/effects/modifyshieldresonancepostpercent.py index 5bb295d7f..3b2dcacb2 100644 --- a/eos/effects/modifyshieldresonancepostpercent.py +++ b/eos/effects/modifyshieldresonancepostpercent.py @@ -1,7 +1,7 @@ # modifyShieldResonancePostPercent # # Used by: -# Modules from group: Shield Amplifier (88 of 88) +# Modules from group: Shield Resistance Amplifier (88 of 88) type = "passive" def handler(fit, module, context): for type in ("kinetic", "thermal", "explosive", "em"): diff --git a/eos/effects/modulebonusancillaryremotearmorrepairer.py b/eos/effects/modulebonusancillaryremotearmorrepairer.py index beed285c0..ba176a64f 100644 --- a/eos/effects/modulebonusancillaryremotearmorrepairer.py +++ b/eos/effects/modulebonusancillaryremotearmorrepairer.py @@ -1,11 +1,17 @@ +# moduleBonusAncillaryRemoteArmorRepairer +# +# Used by: +# Modules from group: Ancillary Remote Armor Repairer (4 of 4) runTime = "late" type = "projected", "active" def handler(fit, module, context): if "projected" not in context: return - + if module.charge and module.charge.name == "Nanite Repair Paste": - module.multiplyItemAttr("armorDamageAmount", 3) - - amount = module.getModifiedItemAttr("armorDamageAmount") + multiplier = 3 + else: + multiplier = 1 + + amount = module.getModifiedItemAttr("armorDamageAmount") * multiplier speed = module.getModifiedItemAttr("duration") / 1000.0 fit.extraAttributes.increase("armorRepair", amount / speed) \ No newline at end of file diff --git a/eos/effects/modulebonusancillaryremoteshieldbooster.py b/eos/effects/modulebonusancillaryremoteshieldbooster.py new file mode 100644 index 000000000..2aab65f2a --- /dev/null +++ b/eos/effects/modulebonusancillaryremoteshieldbooster.py @@ -0,0 +1,11 @@ +# moduleBonusAncillaryRemoteShieldBooster +# +# Used by: +# Modules from group: Ancillary Remote Shield Booster (4 of 4) +runTime = "late" +type = "projected", "active" +def handler(fit, module, context): + if "projected" not in context: return + amount = module.getModifiedItemAttr("shieldBonus") + speed = module.getModifiedItemAttr("duration") / 1000.0 + fit.extraAttributes.increase("shieldRepair", amount / speed) \ No newline at end of file diff --git a/eos/effects/modulebonusnetworkedsensorarray.py b/eos/effects/modulebonusnetworkedsensorarray.py index 880e041bb..53502bed7 100644 --- a/eos/effects/modulebonusnetworkedsensorarray.py +++ b/eos/effects/modulebonusnetworkedsensorarray.py @@ -4,9 +4,8 @@ # Module: Networked Sensor Array type = "active" def handler(fit, src, context): - fit.ship.increaseItemAttr("maxLockedTargets", src.getModifiedItemAttr("maxLockedTargetsBonus")) fit.ship.multiplyItemAttr("maxTargetRange", src.getModifiedItemAttr("maxTargetRangeMultiplier"), stackingPenalties=True, penaltyGroup="postMul") - fit.ship.multiplyItemAttr("scanResolution", src.getModifiedItemAttr("scanResolutionMultiplier"), stackingPenalties=True) + fit.ship.boostItemAttr("scanResolution", src.getModifiedItemAttr("scanResolutionBonus"), stackingPenalties=True) for scanType in ('Magnetometric', 'Ladar', 'Gravimetric', 'Radar'): fit.ship.boostItemAttr("scan{}Strength".format(scanType), diff --git a/eos/effects/modulebonussiegemodule.py b/eos/effects/modulebonussiegemodule.py index b51553ff7..bb5258be6 100644 --- a/eos/effects/modulebonussiegemodule.py +++ b/eos/effects/modulebonussiegemodule.py @@ -44,14 +44,9 @@ def handler(fit, src, context): fit.ship.forceItemAttr("disallowAssistance", src.getModifiedItemAttr("disallowAssistance")) # new in April 2016 release - for scanType in ('Magnetometric', 'Ladar', 'Gravimetric', 'Radar'): - fit.ship.boostItemAttr("scan{}Strength".format(scanType), - src.getModifiedItemAttr("scan{}StrengthPercent".format(scanType)), - stackingPenalties=True) - # missile ROF bonus for group in ("Missile Launcher XL Torpedo", "Missile Launcher Rapid Torpedo", "Missile Launcher XL Cruise"): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == group, "speed", src.getModifiedItemAttr("siegeLauncherROFBonus"), stackingPenalties=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == group, "speed", src.getModifiedItemAttr("siegeLauncherROFBonus")) fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Torpedoes"), "maxVelocity", src.getModifiedItemAttr("siegeTorpedoVelocityBonus"), stackingPenalties=True) diff --git a/eos/effects/modulebonustriagemodule.py b/eos/effects/modulebonustriagemodule.py index 791acecc3..30384fdb2 100644 --- a/eos/effects/modulebonustriagemodule.py +++ b/eos/effects/modulebonustriagemodule.py @@ -56,12 +56,6 @@ def handler(fit, src, context): fit.ship.forceItemAttr("disallowAssistance", src.getModifiedItemAttr("disallowAssistance")) # new in April 2016 release - - for scanType in ('Magnetometric', 'Ladar', 'Gravimetric', 'Radar'): - fit.ship.boostItemAttr("scan{}Strength".format(scanType), - src.getModifiedItemAttr("scan{}StrengthPercent".format(scanType)), - stackingPenalties=True) - fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "damageMultiplier", src.getModifiedItemAttr("droneDamageBonus"), stackingPenalties=True) fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("siegeModeWarpStatus")) diff --git a/eos/effects/overloadselfdamagebonus.py b/eos/effects/overloadselfdamagebonus.py index 305e9d3d5..0ff334285 100644 --- a/eos/effects/overloadselfdamagebonus.py +++ b/eos/effects/overloadselfdamagebonus.py @@ -1,9 +1,9 @@ # overloadSelfDamageBonus # # Used by: -# Modules from group: Energy Weapon (102 of 209) -# Modules from group: Hybrid Weapon (106 of 221) -# Modules from group: Projectile Weapon (100 of 165) +# Modules from group: Energy Weapon (101 of 209) +# Modules from group: Hybrid Weapon (105 of 221) +# Modules from group: Projectile Weapon (99 of 165) type = "overheat" def handler(fit, module, context): module.boostItemAttr("damageMultiplier", module.getModifiedItemAttr("overloadDamageModifier")) \ No newline at end of file diff --git a/eos/effects/remotearmorpowerneedbonuseffect.py b/eos/effects/remotearmorpowerneedbonuseffect.py index 48137cc6c..9940ffe88 100644 --- a/eos/effects/remotearmorpowerneedbonuseffect.py +++ b/eos/effects/remotearmorpowerneedbonuseffect.py @@ -4,6 +4,5 @@ # Ship: Guardian # Ship: Oneiros type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "power", ship.getModifiedItemAttr("remoteArmorPowerNeedBonus")) +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "power", src.getModifiedItemAttr("remoteArmorPowerNeedBonus")) diff --git a/eos/effects/remotearmorrepairentity.py b/eos/effects/remotearmorrepairentity.py new file mode 100644 index 000000000..4b4b049fc --- /dev/null +++ b/eos/effects/remotearmorrepairentity.py @@ -0,0 +1,10 @@ +# remoteArmorRepairEntity +# +# Used by: +# Drones named like: Armor Maintenance Bot (6 of 6) +type = "projected", "active" +def handler(fit, container, context): + if "projected" in context: + bonus = container.getModifiedItemAttr("armorDamageAmount") + duration = container.getModifiedItemAttr("duration") / 1000.0 + fit.extraAttributes.increase("armorRepair", bonus / duration) diff --git a/eos/effects/remotearmorrepairfalloff.py b/eos/effects/remotearmorrepairfalloff.py index 01ebfd10f..6a1849234 100644 --- a/eos/effects/remotearmorrepairfalloff.py +++ b/eos/effects/remotearmorrepairfalloff.py @@ -2,7 +2,6 @@ # # Used by: # Modules from group: Remote Armor Repairer (39 of 39) -# Drones named like: Armor Maintenance Bot (6 of 6) type = "projected", "active" def handler(fit, container, context): if "projected" in context: diff --git a/eos/effects/remoteecmburst.py b/eos/effects/remoteecmburst.py index cd54b4cbc..45ca33f3f 100644 --- a/eos/effects/remoteecmburst.py +++ b/eos/effects/remoteecmburst.py @@ -1,7 +1,4 @@ -# remoteEcmBurst -# -# Used by: -# Module: ECM Jammer Burst Projector +# Not used by any item type = 'active' def handler(fit, module, context): pass diff --git a/eos/effects/remoteguidancedisruptfalloff.py b/eos/effects/remoteguidancedisruptfalloff.py index 20abfa9d6..48fadecaa 100644 --- a/eos/effects/remoteguidancedisruptfalloff.py +++ b/eos/effects/remoteguidancedisruptfalloff.py @@ -14,4 +14,4 @@ def handler(fit, src, context): ): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), tgtAttr, src.getModifiedItemAttr(srcAttr), - stackingPenalties=True) + stackingPenalties=True, remoteResists=True) diff --git a/eos/effects/remotehullrepair.py b/eos/effects/remotehullrepair.py index 1bf1fd50a..84ee64290 100644 --- a/eos/effects/remotehullrepair.py +++ b/eos/effects/remotehullrepair.py @@ -1,7 +1,4 @@ -# remoteHullRepair -# -# Used by: -# Drones named like: Hull Maintenance Bot (6 of 6) +# Not used by any item type = "projected", "active" runTime = "late" def handler(fit, module, context): diff --git a/eos/effects/remotehullrepairentity.py b/eos/effects/remotehullrepairentity.py new file mode 100644 index 000000000..4f41aec22 --- /dev/null +++ b/eos/effects/remotehullrepairentity.py @@ -0,0 +1,11 @@ +# remoteHullRepairEntity +# +# Used by: +# Drones named like: Hull Maintenance Bot (6 of 6) +type = "projected", "active" +runTime = "late" +def handler(fit, module, context): + if "projected" not in context: return + bonus = module.getModifiedItemAttr("structureDamageAmount") + duration = module.getModifiedItemAttr("duration") / 1000.0 + fit.extraAttributes.increase("hullRepair", bonus / duration) diff --git a/eos/effects/remotehullrepairfalloff.py b/eos/effects/remotehullrepairfalloff.py index 41ccddae1..94dc050c7 100644 --- a/eos/effects/remotehullrepairfalloff.py +++ b/eos/effects/remotehullrepairfalloff.py @@ -2,7 +2,6 @@ # # Used by: # Modules from group: Remote Hull Repairer (8 of 8) -# Drones named like: Hull Maintenance Bot (6 of 6) type = "projected", "active" runTime = "late" def handler(fit, module, context): diff --git a/eos/effects/remotesensordampentity.py b/eos/effects/remotesensordampentity.py new file mode 100644 index 000000000..2176a5a51 --- /dev/null +++ b/eos/effects/remotesensordampentity.py @@ -0,0 +1,14 @@ +# remoteSensorDampEntity +# +# Used by: +# Drones named like: SD (3 of 3) +type= "projected", "active" +def handler(fit, module, context): + if "projected" not in context: + return + + fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("maxTargetRangeBonus"), + stackingPenalties = True, remoteResists=True) + + fit.ship.boostItemAttr("scanResolution", module.getModifiedItemAttr("scanResolutionBonus"), + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remotesensordampfalloff.py b/eos/effects/remotesensordampfalloff.py index aa944bb19..0339ee196 100644 --- a/eos/effects/remotesensordampfalloff.py +++ b/eos/effects/remotesensordampfalloff.py @@ -2,12 +2,13 @@ # # Used by: # Modules from group: Sensor Dampener (6 of 6) -# Drones named like: SD (3 of 3) type= "projected", "active" def handler(fit, module, context): if "projected" not in context: return + fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("maxTargetRangeBonus"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) + fit.ship.boostItemAttr("scanResolution", module.getModifiedItemAttr("scanResolutionBonus"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remoteshieldtransferentity.py b/eos/effects/remoteshieldtransferentity.py new file mode 100644 index 000000000..7a1fb0e20 --- /dev/null +++ b/eos/effects/remoteshieldtransferentity.py @@ -0,0 +1,10 @@ +# remoteShieldTransferEntity +# +# Used by: +# Drones named like: Shield Maintenance Bot (6 of 6) +type = "projected", "active" +def handler(fit, container, context): + if "projected" in context: + bonus = container.getModifiedItemAttr("shieldBonus") + duration = container.getModifiedItemAttr("duration") / 1000.0 + fit.extraAttributes.increase("shieldRepair", bonus / duration) diff --git a/eos/effects/remoteshieldtransferfalloff.py b/eos/effects/remoteshieldtransferfalloff.py index 883341859..1506da541 100644 --- a/eos/effects/remoteshieldtransferfalloff.py +++ b/eos/effects/remoteshieldtransferfalloff.py @@ -2,7 +2,6 @@ # # Used by: # Modules from group: Remote Shield Booster (38 of 38) -# Drones named like: Shield Maintenance Bot (6 of 6) type = "projected", "active" def handler(fit, container, context): if "projected" in context: diff --git a/eos/effects/remotetargetpaintentity.py b/eos/effects/remotetargetpaintentity.py new file mode 100644 index 000000000..4c001bd41 --- /dev/null +++ b/eos/effects/remotetargetpaintentity.py @@ -0,0 +1,9 @@ +# remoteTargetPaintEntity +# +# Used by: +# Drones named like: TP (3 of 3) +type = "projected", "active" +def handler(fit, container, context): + if "projected" in context: + fit.ship.boostItemAttr("signatureRadius", container.getModifiedItemAttr("signatureRadiusBonus"), + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remotetargetpaintfalloff.py b/eos/effects/remotetargetpaintfalloff.py index feb722b42..2d1fcb539 100644 --- a/eos/effects/remotetargetpaintfalloff.py +++ b/eos/effects/remotetargetpaintfalloff.py @@ -2,9 +2,8 @@ # # Used by: # Modules from group: Target Painter (8 of 8) -# Drones named like: TP (3 of 3) type = "projected", "active" def handler(fit, container, context): if "projected" in context: fit.ship.boostItemAttr("signatureRadius", container.getModifiedItemAttr("signatureRadiusBonus"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remotetrackingdisruptfalloff.py b/eos/effects/remotetrackingdisruptfalloff.py index 05e193603..9ea0a7f4e 100644 --- a/eos/effects/remotetrackingdisruptfalloff.py +++ b/eos/effects/remotetrackingdisruptfalloff.py @@ -1,17 +1,16 @@ # remoteTrackingDisruptFalloff # # Used by: -# Drones named like: TD (3 of 3) # Variations of module: Tracking Disruptor I (6 of 6) type= "projected", "active" def handler(fit, module, context): if "projected" in context: fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), "trackingSpeed", module.getModifiedItemAttr("trackingSpeedBonus"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), "maxRange", module.getModifiedItemAttr("maxRangeBonus"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), "falloff", module.getModifiedItemAttr("falloffBonus"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remoteweapondisruptentity.py b/eos/effects/remoteweapondisruptentity.py new file mode 100644 index 000000000..3b997e147 --- /dev/null +++ b/eos/effects/remoteweapondisruptentity.py @@ -0,0 +1,16 @@ +# remoteWeaponDisruptEntity +# +# Used by: +# Drones named like: TD (3 of 3) +type= "projected", "active" +def handler(fit, module, context): + if "projected" in context: + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), + "trackingSpeed", module.getModifiedItemAttr("trackingSpeedBonus"), + stackingPenalties = True, remoteResists=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), + "maxRange", module.getModifiedItemAttr("maxRangeBonus"), + stackingPenalties = True, remoteResists=True) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), + "falloff", module.getModifiedItemAttr("falloffBonus"), + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remotewebifierentity.py b/eos/effects/remotewebifierentity.py new file mode 100644 index 000000000..36186be00 --- /dev/null +++ b/eos/effects/remotewebifierentity.py @@ -0,0 +1,9 @@ +# remoteWebifierEntity +# +# Used by: +# Drones from group: Stasis Webifying Drone (3 of 3) +type = "active", "projected" +def handler(fit, module, context): + if "projected" not in context: return + fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("speedFactor"), + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/remotewebifierfalloff.py b/eos/effects/remotewebifierfalloff.py index 76d932c70..1f37c29c5 100644 --- a/eos/effects/remotewebifierfalloff.py +++ b/eos/effects/remotewebifierfalloff.py @@ -1,11 +1,10 @@ # remoteWebifierFalloff # # Used by: -# Drones from group: Stasis Webifying Drone (3 of 3) # Modules from group: Stasis Grappler (7 of 7) # Modules from group: Stasis Web (18 of 18) type = "active", "projected" def handler(fit, module, context): if "projected" not in context: return fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("speedFactor"), - stackingPenalties = True) + stackingPenalties = True, remoteResists=True) diff --git a/eos/effects/rigdrawbackbonuseffect.py b/eos/effects/rigdrawbackbonuseffect.py index c40f41e8a..01d0a8018 100644 --- a/eos/effects/rigdrawbackbonuseffect.py +++ b/eos/effects/rigdrawbackbonuseffect.py @@ -1,7 +1,4 @@ -# rigDrawbackBonusEffect -# -# Used by: -# Skills from group: Rigging (9 of 10) +# Not used by any item type = "passive" def handler(fit, skill, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill(skill), diff --git a/eos/effects/rigdrawbackreductionarmor.py b/eos/effects/rigdrawbackreductionarmor.py new file mode 100644 index 000000000..40276d661 --- /dev/null +++ b/eos/effects/rigdrawbackreductionarmor.py @@ -0,0 +1,9 @@ +# rigDrawbackReductionArmor +# +# Used by: +# Skill: Armor Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Armor", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Resource Processing", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionastronautics.py b/eos/effects/rigdrawbackreductionastronautics.py new file mode 100644 index 000000000..300b49e26 --- /dev/null +++ b/eos/effects/rigdrawbackreductionastronautics.py @@ -0,0 +1,9 @@ +# rigDrawbackReductionAstronautics +# +# Used by: +# Skill: Astronautics Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Navigation", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Anchor", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductiondrones.py b/eos/effects/rigdrawbackreductiondrones.py new file mode 100644 index 000000000..d1350efcc --- /dev/null +++ b/eos/effects/rigdrawbackreductiondrones.py @@ -0,0 +1,8 @@ +# rigDrawbackReductionDrones +# +# Used by: +# Skill: Drones Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Drones", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionelectronic.py b/eos/effects/rigdrawbackreductionelectronic.py new file mode 100644 index 000000000..d1d7a3cd5 --- /dev/null +++ b/eos/effects/rigdrawbackreductionelectronic.py @@ -0,0 +1,10 @@ +# rigDrawbackReductionElectronic +# +# Used by: +# Skill: Electronic Superiority Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Electronic Systems", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Scanning", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Targeting", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionenergyweapon.py b/eos/effects/rigdrawbackreductionenergyweapon.py new file mode 100644 index 000000000..d92ca3132 --- /dev/null +++ b/eos/effects/rigdrawbackreductionenergyweapon.py @@ -0,0 +1,8 @@ +# rigDrawbackReductionEnergyWeapon +# +# Used by: +# Skill: Energy Weapon Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Energy Weapon", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionhybrid.py b/eos/effects/rigdrawbackreductionhybrid.py new file mode 100644 index 000000000..005b00d08 --- /dev/null +++ b/eos/effects/rigdrawbackreductionhybrid.py @@ -0,0 +1,8 @@ +# rigDrawbackReductionHybrid +# +# Used by: +# Skill: Hybrid Weapon Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Hybrid Weapon", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionlauncher.py b/eos/effects/rigdrawbackreductionlauncher.py new file mode 100644 index 000000000..07bf0679c --- /dev/null +++ b/eos/effects/rigdrawbackreductionlauncher.py @@ -0,0 +1,8 @@ +# rigDrawbackReductionLauncher +# +# Used by: +# Skill: Launcher Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Launcher", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionprojectile.py b/eos/effects/rigdrawbackreductionprojectile.py new file mode 100644 index 000000000..160436893 --- /dev/null +++ b/eos/effects/rigdrawbackreductionprojectile.py @@ -0,0 +1,8 @@ +# rigDrawbackReductionProjectile +# +# Used by: +# Skill: Projectile Weapon Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Projectile Weapon", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/rigdrawbackreductionshield.py b/eos/effects/rigdrawbackreductionshield.py new file mode 100644 index 000000000..a684ce50c --- /dev/null +++ b/eos/effects/rigdrawbackreductionshield.py @@ -0,0 +1,8 @@ +# rigDrawbackReductionShield +# +# Used by: +# Skill: Shield Rigging +type = "passive" +def handler(fit, src, context): + lvl = src.level + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Shield", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl) diff --git a/eos/effects/scanstrengthbonuspercentpassive.py b/eos/effects/scanstrengthbonuspercentpassive.py index ca696e5a7..365a0f7a9 100644 --- a/eos/effects/scanstrengthbonuspercentpassive.py +++ b/eos/effects/scanstrengthbonuspercentpassive.py @@ -1,7 +1,7 @@ # scanStrengthBonusPercentPassive # # Used by: -# Implants named like: High grade (20 of 60) +# Implants named like: High grade (20 of 61) type = "passive" def handler(fit, implant, context): for type in ("Gravimetric", "Magnetometric", "Radar", "Ladar"): diff --git a/eos/effects/shieldcapacitybonusonline.py b/eos/effects/shieldcapacitybonusonline.py index 2c4794eda..8f3d4afbb 100644 --- a/eos/effects/shieldcapacitybonusonline.py +++ b/eos/effects/shieldcapacitybonusonline.py @@ -1,8 +1,8 @@ # shieldCapacityBonusOnline # # Used by: -# Modules from group: Shield Amplifier (88 of 88) # Modules from group: Shield Extender (33 of 33) +# Modules from group: Shield Resistance Amplifier (88 of 88) type = "passive" def handler(fit, module, context): fit.ship.increaseItemAttr("shieldCapacity", module.getModifiedItemAttr("capacityBonus")) \ No newline at end of file diff --git a/eos/effects/shieldtransportcpuneedbonuseffect.py b/eos/effects/shieldtransportcpuneedbonuseffect.py index 8d40190cf..0e5cf26bf 100644 --- a/eos/effects/shieldtransportcpuneedbonuseffect.py +++ b/eos/effects/shieldtransportcpuneedbonuseffect.py @@ -3,6 +3,5 @@ # Used by: # Ships from group: Logistics (3 of 5) type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster", - "cpu", ship.getModifiedItemAttr("shieldTransportCpuNeedBonus")) +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "cpu", src.getModifiedItemAttr("shieldTransportCpuNeedBonus")) diff --git a/eos/effects/shipadvancedspaceshipcommandagilitybonus.py b/eos/effects/shipadvancedspaceshipcommandagilitybonus.py index cad85700a..69bafc2a4 100644 --- a/eos/effects/shipadvancedspaceshipcommandagilitybonus.py +++ b/eos/effects/shipadvancedspaceshipcommandagilitybonus.py @@ -1,7 +1,9 @@ # shipAdvancedSpaceshipCommandAgilityBonus # # Used by: -# Items from market group: Ships > Capital Ships (31 of 32) +# Ships from group: Dreadnought (5 of 5) +# Ships from group: Titan (5 of 5) +# Items from market group: Ships > Capital Ships (32 of 33) type = "passive" def handler(fit, ship, context): skillName = "Advanced Spaceship Command" diff --git a/eos/effects/shipbonusdreadnoughtg2rofbonus.py b/eos/effects/shipbonusdreadnoughtg2rofbonus.py index f6f39b89e..46c8f5365 100644 --- a/eos/effects/shipbonusdreadnoughtg2rofbonus.py +++ b/eos/effects/shipbonusdreadnoughtg2rofbonus.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Moros +# Ship: Vehement type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"), "speed", src.getModifiedItemAttr("shipBonusDreadnoughtG2"), skill="Gallente Dreadnought") diff --git a/eos/effects/shipbonusdreadnoughtm1webbonus.py b/eos/effects/shipbonusdreadnoughtm1webbonus.py new file mode 100644 index 000000000..d0adb6354 --- /dev/null +++ b/eos/effects/shipbonusdreadnoughtm1webbonus.py @@ -0,0 +1,7 @@ +# shipBonusDreadnoughtM1WebBonus +# +# Used by: +# Ship: Vehement +type = "passive" +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "speedFactor", src.getModifiedItemAttr("shipBonusDreadnoughtM1"), skill="Minmatar Dreadnought") diff --git a/eos/effects/shipbonusdreadnoughtrole1damagebonus.py b/eos/effects/shipbonusdreadnoughtrole1damagebonus.py index c7fd5b85b..e25f3e6b9 100644 --- a/eos/effects/shipbonusdreadnoughtrole1damagebonus.py +++ b/eos/effects/shipbonusdreadnoughtrole1damagebonus.py @@ -1,7 +1,9 @@ # shipBonusDreadnoughtRole1DamageBonus # # Used by: -# Ship: Naglfar +# Ship: Vehement type = "passive" -def handler(fit, src, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Projectile Turret"), "damageMultiplier", src.getModifiedItemAttr("shipBonusRole1")) +def handler(fit, ship, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"), + "damageMultiplier", ship.getModifiedItemAttr("shipBonusRole1")) + diff --git a/eos/effects/shipbonusenergyvampirerangead2.py b/eos/effects/shipbonusenergyvampirerangead2.py index 90f055473..5739edcbc 100644 --- a/eos/effects/shipbonusenergyvampirerangead2.py +++ b/eos/effects/shipbonusenergyvampirerangead2.py @@ -1,7 +1,4 @@ -# shipBonusEnergyVampireRangeAD2 -# -# Used by: -# Ship: Dragoon +# Not used by any item type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", diff --git a/eos/effects/shipbonusforceauxiliarya1remoterepairandcapamount.py b/eos/effects/shipbonusforceauxiliarya1remoterepairandcapamount.py index 2a9e8bfba..ef38862e5 100644 --- a/eos/effects/shipbonusforceauxiliarya1remoterepairandcapamount.py +++ b/eos/effects/shipbonusforceauxiliarya1remoterepairandcapamount.py @@ -4,5 +4,9 @@ # Ship: Apostle type = "passive" def handler(fit, src, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Capacitor Emission Systems"), "powerTransferAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "armorDamageAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capacitor Emission Systems") or + mod.item.requiresSkill("Capital Capacitor Emission Systems"), + "powerTransferAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems") or + mod.item.requiresSkill("Capital Remote Armor Repair Systems"), + "armorDamageAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier") diff --git a/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py b/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py index 1b0b75d4d..0aaf8c8a9 100644 --- a/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py +++ b/eos/effects/shipbonusforceauxiliaryc1remoteboostandcapamount.py @@ -4,5 +4,9 @@ # Ship: Minokawa type = "passive" def handler(fit, src, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Capacitor Emission Systems"), "powerTransferAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryC1"), skill="Caldari Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"), "shieldBonus", src.getModifiedItemAttr("shipBonusForceAuxiliaryC1"), skill="Caldari Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capacitor Emission Systems") or + mod.item.requiresSkill("Capital Capacitor Emission Systems"), + "powerTransferAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryC1"), skill="Caldari Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems") or + mod.item.requiresSkill("Capital Shield Emission Systems"), + "shieldBonus", src.getModifiedItemAttr("shipBonusForceAuxiliaryC1"), skill="Caldari Carrier") diff --git a/eos/effects/shipbonusforceauxiliaryg1remotecycletime.py b/eos/effects/shipbonusforceauxiliaryg1remotecycletime.py index f73fe5bd8..eb889bf5d 100644 --- a/eos/effects/shipbonusforceauxiliaryg1remotecycletime.py +++ b/eos/effects/shipbonusforceauxiliaryg1remotecycletime.py @@ -4,7 +4,9 @@ # Ship: Ninazu type = "passive" def handler(fit, src, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryG1"), skill="Gallente Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryG1"), skill="Gallente Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryG1"), skill="Gallente Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryG1"), skill="Gallente Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems") or + mod.item.requiresSkill("Capital Shield Emission Systems"), + "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryG1"), skill="Gallente Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems") or + mod.item.requiresSkill("Capital Remote Armor Repair Systems"), + "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryG1"), skill="Gallente Carrier") diff --git a/eos/effects/shipbonusforceauxiliarym1remotecycletime.py b/eos/effects/shipbonusforceauxiliarym1remotecycletime.py index f553f578e..90f14c952 100644 --- a/eos/effects/shipbonusforceauxiliarym1remotecycletime.py +++ b/eos/effects/shipbonusforceauxiliarym1remotecycletime.py @@ -4,7 +4,10 @@ # Ship: Lif type = "passive" def handler(fit, src, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Shield Emission Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier") - fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier") + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems") or + mod.item.requiresSkill("Capital Shield Emission Systems"), + "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier") + + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems") or + mod.item.requiresSkill("Capital Remote Armor Repair Systems"), + "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier") diff --git a/eos/effects/shipbonusremotearmorrepairamount2af.py b/eos/effects/shipbonusremotearmorrepairamount2af.py index dbabc1045..c672f9496 100644 --- a/eos/effects/shipbonusremotearmorrepairamount2af.py +++ b/eos/effects/shipbonusremotearmorrepairamount2af.py @@ -4,6 +4,5 @@ # Ship: Deacon # Ship: Inquisitor type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "armorDamageAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", src.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate") diff --git a/eos/effects/shipbonusremotearmorrepairamountac2.py b/eos/effects/shipbonusremotearmorrepairamountac2.py index 5d90469a3..2b56129bf 100644 --- a/eos/effects/shipbonusremotearmorrepairamountac2.py +++ b/eos/effects/shipbonusremotearmorrepairamountac2.py @@ -3,6 +3,5 @@ # Used by: # Ship: Augoror type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "armorDamageAmount", ship.getModifiedItemAttr("shipBonusAC2"), skill="Amarr Cruiser") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", src.getModifiedItemAttr("shipBonusAC2"), skill="Amarr Cruiser") diff --git a/eos/effects/shipbonusremotearmorrepairamountgc2.py b/eos/effects/shipbonusremotearmorrepairamountgc2.py index fbd04f0b2..7612f0191 100644 --- a/eos/effects/shipbonusremotearmorrepairamountgc2.py +++ b/eos/effects/shipbonusremotearmorrepairamountgc2.py @@ -3,6 +3,5 @@ # Used by: # Ship: Exequror type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "armorDamageAmount", ship.getModifiedItemAttr("shipBonusGC2"), skill="Gallente Cruiser") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", src.getModifiedItemAttr("shipBonusGC2"), skill="Gallente Cruiser") diff --git a/eos/effects/shipbonusremotearmorrepairamountgf2.py b/eos/effects/shipbonusremotearmorrepairamountgf2.py index 56bb2a1bb..40475557a 100644 --- a/eos/effects/shipbonusremotearmorrepairamountgf2.py +++ b/eos/effects/shipbonusremotearmorrepairamountgf2.py @@ -3,6 +3,5 @@ # Used by: # Variations of ship: Navitas (2 of 2) type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "armorDamageAmount", ship.getModifiedItemAttr("shipBonusGF2"), skill="Gallente Frigate") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", src.getModifiedItemAttr("shipBonusGF2"), skill="Gallente Frigate") diff --git a/eos/effects/shipbonusremotearmorrepaircapneedac1.py b/eos/effects/shipbonusremotearmorrepaircapneedac1.py index d93489454..d9257a835 100644 --- a/eos/effects/shipbonusremotearmorrepaircapneedac1.py +++ b/eos/effects/shipbonusremotearmorrepaircapneedac1.py @@ -3,6 +3,5 @@ # Used by: # Ship: Augoror type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "capacitorNeed", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser") diff --git a/eos/effects/shipbonusremotearmorrepaircapneedaf.py b/eos/effects/shipbonusremotearmorrepaircapneedaf.py index b79927306..56daea7ba 100644 --- a/eos/effects/shipbonusremotearmorrepaircapneedaf.py +++ b/eos/effects/shipbonusremotearmorrepaircapneedaf.py @@ -4,6 +4,5 @@ # Ship: Deacon # Ship: Inquisitor type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "capacitorNeed", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate") diff --git a/eos/effects/shipbonusremotearmorrepaircapneedgc1.py b/eos/effects/shipbonusremotearmorrepaircapneedgc1.py index 022e51477..79788def7 100644 --- a/eos/effects/shipbonusremotearmorrepaircapneedgc1.py +++ b/eos/effects/shipbonusremotearmorrepaircapneedgc1.py @@ -3,6 +3,5 @@ # Used by: # Ship: Exequror type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "capacitorNeed", ship.getModifiedItemAttr("shipBonusGC"), skill="Gallente Cruiser") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("shipBonusGC"), skill="Gallente Cruiser") diff --git a/eos/effects/shipbonusremotearmorrepaircapneedgf.py b/eos/effects/shipbonusremotearmorrepaircapneedgf.py index f081267cf..6f2c5fd7a 100644 --- a/eos/effects/shipbonusremotearmorrepaircapneedgf.py +++ b/eos/effects/shipbonusremotearmorrepaircapneedgf.py @@ -3,6 +3,5 @@ # Used by: # Variations of ship: Navitas (2 of 2) type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", - "capacitorNeed", ship.getModifiedItemAttr("shipBonusGF"), skill="Gallente Frigate") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "capacitorNeed", src.getModifiedItemAttr("shipBonusGF"), skill="Gallente Frigate") diff --git a/eos/effects/shipbonusshieldtransfercapneed1.py b/eos/effects/shipbonusshieldtransfercapneed1.py index 922d3804f..1414679f2 100644 --- a/eos/effects/shipbonusshieldtransfercapneed1.py +++ b/eos/effects/shipbonusshieldtransfercapneed1.py @@ -3,6 +3,5 @@ # Used by: # Ship: Osprey type = "passive" -def handler(fit, ship, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster", - "capacitorNeed", ship.getModifiedItemAttr("shipBonusCC"), skill="Caldari Cruiser") +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "capacitorNeed", src.getModifiedItemAttr("shipBonusCC"), skill="Caldari Cruiser") diff --git a/eos/effects/shipbonussupercarrierg1fighterdamage.py b/eos/effects/shipbonussupercarrierg1fighterdamage.py index 366387ccd..adc851d45 100644 --- a/eos/effects/shipbonussupercarrierg1fighterdamage.py +++ b/eos/effects/shipbonussupercarrierg1fighterdamage.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Nyx +# Ship: Vendetta type = "passive" def handler(fit, src, context): fit.fighters.filteredItemBoost(lambda mod: mod.item.requiresSkill("Fighters"), "fighterAbilityAttackTurretDamageMultiplier", src.getModifiedItemAttr("shipBonusSupercarrierG1"), skill="Gallente Carrier") diff --git a/eos/effects/shipbonussupercarrierg2fighterhitpoints.py b/eos/effects/shipbonussupercarrierg2fighterhitpoints.py index f18351da2..927dc2628 100644 --- a/eos/effects/shipbonussupercarrierg2fighterhitpoints.py +++ b/eos/effects/shipbonussupercarrierg2fighterhitpoints.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Nyx +# Ship: Vendetta type = "passive" def handler(fit, src, context): fit.fighters.filteredItemBoost(lambda mod: mod.item.requiresSkill("Fighters"), "shieldCapacity", src.getModifiedItemAttr("shipBonusSupercarrierG2"), skill="Gallente Carrier") diff --git a/eos/effects/shipbonussupercarrierg3warpstrength.py b/eos/effects/shipbonussupercarrierg3warpstrength.py index 4d9ff26f1..5e9076aa8 100644 --- a/eos/effects/shipbonussupercarrierg3warpstrength.py +++ b/eos/effects/shipbonussupercarrierg3warpstrength.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Nyx +# Ship: Vendetta type = "passive" def handler(fit, src, context): fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("shipBonusSupercarrierG3"), skill="Gallente Carrier") diff --git a/eos/effects/shipbonussupercarrierm1burstprojectorwebbonus.py b/eos/effects/shipbonussupercarrierm1burstprojectorwebbonus.py new file mode 100644 index 000000000..a7981f59e --- /dev/null +++ b/eos/effects/shipbonussupercarrierm1burstprojectorwebbonus.py @@ -0,0 +1,8 @@ +# shipBonusSupercarrierM1BurstProjectorWebBonus +# +# Used by: +# Ship: Hel +# Ship: Vendetta +type = "passive" +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Burst Projector Operation"), "speedFactor", src.getModifiedItemAttr("shipBonusSupercarrierM1"), skill="Minmatar Carrier") diff --git a/eos/effects/shipbonussupercarrierm2fightervelocity.py b/eos/effects/shipbonussupercarrierm2fightervelocity.py index 123afebb8..f119d5235 100644 --- a/eos/effects/shipbonussupercarrierm2fightervelocity.py +++ b/eos/effects/shipbonussupercarrierm2fightervelocity.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Hel +# Ship: Vendetta type = "passive" def handler(fit, src, context): fit.fighters.filteredItemBoost(lambda mod: mod.item.requiresSkill("Fighters"), "maxVelocity", src.getModifiedItemAttr("shipBonusSupercarrierM2"), skill="Minmatar Carrier") diff --git a/eos/effects/shipbonussupercarrierm3warpstrength.py b/eos/effects/shipbonussupercarrierm3warpstrength.py index 7219ca9b2..5e328b84e 100644 --- a/eos/effects/shipbonussupercarrierm3warpstrength.py +++ b/eos/effects/shipbonussupercarrierm3warpstrength.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Hel +# Ship: Vendetta type = "passive" def handler(fit, src, context): fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("shipBonusSupercarrierM3"), skill="Minmatar Carrier") diff --git a/eos/effects/shipbonussupercarrierrole1numwarfarelinks.py b/eos/effects/shipbonussupercarrierrole1numwarfarelinks.py index ae8f4992c..60bf8d1ae 100644 --- a/eos/effects/shipbonussupercarrierrole1numwarfarelinks.py +++ b/eos/effects/shipbonussupercarrierrole1numwarfarelinks.py @@ -1,7 +1,7 @@ # shipBonusSupercarrierRole1NumWarfareLinks # # Used by: -# Ships from group: Supercarrier (5 of 5) +# Ships from group: Supercarrier (6 of 6) type = "passive" def handler(fit, src, context): fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("Leadership"), "maxGroupActive", src.getModifiedItemAttr("shipBonusRole1")) diff --git a/eos/effects/shipbonussupercarrierrole2armorshieldmodulebonus.py b/eos/effects/shipbonussupercarrierrole2armorshieldmodulebonus.py index 3e9e5045a..de6d7f485 100644 --- a/eos/effects/shipbonussupercarrierrole2armorshieldmodulebonus.py +++ b/eos/effects/shipbonussupercarrierrole2armorshieldmodulebonus.py @@ -1,7 +1,7 @@ # shipBonusSupercarrierRole2ArmorShieldModuleBonus # # Used by: -# Ships from group: Supercarrier (5 of 5) +# Ships from group: Supercarrier (6 of 6) type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Hull Upgrades"), "armorHPBonusAdd", src.getModifiedItemAttr("shipBonusRole2")) diff --git a/eos/effects/shipbonustitang2rofbonus.py b/eos/effects/shipbonustitang2rofbonus.py index 2c713f32f..b3ed6af66 100644 --- a/eos/effects/shipbonustitang2rofbonus.py +++ b/eos/effects/shipbonustitang2rofbonus.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Erebus +# Ship: Vanquisher type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"), "speed", src.getModifiedItemAttr("shipBonusTitanG2"), skill="Gallente Titan") diff --git a/eos/effects/shipbonustitang3warpstrength.py b/eos/effects/shipbonustitang3warpstrength.py index afe99bb65..40d35e72b 100644 --- a/eos/effects/shipbonustitang3warpstrength.py +++ b/eos/effects/shipbonustitang3warpstrength.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Erebus +# Ship: Vanquisher type = "passive" def handler(fit, src, context): fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("shipBonusTitanG3"), skill="Gallente Titan") diff --git a/eos/effects/shipbonustitanm1webbonus.py b/eos/effects/shipbonustitanm1webbonus.py new file mode 100644 index 000000000..7a8d72d39 --- /dev/null +++ b/eos/effects/shipbonustitanm1webbonus.py @@ -0,0 +1,7 @@ +# shipBonusTitanM1WebBonus +# +# Used by: +# Ship: Vanquisher +type = "passive" +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "speedFactor", src.getModifiedItemAttr("shipBonusTitanM1"), skill="Minmatar Titan") diff --git a/eos/effects/shipbonustitanm3warpstrength.py b/eos/effects/shipbonustitanm3warpstrength.py index fc3969e07..3d1c82e91 100644 --- a/eos/effects/shipbonustitanm3warpstrength.py +++ b/eos/effects/shipbonustitanm3warpstrength.py @@ -2,6 +2,7 @@ # # Used by: # Ship: Ragnarok +# Ship: Vanquisher type = "passive" def handler(fit, src, context): fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("shipBonusTitanM3"), skill="Minmatar Titan") diff --git a/eos/effects/shipbonustitanrole1numwarfarelinks.py b/eos/effects/shipbonustitanrole1numwarfarelinks.py index 94033c2ec..0f3aa4c4d 100644 --- a/eos/effects/shipbonustitanrole1numwarfarelinks.py +++ b/eos/effects/shipbonustitanrole1numwarfarelinks.py @@ -1,7 +1,7 @@ # shipBonusTitanRole1NumWarfareLinks # # Used by: -# Ships from group: Titan (4 of 4) +# Ships from group: Titan (5 of 5) type = "passive" def handler(fit, src, context): fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("Leadership"), "maxGroupActive", src.getModifiedItemAttr("shipBonusRole1")) diff --git a/eos/effects/shipbonustitanrole2armorshieldmodulebonus.py b/eos/effects/shipbonustitanrole2armorshieldmodulebonus.py index 4a709be5f..ca4a8baf9 100644 --- a/eos/effects/shipbonustitanrole2armorshieldmodulebonus.py +++ b/eos/effects/shipbonustitanrole2armorshieldmodulebonus.py @@ -1,7 +1,7 @@ # shipBonusTitanRole2ArmorShieldModuleBonus # # Used by: -# Ships from group: Titan (4 of 4) +# Ships from group: Titan (5 of 5) type = "passive" def handler(fit, src, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Hull Upgrades"), "armorHPBonusAdd", src.getModifiedItemAttr("shipBonusRole2")) diff --git a/eos/effects/shipbonustitanrole3damagebonus.py b/eos/effects/shipbonustitanrole3damagebonus.py new file mode 100644 index 000000000..20b7544bb --- /dev/null +++ b/eos/effects/shipbonustitanrole3damagebonus.py @@ -0,0 +1,7 @@ +# shipBonusTitanRole3DamageBonus +# +# Used by: +# Ship: Vanquisher +type = "passive" +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"), "damageMultiplier", src.getModifiedItemAttr("shipBonusRole3")) diff --git a/eos/effects/shipcapitalagilitybonus.py b/eos/effects/shipcapitalagilitybonus.py index 2eaf6d370..4d41a83e6 100644 --- a/eos/effects/shipcapitalagilitybonus.py +++ b/eos/effects/shipcapitalagilitybonus.py @@ -1,8 +1,12 @@ # shipCapitalAgilityBonus # # Used by: -# Ships from group: Supercarrier (5 of 5) -# Items from market group: Ships > Capital Ships (22 of 32) +# Ships from group: Carrier (4 of 4) +# Ships from group: Dreadnought (5 of 5) +# Ships from group: Force Auxiliary (4 of 4) +# Ships from group: Supercarrier (6 of 6) +# Ships from group: Titan (5 of 5) +# Ship: Rorqual type = "passive" def handler(fit, src, context): fit.ship.multiplyItemAttr("agility", src.getModifiedItemAttr("advancedCapitalAgility"), stackingPenalties=True) diff --git a/eos/effects/shipenergyneutralizertransferamountbonusab.py b/eos/effects/shipenergyneutralizertransferamountbonusab.py index 3a005e1fc..a331c58d4 100644 --- a/eos/effects/shipenergyneutralizertransferamountbonusab.py +++ b/eos/effects/shipenergyneutralizertransferamountbonusab.py @@ -5,4 +5,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship") + "energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship") diff --git a/eos/effects/shipenergyneutralizertransferamountbonusac.py b/eos/effects/shipenergyneutralizertransferamountbonusac.py index 1c4546fd3..58fb9bb96 100644 --- a/eos/effects/shipenergyneutralizertransferamountbonusac.py +++ b/eos/effects/shipenergyneutralizertransferamountbonusac.py @@ -6,4 +6,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser") + "energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser") diff --git a/eos/effects/shipenergyneutralizertransferamountbonusaf.py b/eos/effects/shipenergyneutralizertransferamountbonusaf.py index 6e525dcb1..11116d5a2 100644 --- a/eos/effects/shipenergyneutralizertransferamountbonusaf.py +++ b/eos/effects/shipenergyneutralizertransferamountbonusaf.py @@ -6,4 +6,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate") + "energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate") diff --git a/eos/effects/shipenergyneutralizertransferamountbonusaf2.py b/eos/effects/shipenergyneutralizertransferamountbonusaf2.py index 36a9f2b95..16c62b8a1 100644 --- a/eos/effects/shipenergyneutralizertransferamountbonusaf2.py +++ b/eos/effects/shipenergyneutralizertransferamountbonusaf2.py @@ -5,4 +5,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate") + "energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate") diff --git a/eos/effects/shipneutdestabilizationamountbonusrookie.py b/eos/effects/shipneutdestabilizationamountbonusrookie.py index d333686cc..1d1aa57ad 100644 --- a/eos/effects/shipneutdestabilizationamountbonusrookie.py +++ b/eos/effects/shipneutdestabilizationamountbonusrookie.py @@ -5,4 +5,4 @@ type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", ship.getModifiedItemAttr("rookieNeutDrain")) + "energyNeutralizerAmount", ship.getModifiedItemAttr("rookieNeutDrain")) diff --git a/eos/effects/shipxlprojectiledamagerole.py b/eos/effects/shipxlprojectiledamagerole.py index fbbb39202..e79fcfda7 100644 --- a/eos/effects/shipxlprojectiledamagerole.py +++ b/eos/effects/shipxlprojectiledamagerole.py @@ -1,7 +1,4 @@ -# shipXLProjectileDamageRole -# -# Used by: -# Ship: Naglfar +# Not used by any item type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Projectile Turret"), diff --git a/eos/effects/skillreactivearmorhardenercapneedbonus.py b/eos/effects/skillreactivearmorhardenercapneedbonus.py index 888995e40..e377cd9a9 100644 --- a/eos/effects/skillreactivearmorhardenercapneedbonus.py +++ b/eos/effects/skillreactivearmorhardenercapneedbonus.py @@ -1,3 +1,7 @@ +# skillReactiveArmorHardenerCapNeedBonus +# +# Used by: +# Skill: Resistance Phasing type = "passive" def handler(fit, src, context): lvl = src.level diff --git a/eos/effects/skillreactivearmorhardenerdurationbonus.py b/eos/effects/skillreactivearmorhardenerdurationbonus.py index 20ff0d48e..45e4c0b91 100644 --- a/eos/effects/skillreactivearmorhardenerdurationbonus.py +++ b/eos/effects/skillreactivearmorhardenerdurationbonus.py @@ -1,3 +1,7 @@ +# skillReactiveArmorHardenerDurationBonus +# +# Used by: +# Skill: Resistance Phasing type = "passive" def handler(fit, src, context): lvl = src.level diff --git a/eos/effects/skillremotehullrepairsystemscapneedbonus.py b/eos/effects/skillremotehullrepairsystemscapneedbonus.py index c9a31e3df..181ab2239 100644 --- a/eos/effects/skillremotehullrepairsystemscapneedbonus.py +++ b/eos/effects/skillremotehullrepairsystemscapneedbonus.py @@ -1,4 +1,4 @@ -# skillRemoteHullRepairSystemsCapNeedBonus +# skillRemoteHullRepairSystemsCapNeedBonus # # Used by: # Skill: Remote Hull Repair Systems diff --git a/eos/effects/subsystembonusamarrdefensive2remotearmorrepairamount.py b/eos/effects/subsystembonusamarrdefensive2remotearmorrepairamount.py index f14c08301..fa0c9a3e8 100644 --- a/eos/effects/subsystembonusamarrdefensive2remotearmorrepairamount.py +++ b/eos/effects/subsystembonusamarrdefensive2remotearmorrepairamount.py @@ -4,5 +4,5 @@ # Subsystem: Legion Defensive - Adaptive Augmenter type = "passive" def handler(fit, module, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", module.getModifiedItemAttr("subsystemBonusAmarrDefensive2"), skill="Amarr Defensive Systems") diff --git a/eos/effects/subsystembonusamarrelectronicenergydestabilizeramount.py b/eos/effects/subsystembonusamarrelectronicenergydestabilizeramount.py index 55e7d5614..ba29f0b27 100644 --- a/eos/effects/subsystembonusamarrelectronicenergydestabilizeramount.py +++ b/eos/effects/subsystembonusamarrelectronicenergydestabilizeramount.py @@ -5,4 +5,4 @@ type = "passive" def handler(fit, module, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", module.getModifiedItemAttr("subsystemBonusAmarrElectronic"), skill="Amarr Electronic Systems") + "energyNeutralizerAmount", module.getModifiedItemAttr("subsystemBonusAmarrElectronic"), skill="Amarr Electronic Systems") diff --git a/eos/effects/subsystembonuscaldaridefensive2remoteshieldtransporteramount.py b/eos/effects/subsystembonuscaldaridefensive2remoteshieldtransporteramount.py index e55064df9..d267413eb 100644 --- a/eos/effects/subsystembonuscaldaridefensive2remoteshieldtransporteramount.py +++ b/eos/effects/subsystembonuscaldaridefensive2remoteshieldtransporteramount.py @@ -4,5 +4,5 @@ # Subsystem: Tengu Defensive - Adaptive Shielding type = "passive" def handler(fit, module, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster", + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "shieldBonus", module.getModifiedItemAttr("subsystemBonusCaldariDefensive2"), skill="Caldari Defensive Systems") diff --git a/eos/effects/subsystembonusgallentedefensive2remotearmorrepairamount.py b/eos/effects/subsystembonusgallentedefensive2remotearmorrepairamount.py index 9a8a14678..25c865057 100644 --- a/eos/effects/subsystembonusgallentedefensive2remotearmorrepairamount.py +++ b/eos/effects/subsystembonusgallentedefensive2remotearmorrepairamount.py @@ -4,5 +4,5 @@ # Subsystem: Proteus Defensive - Adaptive Augmenter type = "passive" def handler(fit, module, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Armor Repairer", + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", module.getModifiedItemAttr("subsystemBonusGallenteDefensive2"), skill="Gallente Defensive Systems") diff --git a/eos/effects/subsystembonusminmatardefensive2remoteshieldtransporteramount.py b/eos/effects/subsystembonusminmatardefensive2remoteshieldtransporteramount.py index 1e5d2c069..349d30c51 100644 --- a/eos/effects/subsystembonusminmatardefensive2remoteshieldtransporteramount.py +++ b/eos/effects/subsystembonusminmatardefensive2remoteshieldtransporteramount.py @@ -4,5 +4,5 @@ # Subsystem: Loki Defensive - Adaptive Shielding type = "passive" def handler(fit, module, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Shield Booster", + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "shieldBonus", module.getModifiedItemAttr("subsystemBonusMinmatarDefensive2"), skill="Minmatar Defensive Systems") diff --git a/eos/effects/systemenergyneutmultiplier.py b/eos/effects/systemenergyneutmultiplier.py index 8c6328c98..6c3e7b5af 100644 --- a/eos/effects/systemenergyneutmultiplier.py +++ b/eos/effects/systemenergyneutmultiplier.py @@ -6,5 +6,5 @@ runTime = "early" type = ("projected", "passive") def handler(fit, beacon, context): fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Energy Neutralizer", - "energyDestabilizationAmount", beacon.getModifiedItemAttr("energyWarfareStrengthMultiplier"), + "energyNeutralizerAmount", beacon.getModifiedItemAttr("energyWarfareStrengthMultiplier"), stackingPenalties=True, penaltyGroup="postMul") diff --git a/eos/effects/systemneutbombs.py b/eos/effects/systemneutbombs.py index a87d4e691..4bdadf12b 100644 --- a/eos/effects/systemneutbombs.py +++ b/eos/effects/systemneutbombs.py @@ -6,5 +6,5 @@ runTime = "early" type = ("projected", "passive") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Bomb Deployment"), - "energyDestabilizationAmount", beacon.getModifiedItemAttr("smartbombDamageMultiplier"), + "energyNeutralizerAmount", beacon.getModifiedItemAttr("smartbombDamageMultiplier"), stackingPenalties=True, penaltyGroup="postMul") diff --git a/eos/effects/thermalshieldcompensationhardeningbonusgroupshieldamp.py b/eos/effects/thermalshieldcompensationhardeningbonusgroupshieldamp.py index 1dec7e8d3..00519379a 100644 --- a/eos/effects/thermalshieldcompensationhardeningbonusgroupshieldamp.py +++ b/eos/effects/thermalshieldcompensationhardeningbonusgroupshieldamp.py @@ -4,5 +4,5 @@ # Skill: Thermal Shield Compensation type = "passive" def handler(fit, skill, context): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier", + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier", "thermalDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level) \ No newline at end of file diff --git a/eos/effects/titanturretdamagescaling.py b/eos/effects/titanturretdamagescaling.py index ce19cd6c2..7f549ae75 100644 --- a/eos/effects/titanturretdamagescaling.py +++ b/eos/effects/titanturretdamagescaling.py @@ -1,7 +1,4 @@ -# titanTurretDamageScaling -# -# Used by: -# Ships from group: Titan (4 of 4) +# Not used by any item type = "passive" def handler(fit, ship, context): fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("Gunnery"), diff --git a/eos/effects/turretweaponrangefallofftrackingspeedmultiplytargethostile.py b/eos/effects/turretweaponrangefallofftrackingspeedmultiplytargethostile.py index 05ed6876a..63d9743b9 100644 --- a/eos/effects/turretweaponrangefallofftrackingspeedmultiplytargethostile.py +++ b/eos/effects/turretweaponrangefallofftrackingspeedmultiplytargethostile.py @@ -1,7 +1,4 @@ -# turretWeaponRangeFalloffTrackingSpeedMultiplyTargetHostile -# -# Used by: -# Drones named like: TD (3 of 3) +# Not used by any item type = "projected", "active" def handler(fit, container, context): if "projected" in context: diff --git a/eos/effects/warpscramble.py b/eos/effects/warpscramble.py index 9c819a3bc..96d0b3d40 100644 --- a/eos/effects/warpscramble.py +++ b/eos/effects/warpscramble.py @@ -1,9 +1,7 @@ # warpScramble # # Used by: -# Variations of module: Heavy Warp Disruptor I (7 of 7) -# Variations of module: Warp Disruptor I (19 of 19) -# Module: Civilian Warp Disruptor +# Modules named like: Warp Disruptor (27 of 27) type = "projected", "active" def handler(fit, module, context): fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) \ No newline at end of file diff --git a/eos/effects/warpscrambleblockmwdwithnpceffect.py b/eos/effects/warpscrambleblockmwdwithnpceffect.py index 55cb867d6..5369efc45 100644 --- a/eos/effects/warpscrambleblockmwdwithnpceffect.py +++ b/eos/effects/warpscrambleblockmwdwithnpceffect.py @@ -1,8 +1,7 @@ # warpScrambleBlockMWDWithNPCEffect # # Used by: -# Variations of module: Heavy Warp Scrambler I (7 of 7) -# Variations of module: Warp Scrambler I (19 of 19) +# Modules named like: Warp Scrambler (26 of 26) runTime = "early" type = "projected", "active" diff --git a/eos/graph/fitDps.py b/eos/graph/fitDps.py index dc402706d..7bdc68ca0 100644 --- a/eos/graph/fitDps.py +++ b/eos/graph/fitDps.py @@ -95,11 +95,10 @@ class FitDpsGraph(Graph): targetSigRad = explosionRadius if targetSigRad is None else targetSigRad explosionVelocity = mod.getModifiedChargeAttr("aoeVelocity") damageReductionFactor = mod.getModifiedChargeAttr("aoeDamageReductionFactor") - damageReductionSensitivity = mod.getModifiedChargeAttr("aoeDamageReductionSensitivity") sigRadiusFactor = targetSigRad / explosionRadius if targetVelocity: - velocityFactor = (explosionVelocity / explosionRadius * targetSigRad / targetVelocity) ** (log(damageReductionFactor) / log(damageReductionSensitivity)) + velocityFactor = (explosionVelocity / explosionRadius * targetSigRad / targetVelocity) ** damageReductionFactor else: velocityFactor = 1 diff --git a/eos/modifiedAttributeDict.py b/eos/modifiedAttributeDict.py index ed331ae6a..0f366af6f 100644 --- a/eos/modifiedAttributeDict.py +++ b/eos/modifiedAttributeDict.py @@ -153,13 +153,24 @@ class ModifiedAttributeDict(collections.MutableMapping): if attrInfo is None: cappingId = cappingAttrKeyCache[key] = None else: + # see GH issue #620 cappingId = cappingAttrKeyCache[key] = attrInfo.maxAttributeID if cappingId is None: cappingKey = None else: cappingAttrInfo = getAttributeInfo(cappingId) cappingKey = None if cappingAttrInfo is None else cappingAttrInfo.name - cappingValue = self.__calculateValue(cappingKey) if cappingKey is not None else None + + if cappingKey: + if cappingKey in self.original: + # some items come with their own caps (ie: carriers). If they do, use this + cappingValue = self.original.get(cappingKey).value + else: + # If not, get info about the default value + cappingValue = self.__calculateValue(cappingKey) + else: + cappingValue = None + # If value is forced, we don't have to calculate anything, # just return forced value instead force = self.__forced[key] if key in self.__forced else None @@ -312,14 +323,27 @@ class ModifiedAttributeDict(collections.MutableMapping): if not attributeName in self.__multipliers: self.__multipliers[attributeName] = 1 self.__multipliers[attributeName] *= multiplier + self.__placehold(attributeName) self.__afflict(attributeName, "%s*" % ("s" if stackingPenalties else ""), multiplier, multiplier != 1) - def boost(self, attributeName, boostFactor, skill=None, *args, **kwargs): + def boost(self, attributeName, boostFactor, skill=None, remoteResists=False, *args, **kwargs): """Boost value by some percentage""" if skill: boostFactor *= self.__handleSkill(skill) + if remoteResists: + # @todo: this is such a disgusting hack. Look into sending these checks to the module class before the + # effect is applied. + mod = self.fit.getModifier() + remoteResistID = mod.getModifiedItemAttr("remoteResistanceID") or None + + # We really don't have a way of getting a ships attribute by ID. Fail. + resist = next((x for x in self.fit.ship.item.attributes.values() if x.ID == remoteResistID), None) + + if remoteResistID and resist: + boostFactor *= resist.value + # We just transform percentage boost into multiplication factor self.multiply(attributeName, 1 + boostFactor / 100.0, *args, **kwargs) diff --git a/eos/saveddata/character.py b/eos/saveddata/character.py index 2d3fc260d..adbb1fbf9 100644 --- a/eos/saveddata/character.py +++ b/eos/saveddata/character.py @@ -315,7 +315,10 @@ class Skill(HandledItem): return self.__item def getModifiedItemAttr(self, key): - return self.item.attributes[key].value + if key in self.item.attributes: + return self.item.attributes[key].value + else: + return None def calculateModifiedAttributes(self, fit, runTime): if self.__suppressed: # or not self.learned - removed for GH issue 101 diff --git a/eos/saveddata/fighterAbility.py b/eos/saveddata/fighterAbility.py index e7756bde1..027ffa30f 100644 --- a/eos/saveddata/fighterAbility.py +++ b/eos/saveddata/fighterAbility.py @@ -26,6 +26,14 @@ class FighterAbility(object): DAMAGE_TYPES = ("em", "kinetic", "explosive", "thermal") DAMAGE_TYPES2 = ("EM", "Kin", "Exp", "Therm") + # We aren't able to get data on the charges that can be stored with fighters. So we hardcode that data here, keyed + # with the fighter squadron role + NUM_SHOTS_MAPPING = { + 2: 8, # Light fighter / Attack + 4: 6, # Heavy fighter / Heavy attack + 5: 2, # Heavy fighter / Long range attack + } + def __init__(self, effect): """Initialize from the program""" self.__effect = effect @@ -71,12 +79,36 @@ class FighterAbility(object): # is the ability applied per fighter (webs, returns False), or as a group (MWD, returned True) return self.__effect.getattr('grouped') + @property + def hasCharges(self): + return self.__effect.getattr('hasCharges') + + @property + def reloadTime(self): + return self.fighter.getModifiedItemAttr("fighterRefuelingTime") * self.numShots + + @property + def numShots(self): + return self.NUM_SHOTS_MAPPING[self.fighter.getModifiedItemAttr("fighterSquadronRole")] or 0 if self.hasCharges else 0 + + @property + def cycleTime(self): + speed = self.fighter.getModifiedItemAttr("{}Duration".format(self.attrPrefix)) + reload = self.reloadTime + + if self.fighter.owner.factorReload: + numShots = self.numShots + # Speed here already takes into consideration reactivation time + speed = (speed * numShots + reload) / numShots if numShots > 0 else speed + + return speed + def damageStats(self, targetResists=None): if self.__dps is None: self.__volley = 0 self.__dps = 0 if self.dealsDamage and self.active: - cycleTime = self.fighter.getModifiedItemAttr("{}Duration".format(self.attrPrefix)) + cycleTime = self.cycleTime if self.attrPrefix == "fighterAbilityLaunchBomb": # bomb calcs diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index 814cecccf..049e98939 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -638,7 +638,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): @property def rawCycleTime(self): - speed = self.getModifiedItemAttr("speed") or self.getModifiedItemAttr("duration") + speed = self.getModifiedItemAttr("speed") or self.getModifiedItemAttr("duration") return speed @property diff --git a/eos/saveddata/ship.py b/eos/saveddata/ship.py index 1a1644849..6dd20feb1 100644 --- a/eos/saveddata/ship.py +++ b/eos/saveddata/ship.py @@ -46,7 +46,7 @@ class Ship(ItemAttrShortcut, HandledItem): self.__item = item self.__modeItems = self.__getModeItems() - self.__itemModifiedAttributes = ModifiedAttributeDict() + self.__itemModifiedAttributes = ModifiedAttributeDict(parent=self) self.__itemModifiedAttributes.original = dict(self.item.attributes) self.__itemModifiedAttributes.original.update(self.EXTRA_ATTRIBUTES) self.__itemModifiedAttributes.overrides = self.item.overrides diff --git a/eve.db b/eve.db index 8c442ea89..0c2623139 100644 Binary files a/eve.db and b/eve.db differ diff --git a/gui/builtinContextMenus/changeAffectingSkills.py b/gui/builtinContextMenus/changeAffectingSkills.py index fecd77234..5111a8d27 100644 --- a/gui/builtinContextMenus/changeAffectingSkills.py +++ b/gui/builtinContextMenus/changeAffectingSkills.py @@ -60,7 +60,7 @@ class ChangeAffectingSkills(ContextMenu): else: label = "Level %s" % i - id = wx.NewId() + id = ContextMenu.nextID() self.skillIds[id] = (skill, i) menuItem = wx.MenuItem(rootMenu, id, label, kind=wx.ITEM_RADIO) rootMenu.Bind(wx.EVT_MENU, self.handleSkillChange, menuItem) @@ -72,7 +72,7 @@ class ChangeAffectingSkills(ContextMenu): sub = wx.Menu() for skill in self.skills: - skillItem = wx.MenuItem(sub, wx.NewId(), skill.item.name) + skillItem = wx.MenuItem(sub, ContextMenu.nextID(), skill.item.name) grandSub = wx.Menu() skillItem.SetSubMenu(grandSub) if skill.learned: diff --git a/gui/builtinContextMenus/damagePattern.py b/gui/builtinContextMenus/damagePattern.py index 3238b9b43..8d9b6be32 100644 --- a/gui/builtinContextMenus/damagePattern.py +++ b/gui/builtinContextMenus/damagePattern.py @@ -48,7 +48,7 @@ class DamagePattern(ContextMenu): return self.m def addPattern(self, rootMenu, pattern): - id = wx.NewId() + id = ContextMenu.nextID() name = getattr(pattern, "_name", pattern.name) if pattern is not None else "No Profile" self.patternIds[id] = pattern diff --git a/gui/builtinContextMenus/fighterAbilities.py b/gui/builtinContextMenus/fighterAbilities.py index 910703659..9a86c23b1 100644 --- a/gui/builtinContextMenus/fighterAbilities.py +++ b/gui/builtinContextMenus/fighterAbilities.py @@ -20,7 +20,7 @@ class FighterAbility(ContextMenu): def addAbility(self, menu, ability): label = ability.name - id = wx.NewId() + id = ContextMenu.nextID() self.abilityIds[id] = ability menuItem = wx.MenuItem(menu, id, label, kind=wx.ITEM_CHECK) menu.Bind(wx.EVT_MENU, self.handleMode, menuItem) diff --git a/gui/builtinContextMenus/implantSets.py b/gui/builtinContextMenus/implantSets.py index 6ae43039b..8dcf6dd1f 100644 --- a/gui/builtinContextMenus/implantSets.py +++ b/gui/builtinContextMenus/implantSets.py @@ -42,7 +42,7 @@ class ImplantSets(ContextMenu): self.idmap = {} for set in implantSets: - id = wx.NewId() + id = ContextMenu.nextID() mitem = wx.MenuItem(rootMenu, id, set.name) bindmenu.Bind(wx.EVT_MENU, self.handleSelection, mitem) self.idmap[id] = set diff --git a/gui/builtinContextMenus/metaSwap.py b/gui/builtinContextMenus/metaSwap.py index 144d3f8bb..0d04bc710 100644 --- a/gui/builtinContextMenus/metaSwap.py +++ b/gui/builtinContextMenus/metaSwap.py @@ -70,11 +70,11 @@ class MetaSwap(ContextMenu): if thisgroup != group: group = thisgroup - id = wx.NewId() + id = ContextMenu.nextID() m.Append(id, u'─ %s ─' % group) m.Enable(id, False) - id = wx.NewId() + id = ContextMenu.nextID() mitem = wx.MenuItem(rootMenu, id, item.name) bindmenu.Bind(wx.EVT_MENU, self.handleModule, mitem) self.moduleLookup[id] = item diff --git a/gui/builtinContextMenus/moduleAmmoPicker.py b/gui/builtinContextMenus/moduleAmmoPicker.py index 24250b7de..3e7ee02cd 100644 --- a/gui/builtinContextMenus/moduleAmmoPicker.py +++ b/gui/builtinContextMenus/moduleAmmoPicker.py @@ -98,7 +98,7 @@ class ModuleAmmoPicker(ContextMenu): return map(self.numericConverter, parts) def addCharge(self, menu, charge): - id = wx.NewId() + id = ContextMenu.nextID() name = charge.name if charge is not None else "Empty" self.chargeIds[id] = charge item = wx.MenuItem(menu, id, name) @@ -112,7 +112,7 @@ class ModuleAmmoPicker(ContextMenu): return item def addSeperator(self, m, text): - id = wx.NewId() + id = ContextMenu.nextID() m.Append(id, u'─ %s ─' % text) m.Enable(id, False) diff --git a/gui/builtinContextMenus/tacticalMode.py b/gui/builtinContextMenus/tacticalMode.py index 3469017a8..3b5cc5043 100644 --- a/gui/builtinContextMenus/tacticalMode.py +++ b/gui/builtinContextMenus/tacticalMode.py @@ -26,7 +26,7 @@ class TacticalMode(ContextMenu): def addMode(self, menu, mode): label = mode.item.name.rsplit()[-2] - id = wx.NewId() + id = ContextMenu.nextID() self.modeIds[id] = mode menuItem = wx.MenuItem(menu, id, label, kind=wx.ITEM_RADIO) menu.Bind(wx.EVT_MENU, self.handleMode, menuItem) diff --git a/gui/builtinContextMenus/targetResists.py b/gui/builtinContextMenus/targetResists.py index 4aeb10ffd..c0f9bf00c 100644 --- a/gui/builtinContextMenus/targetResists.py +++ b/gui/builtinContextMenus/targetResists.py @@ -39,7 +39,7 @@ class TargetResists(ContextMenu): wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) def addPattern(self, rootMenu, pattern): - id = wx.NewId() + id = ContextMenu.nextID() name = getattr(pattern, "_name", pattern.name) if pattern is not None else "No Profile" self.patternIds[id] = pattern @@ -89,7 +89,7 @@ class TargetResists(ContextMenu): # Items that have a parent for menuName, patterns in self.subMenus.items(): # Create parent item for root menu that is simply name of parent - item = wx.MenuItem(rootMenu, wx.NewId(), menuName) + item = wx.MenuItem(rootMenu, ContextMenu.nextID(), menuName) # Create menu for child items grandSub = wx.Menu() diff --git a/gui/builtinContextMenus/whProjector.py b/gui/builtinContextMenus/whProjector.py index ac1bb66cb..ba0677e20 100644 --- a/gui/builtinContextMenus/whProjector.py +++ b/gui/builtinContextMenus/whProjector.py @@ -29,7 +29,7 @@ class WhProjector(ContextMenu): sub.AppendItem(subItem) for swData in sorted(effdata[swType], key=lambda tpl: tpl[2]): - wxid = wx.NewId() + wxid = ContextMenu.nextID() swObj, swName, swClass = swData self.idmap[wxid] = (swObj, swName) grandSubItem = wx.MenuItem(grandSub, wxid, swClass) diff --git a/gui/builtinPreferenceViews/pyfaHTMLExportPreferences.py b/gui/builtinPreferenceViews/pyfaHTMLExportPreferences.py index 1701e670b..804577b3e 100644 --- a/gui/builtinPreferenceViews/pyfaHTMLExportPreferences.py +++ b/gui/builtinPreferenceViews/pyfaHTMLExportPreferences.py @@ -18,6 +18,8 @@ class PFHTMLExportPref ( PreferenceView): desc2 = "Enabling automatic exporting will update the HTML file after any change "+\ "to a fit is made. Under certain circumstance, this may cause performance issues." desc3 = "Preferred website to view fits while not using in-game browser can be selected below." + desc4 = "Export Fittings in a minmal HTML Version, just containing the Fittingslinks " +\ + "without any visual styling or javscript features" def populatePanel( self, panel ): self.mainFrame = gui.mainFrame.MainFrame.getInstance() @@ -57,6 +59,17 @@ class PFHTMLExportPref ( PreferenceView): self.exportEnabled.SetValue(self.HTMLExportSettings.getEnabled()) self.exportEnabled.Bind(wx.EVT_CHECKBOX, self.OnExportEnabledChange) mainSizer.Add( self.exportEnabled, 0, wx.ALL|wx.EXPAND, 5 ) + + + + self.stDesc4 = wx.StaticText( panel, wx.ID_ANY, self.desc4, wx.DefaultPosition, wx.DefaultSize, 0 ) + self.stDesc4.Wrap(dlgWidth - 50) + mainSizer.Add( self.stDesc4, 0, wx.ALL, 5 ) + + self.exportMinimal = wx.CheckBox( panel, wx.ID_ANY, u"Enable minimal export Format", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.exportMinimal.SetValue(self.HTMLExportSettings.getMinimalEnabled()) + self.exportMinimal.Bind(wx.EVT_CHECKBOX, self.OnMinimalEnabledChange) + mainSizer.Add( self.exportMinimal, 0, wx.ALL|wx.EXPAND, 5 ) self.stDesc3 = wx.StaticText( panel, wx.ID_ANY, self.desc3, wx.DefaultPosition, wx.DefaultSize, 0 ) self.stDesc3.Wrap(dlgWidth - 50) @@ -93,6 +106,9 @@ class PFHTMLExportPref ( PreferenceView): def OnExportEnabledChange(self, event): self.HTMLExportSettings.setEnabled(self.exportEnabled.GetValue()) + + def OnMinimalEnabledChange(self, event): + self.HTMLExportSettings.setMinimalEnabled(self.exportMinimal.GetValue()) def OnCHWebsiteTypeSelect(self, event): choice = self.chWebsiteType.GetStringSelection() diff --git a/gui/builtinStatsViews/resistancesViewFull.py b/gui/builtinStatsViews/resistancesViewFull.py index 85f9dbd06..55daa813d 100644 --- a/gui/builtinStatsViews/resistancesViewFull.py +++ b/gui/builtinStatsViews/resistancesViewFull.py @@ -168,10 +168,6 @@ class ResistancesViewFull(StatsView): self.showEffective = True wx.PostEvent(self.mainFrame, EffectiveHpToggled(effective=True)) return - elif fit is not None and fit.ID != self.activeFit and not self.showEffective: - self.showEffective = True - wx.PostEvent(self.mainFrame, EffectiveHpToggled(effective=True)) - return self.stEHPs.SetLabel("EHP" if self.showEffective else "HP") self.activeFit = fit.ID if fit is not None else None diff --git a/gui/builtinViewColumns/misc.py b/gui/builtinViewColumns/misc.py index 05c7f9020..0c7f9ef8f 100644 --- a/gui/builtinViewColumns/misc.py +++ b/gui/builtinViewColumns/misc.py @@ -86,7 +86,7 @@ class Miscellanea(ViewColumn): info.append("{0}{1}".format(n, slot[0].upper())) return "+ "+", ".join(info), "Slot Modifiers" elif itemGroup == "Energy Neutralizer": - neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount") + neutAmount = stuff.getModifiedItemAttr("energyNeutralizerAmount") cycleTime = stuff.cycleTime if not neutAmount or not cycleTime: return "", None @@ -210,42 +210,44 @@ class Miscellanea(ViewColumn): ladar = stuff.getModifiedItemAttr("scanLadarStrengthBonus") radar = stuff.getModifiedItemAttr("scanRadarStrengthBonus") magnet = stuff.getModifiedItemAttr("scanMagnetometricStrengthBonus") - if grav is None or ladar is None or radar is None or magnet is None: + displayMax = max(grav, ladar, radar, magnet) + displayMin = min(grav, ladar, radar, magnet) + if grav is None or ladar is None or radar is None or magnet is None or displayMax is None: return "", None - display = max(grav, ladar, radar, magnet) - if not display: - return "", None - text = "{0}".format(formatAmount(display, 3, 0, 3)) - ttEntries = [] - if display == grav: - ttEntries.append("gravimetric") - if display == ladar: - ttEntries.append("ladar") - if display == magnet: - ttEntries.append("magnetometric") - if display == radar: - ttEntries.append("radar") - plu = "" if len(ttEntries) == 1 else "s" - tooltip = "{0} strength{1}".format(formatList(ttEntries), plu).capitalize() + + if displayMax == displayMin or displayMin is None: + text = "{0}".format( + formatAmount(displayMax, 3, 0, 3), + ) + else: + text = "{0} | {1}".format( + formatAmount(displayMax, 3, 0, 3), + formatAmount(displayMin, 3, 0, 3), + ) + tooltip = "ECM Jammer Strength:\n{0} Gravimetric | {1} Ladar | {2} Magnetometric | {3} Radar".format( + formatAmount(grav, 3, 0, 3), + formatAmount(ladar, 3, 0, 3), + formatAmount(radar, 3, 0, 3), + formatAmount(magnet, 3, 0, 3), + ) return text, tooltip elif itemGroup in ("Remote Sensor Booster", "Sensor Booster", "Signal Amplifier"): scanResBonus = stuff.getModifiedItemAttr("scanResolutionBonus") lockRangeBonus = stuff.getModifiedItemAttr("maxTargetRangeBonus") - if scanResBonus is None or lockRangeBonus is None: + gravBonus = stuff.getModifiedItemAttr("scanGravimetricStrengthPercent") + if scanResBonus is None or lockRangeBonus is None or gravBonus is None: return "", None - display = 0 - for bonus in (scanResBonus, lockRangeBonus): - if abs(bonus) > abs(display): - display = bonus - if not display: - return "", None - text = "{0}%".format(formatAmount(display, 3, 0, 3, forceSign=True)) - ttEntries = [] - if display == lockRangeBonus: - ttEntries.append("lock range") - if display == scanResBonus: - ttEntries.append("scan resolution") - tooltip = "{0} bonus".format(formatList(ttEntries)).capitalize() + + text = "{0}% | {1}% | {2}%".format( + formatAmount(scanResBonus, 3, 0, 3), + formatAmount(lockRangeBonus, 3, 0, 3), + formatAmount(gravBonus, 3, 0, 3), + ) + tooltip = "Applied bonuses:\n{0}% scan resolution | {1}% lock range | {2}% sensor strength".format( + formatAmount(scanResBonus, 3, 0, 3), + formatAmount(lockRangeBonus, 3, 0, 3), + formatAmount(gravBonus, 3, 0, 3), + ) return text, tooltip elif itemGroup in ("Projected ECCM", "ECCM", "Sensor Backup Array"): grav = stuff.getModifiedItemAttr("scanGravimetricStrengthPercent") @@ -427,8 +429,8 @@ class Miscellanea(ViewColumn): tooltip = "{0} repaired per second".format(formatList(ttEntries)).capitalize() return text, tooltip elif itemGroup == "Energy Neutralizer Drone": - neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount") - cycleTime = stuff.getModifiedItemAttr("duration") + neutAmount = stuff.getModifiedItemAttr("energyNeutralizerAmount") + cycleTime = stuff.getModifiedItemAttr("energyNeutralizerDuration") if not neutAmount or not cycleTime: return "", None capPerSec = float(-neutAmount) * 1000 / cycleTime @@ -477,10 +479,31 @@ class Miscellanea(ViewColumn): tooltip = "E{0}".format(tooltip) else: hpRatio = 1 + if itemGroup == "Ancillary Armor Repairer": + hpRatio *= 3 ehp = hp * hpRatio duration = cycles * cycleTime / 1000 text = "{0} / {1}s".format(formatAmount(ehp, 3, 0, 9), formatAmount(duration, 3, 0, 3)) + return text, tooltip + elif itemGroup == "Armor Resistance Shift Hardener": + itemArmorResistanceShiftHardenerEM = (1-stuff.getModifiedItemAttr("armorEmDamageResonance"))*100 + itemArmorResistanceShiftHardenerTherm = (1-stuff.getModifiedItemAttr("armorThermalDamageResonance")) * 100 + itemArmorResistanceShiftHardenerKin = (1-stuff.getModifiedItemAttr("armorKineticDamageResonance")) * 100 + itemArmorResistanceShiftHardenerExp = (1-stuff.getModifiedItemAttr("armorExplosiveDamageResonance")) * 100 + + text = "{0}% | {1}% | {2}% | {3}%".format( + formatAmount(itemArmorResistanceShiftHardenerEM, 3, 0, 3), + formatAmount(itemArmorResistanceShiftHardenerTherm, 3, 0, 3), + formatAmount(itemArmorResistanceShiftHardenerKin, 3, 0, 3), + formatAmount(itemArmorResistanceShiftHardenerExp, 3, 0, 3), + ) + tooltip = "Resistances Shifted to Damage Profile:\n{0}% EM | {1}% Therm | {2}% Kin | {3}% Exp".format( + formatAmount(itemArmorResistanceShiftHardenerEM, 3, 0, 3), + formatAmount(itemArmorResistanceShiftHardenerTherm, 3, 0, 3), + formatAmount(itemArmorResistanceShiftHardenerKin, 3, 0, 3), + formatAmount(itemArmorResistanceShiftHardenerExp, 3, 0, 3), + ) return text, tooltip elif stuff.charge is not None: chargeGroup = stuff.charge.group.name diff --git a/gui/builtinViews/entityEditor.py b/gui/builtinViews/entityEditor.py index 112c1c63e..b62060357 100644 --- a/gui/builtinViews/entityEditor.py +++ b/gui/builtinViews/entityEditor.py @@ -98,7 +98,8 @@ class EntityEditor (wx.Panel): dlg.CenterOnParent() if dlg.ShowModal() == wx.ID_OK: - new = self.DoNew(dlg.GetValue().strip()) + # using dlg.textctrl.GetValue instead of simply dlg.GetValue because the proper way does not work in wxPython 2.8 + new = self.DoNew(dlg.txtctrl.GetValue().strip()) self.refreshEntityList(new) wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED)) else: @@ -114,7 +115,7 @@ class EntityEditor (wx.Panel): dlg.CenterOnParent() if dlg.ShowModal() == wx.ID_OK: - copy = self.DoCopy(active, dlg.GetValue().strip()) + copy = self.DoCopy(active, dlg.txtctrl.GetValue().strip()) self.refreshEntityList(copy) wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED)) @@ -128,7 +129,7 @@ class EntityEditor (wx.Panel): dlg.CenterOnParent() if dlg.ShowModal() == wx.ID_OK: - self.DoRename(active, dlg.GetValue().strip()) + self.DoRename(active, dlg.txtctrl.GetValue().strip()) self.refreshEntityList(active) wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED)) diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 206914ac0..4fc49bd2c 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -186,7 +186,7 @@ class FittingView(d.Display): elif data[0] == "cargo": self.swapCargo(x, y, int(data[1])) elif data[0] == "market": - wx.PostEvent(self.mainFrame, gui.marketBrowser.ItemSelected(itemID=int(data[1]))) + self.addModule(x, y, int(data[1])) def handleDrag(self, type, fitID): #Those are drags coming from pyfa sources, NOT builtin wx drags @@ -343,6 +343,20 @@ class FittingView(d.Display): self.slotsChanged() wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.activeFitID)) + def addModule(self, x, y, srcIdx): + '''Add a module from the market browser''' + mstate = wx.GetMouseState() + + dstRow, _ = self.HitTest((x, y)) + if dstRow != -1 and dstRow not in self.blanks: + sFit = service.Fit.getInstance() + fitID = self.mainFrame.getActiveFit() + moduleChanged = sFit.changeModule(fitID, self.mods[dstRow].position, srcIdx) + if moduleChanged is None: + # the new module doesn't fit in specified slot, try to simply append it + wx.PostEvent(self.mainFrame, gui.marketBrowser.ItemSelected(itemID=srcIdx)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit())) + def swapCargo(self, x, y, srcIdx): '''Swap a module from cargo to fitting window''' mstate = wx.GetMouseState() diff --git a/gui/characterEditor.py b/gui/characterEditor.py index 862660fbb..bf7db18bf 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -37,14 +37,14 @@ class CharacterTextValidor(BaseValidator): return CharacterTextValidor() def Validate(self, win): - profileEditor = win.Parent + entityEditor = win.parent textCtrl = self.GetWindow() text = textCtrl.GetValue().strip() try: if len(text) == 0: raise ValueError("You must supply a name for the Character!") - elif text in [x.name for x in profileEditor.entityEditor.choices]: + elif text in [x.name for x in entityEditor.choices]: raise ValueError("Character name already in use, please choose another.") return True diff --git a/gui/contextMenu.py b/gui/contextMenu.py index 4ed09f9c1..61823ff3a 100644 --- a/gui/contextMenu.py +++ b/gui/contextMenu.py @@ -18,9 +18,14 @@ #=============================================================================== import wx +import logging + +logger = logging.getLogger(__name__) class ContextMenu(object): menus = [] + _ids = [] #[wx.NewId() for x in xrange(200)] # init with decent amount + _idxid = -1 @classmethod def register(cls): @@ -44,6 +49,8 @@ class ContextMenu(object): (('marketItemGroup', 'Implant'),) (('fittingShip', 'Ship'),) """ + cls._idxid = -1 + debug_start = len(cls._ids) rootMenu = wx.Menu() rootMenu.info = {} @@ -68,7 +75,7 @@ class ContextMenu(object): bitmap = m.getBitmap(srcContext, selection) multiple = not isinstance(bitmap, wx.Bitmap) for it, text in enumerate(texts): - id = wx.NewId() + id = cls.nextID() rootItem = wx.MenuItem(rootMenu, id, text) rootMenu.info[id] = (m, fullContext, it) @@ -109,6 +116,10 @@ class ContextMenu(object): if amount > 0 and i != len(fullContexts) - 1: rootMenu.AppendSeparator() + debug_end = len(cls._ids) + if (debug_end - debug_start): + logger.debug("%d new IDs created for this menu" % (debug_end - debug_start)) + return rootMenu if empty is False else None @classmethod @@ -134,6 +145,22 @@ class ContextMenu(object): def getSubMenu(self, context, selection, rootMenu, i, pitem): return None + @classmethod + def nextID(cls): + """ + Fetches an ID from the pool of IDs allocated to Context Menu. + If we don't have enough ID's to fulfill request, create new + ID and add it to the pool. + + See GH Issue #589 + """ + cls._idxid += 1 + + if cls._idxid >= len(cls._ids): # We don't ahve an ID for this index, create one + cls._ids.append(wx.NewId()) + + return cls._ids[cls._idxid] + def getText(self, context, selection): """ getText should be implemented in child classes, and should return either diff --git a/gui/crestFittings.py b/gui/crestFittings.py index 2348b6866..0b2cf54cf 100644 --- a/gui/crestFittings.py +++ b/gui/crestFittings.py @@ -254,13 +254,20 @@ class ExportToEve(wx.Frame): return self.charChoice.GetClientData(selection) if selection is not None else None def exportFitting(self, event): + sFit = service.Fit.getInstance() + fitID = self.mainFrame.getActiveFit() + self.statusbar.SetStatusText("", 0) + + if fitID is None: + self.statusbar.SetStatusText("Please select an active fitting in the main window", 1) + return + self.statusbar.SetStatusText("Sending request and awaiting response", 1) sCrest = service.Crest.getInstance() try: - sFit = service.Fit.getInstance() - data = sFit.exportCrest(self.mainFrame.getActiveFit()) + data = sFit.exportCrest(fitID) res = sCrest.postFitting(self.getActiveCharacter(), data) self.statusbar.SetStatusText("%d: %s"%(res.status_code, res.reason), 0) diff --git a/gui/itemStats.py b/gui/itemStats.py index 45ebfff7b..d3388e978 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -84,9 +84,9 @@ class ItemStatsDialog(wx.Dialog): self.SetMinSize((300, 200)) if "wxGTK" in wx.PlatformInfo: # GTK has huge tab widgets, give it a bit more room - self.SetSize((530, 300)) + self.SetSize((580, 500)) else: - self.SetSize((500, 300)) + self.SetSize((550, 500)) #self.SetMaxSize((500, -1)) self.mainSizer = wx.BoxSizer(wx.VERTICAL) self.container = ItemStatsContainer(self, victim, item, itmContext) @@ -150,6 +150,8 @@ class ItemStatsContainer ( wx.Panel ): def __init__( self, parent, stuff, item, context = None): wx.Panel.__init__ ( self, parent ) + sMkt = service.Market.getInstance() + mainSizer = wx.BoxSizer( wx.VERTICAL ) self.nbContainer = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 ) @@ -165,6 +167,11 @@ class ItemStatsContainer ( wx.Panel ): self.params = ItemParams(self.nbContainer, stuff, item, context) self.nbContainer.AddPage(self.params, "Attributes") + items = sMkt.getVariationsByItems([item]) + if len(items) > 1: + self.compare = ItemCompare(self.nbContainer, stuff, item, items, context) + self.nbContainer.AddPage(self.compare, "Compare") + self.reqs = ItemRequirements(self.nbContainer, stuff, item) self.nbContainer.AddPage(self.reqs, "Requirements") @@ -341,9 +348,14 @@ class ItemParams (wx.Panel): def PopulateList(self): self.paramList.InsertColumn(0,"Attribute") - self.paramList.InsertColumn(1,"Value") - self.paramList.SetColumnWidth(1,150) - self.paramList.setResizeColumn(1) + self.paramList.InsertColumn(1,"Current Value") + if self.stuff is not None: + self.paramList.InsertColumn(2,"Base Value") + self.paramList.SetColumnWidth(0,110) + self.paramList.SetColumnWidth(1,90) + if self.stuff is not None: + self.paramList.SetColumnWidth(2,90) + self.paramList.setResizeColumn(0) self.imageList = wx.ImageList(16, 16) self.paramList.SetImageList(self.imageList,wx.IMAGE_LIST_SMALL) @@ -354,9 +366,11 @@ class ItemParams (wx.Panel): idCount = 0 for name in names: info = self.attrInfo.get(name) - - att = self.attrValues[name] + + valDefault = getattr(info, "value", None) + valueDefault = valDefault if valDefault is not None else att + val = getattr(att, "value", None) value = val if val is not None else att @@ -378,9 +392,9 @@ class ItemParams (wx.Panel): attrIcon = self.imageList.Add(icon) else: - attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons")) + attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons")) else: - attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons")) + attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons")) index = self.paramList.InsertImageStringItem(sys.maxint, attrName, attrIcon) @@ -395,8 +409,16 @@ class ItemParams (wx.Panel): else: valueUnit = formatAmount(value, 3, 0, 0) + if self.toggleView != 1: + valueUnitDefault = str(valueDefault) + elif info and info.unit: + valueUnitDefault = self.TranslateValueUnit(valueDefault, info.unit.displayName, info.unit.name) + else: + valueUnitDefault = formatAmount(valueDefault, 3, 0, 0) self.paramList.SetStringItem(index, 1, valueUnit) + if self.stuff is not None: + self.paramList.SetStringItem(index, 2, valueUnitDefault) @@ -444,6 +466,159 @@ class ItemParams (wx.Panel): else: return "%s %s" % (formatAmount(value, 3, 0),unitName) +class ItemCompare(wx.Panel): + def __init__(self, parent, stuff, item, items, context=None): + wx.Panel.__init__(self, parent) + mainSizer = wx.BoxSizer(wx.VERTICAL) + + self.paramList = AutoListCtrl(self, wx.ID_ANY, + style= # wx.LC_HRULES | + # wx.LC_NO_HEADER | + wx.LC_REPORT | wx.LC_SINGLE_SEL | wx.LC_VRULES | wx.NO_BORDER) + mainSizer.Add(self.paramList, 1, wx.ALL | wx.EXPAND, 0) + self.SetSizer(mainSizer) + + self.toggleView = 1 + self.stuff = stuff + self.item = item + self.items = sorted(items, key=lambda x: x.attributes['metaLevel'].value if 'metaLevel' in x.attributes else None) + self.attrs = {} + + # get a dict of attrName: attrInfo of all unique attributes across all items + for item in self.items: + for attr in item.attributes.keys(): + if item.attributes[attr].info.displayName: + self.attrs[attr] = item.attributes[attr].info + + # Process attributes for items and find ones that differ + for attr in self.attrs.keys(): + value = None + + for item in self.items: + # we can automatically break here if this item doesn't have the attribute, + # as that means at least one item did + if attr not in item.attributes: + break + + # this is the first attribute for the item set, set the initial value + if value is None: + value = item.attributes[attr].value + continue + + if attr not in item.attributes or item.attributes[attr].value != value: + break + else: + # attribute values were all the same, delete + del self.attrs[attr] + + self.m_staticline = wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, + wx.LI_HORIZONTAL) + mainSizer.Add(self.m_staticline, 0, wx.EXPAND) + bSizer = wx.BoxSizer(wx.HORIZONTAL) + + self.totalAttrsLabel = wx.StaticText(self, wx.ID_ANY, u" ", wx.DefaultPosition, wx.DefaultSize, 0) + bSizer.Add(self.totalAttrsLabel, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT) + + self.toggleViewBtn = wx.ToggleButton(self, wx.ID_ANY, u"Toggle view mode", wx.DefaultPosition, + wx.DefaultSize, 0) + bSizer.Add(self.toggleViewBtn, 0, wx.ALIGN_CENTER_VERTICAL) + + if stuff is not None: + self.refreshBtn = wx.Button(self, wx.ID_ANY, u"Refresh", wx.DefaultPosition, wx.DefaultSize, + wx.BU_EXACTFIT) + bSizer.Add(self.refreshBtn, 0, wx.ALIGN_CENTER_VERTICAL) + self.refreshBtn.Bind(wx.EVT_BUTTON, self.RefreshValues) + + mainSizer.Add(bSizer, 0, wx.ALIGN_RIGHT) + + self.PopulateList() + + self.toggleViewBtn.Bind(wx.EVT_TOGGLEBUTTON, self.ToggleViewMode) + + def UpdateList(self): + self.Freeze() + self.paramList.ClearAll() + self.PopulateList() + self.Thaw() + self.paramList.resizeLastColumn(100) + + def RefreshValues(self, event): + self.UpdateList() + event.Skip() + + def ToggleViewMode(self, event): + self.toggleView *= -1 + self.UpdateList() + event.Skip() + + def PopulateList(self): + self.paramList.InsertColumn(0, "Item") + self.paramList.SetColumnWidth(0, 200) + + for i, attr in enumerate(self.attrs.keys()): + name = self.attrs[attr].displayName if self.attrs[attr].displayName else attr + self.paramList.InsertColumn(i+1, name) + self.paramList.SetColumnWidth(i+1, 120) + + for item in self.items: + i = self.paramList.InsertStringItem(sys.maxint, item.name) + for x, attr in enumerate(self.attrs.keys()): + if attr in item.attributes: + info = self.attrs[attr] + value = item.attributes[attr].value + if self.toggleView != 1: + valueUnit = str(value) + if info and info.unit: + valueUnit = self.TranslateValueUnit(value, info.unit.displayName, info.unit.name) + else: + valueUnit = formatAmount(value, 3, 0, 0) + + self.paramList.SetStringItem(i, x+1, valueUnit) + + self.paramList.RefreshRows() + self.Layout() + + def TranslateValueUnit(self, value, unitName, unitDisplayName): + def itemIDCallback(): + item = service.Market.getInstance().getItem(value) + return "%s (%d)" % (item.name, value) if item is not None else str(value) + + def groupIDCallback(): + group = service.Market.getInstance().getGroup(value) + return "%s (%d)" % (group.name, value) if group is not None else str(value) + + def attributeIDCallback(): + attribute = service.Attribute.getInstance().getAttributeInfo(value) + return "%s (%d)" % (attribute.name.capitalize(), value) + + trans = {"Inverse Absolute Percent": (lambda: (1 - value) * 100, unitName), + "Inversed Modifier Percent": (lambda: (1 - value) * 100, unitName), + "Modifier Percent": ( + lambda: ("%+.2f" if ((value - 1) * 100) % 1 else "%+d") % ((value - 1) * 100), unitName), + "Volume": (lambda: value, u"m\u00B3"), + "Sizeclass": (lambda: value, ""), + "Absolute Percent": (lambda: (value * 100), unitName), + "Milliseconds": (lambda: value / 1000.0, unitName), + "typeID": (itemIDCallback, ""), + "groupID": (groupIDCallback, ""), + "attributeID": (attributeIDCallback, "")} + + override = trans.get(unitDisplayName) + if override is not None: + + if type(override[0]()) == type(str()): + fvalue = override[0]() + else: + v = override[0]() + if isinstance(v, (int, float, long)): + fvalue = formatAmount(v, 3, 0, 0) + else: + fvalue = v + return "%s %s" % (fvalue, override[1]) + else: + return "%s %s" % (formatAmount(value, 3, 0), unitName) + + ########################################################################### ## Class ItemRequirements ########################################################################### @@ -783,9 +958,9 @@ class ItemAffectedBy (wx.Panel): icon = BitmapLoader.getBitmap("transparent16x16", "gui") attrIcon = self.imageList.Add(icon) else: - attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons")) + attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons")) else: - attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons")) + attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons")) if self.showRealNames: display = attrName @@ -942,9 +1117,9 @@ class ItemAffectedBy (wx.Panel): attrIcon = self.imageList.Add(icon) else: - attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons")) + attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons")) else: - attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons")) + attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons")) if attrModifier == "s*": attrModifier = "*" diff --git a/gui/mainFrame.py b/gui/mainFrame.py index db3d8104c..c209a0422 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -61,6 +61,7 @@ from gui.builtinViews import * # import this to access override setting from eos.modifiedAttributeDict import ModifiedAttributeDict +from eos.db.saveddata.loadDefaultDatabaseValues import DefaultDatabaseValues from time import gmtime, strftime @@ -405,10 +406,20 @@ class MainFrame(wx.Frame): def goForums(self, event): webbrowser.open('https://forums.eveonline.com/default.aspx?g=posts&t=466425') + def loadDatabaseDefaults(self, event): + # Import values that must exist otherwise Pyfa breaks + DefaultDatabaseValues.importRequiredDefaults() + # Import default values for damage profiles + DefaultDatabaseValues.importDamageProfileDefaults() + # Import default values for target resist profiles + DefaultDatabaseValues.importResistProfileDefaults() + def registerMenu(self): menuBar = self.GetMenuBar() # Quit self.Bind(wx.EVT_MENU, self.ExitApp, id=wx.ID_EXIT) + # Load Default Database values + self.Bind(wx.EVT_MENU, self.loadDatabaseDefaults, id=menuBar.importDatabaseDefaultsId) # Widgets Inspector if config.debug: self.Bind(wx.EVT_MENU, self.openWXInspectTool, id = self.widgetInspectMenuID) diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index e8c3cb614..287866909 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -49,6 +49,7 @@ class MainMenuBar(wx.MenuBar): self.ssoLoginId = wx.NewId() self.attrEditorId = wx.NewId() self.toggleOverridesId = wx.NewId() + self.importDatabaseDefaultsId = wx.NewId() if 'wxMac' in wx.PlatformInfo and wx.VERSION >= (3,0): wx.ID_COPY = wx.NewId() @@ -136,12 +137,11 @@ class MainMenuBar(wx.MenuBar): self.Enable(self.exportToEveId, False) if not gui.mainFrame.disableOverrideEditor: + windowMenu.AppendSeparator() attrItem = wx.MenuItem(windowMenu, self.attrEditorId, "Attribute Overrides\tCTRL+B") attrItem.SetBitmap(BitmapLoader.getBitmap("fit_rename_small", "gui")) windowMenu.AppendItem(attrItem) - - editMenu.AppendSeparator() - editMenu.Append(self.toggleOverridesId, "Turn Overrides On") + windowMenu.Append(self.toggleOverridesId, "Turn Overrides On") # Help menu helpMenu = wx.Menu() @@ -149,6 +149,8 @@ class MainMenuBar(wx.MenuBar): helpMenu.Append(self.wikiId, "Wiki", "Go to wiki on GitHub") helpMenu.Append(self.forumId, "Forums", "Go to EVE Online Forum thread") helpMenu.AppendSeparator() + helpMenu.Append(self.importDatabaseDefaultsId, "Import D&atabase Defaults", "Imports missing database defaults") + helpMenu.AppendSeparator() helpMenu.Append(wx.ID_ABOUT) if config.debug: diff --git a/gui/patternEditor.py b/gui/patternEditor.py index 46837ad28..171eed7a5 100644 --- a/gui/patternEditor.py +++ b/gui/patternEditor.py @@ -36,14 +36,14 @@ class DmgPatternTextValidor(BaseValidator): return DmgPatternTextValidor() def Validate(self, win): - profileEditor = win.Parent + entityEditor = win.parent textCtrl = self.GetWindow() text = textCtrl.GetValue().strip() try: if len(text) == 0: raise ValueError("You must supply a name for your Damage Profile!") - elif text in [x.name for x in profileEditor.entityEditor.choices]: + elif text in [x.name for x in entityEditor.choices]: raise ValueError("Damage Profile name already in use, please choose another.") return True @@ -239,7 +239,7 @@ class DmgPatternEditorDlg(wx.Dialog): for field in self.DAMAGE_TYPES: edit = getattr(self, "%sEdit" % field) - amount = getattr(p, "%sAmount" % field) + amount = int(round(getattr(p, "%sAmount" % field))) edit.SetValue(amount) self.block = False diff --git a/gui/resistsEditor.py b/gui/resistsEditor.py index 097b8ad9d..37d04b032 100644 --- a/gui/resistsEditor.py +++ b/gui/resistsEditor.py @@ -33,14 +33,14 @@ class TargetResistsTextValidor(BaseValidator): return TargetResistsTextValidor() def Validate(self, win): - profileEditor = win.parent.Parent + entityEditor = win.parent textCtrl = self.GetWindow() text = textCtrl.GetValue().strip() try: if len(text) == 0: raise ValueError("You must supply a name for your Target Resist Profile!") - elif text in [x.name for x in profileEditor.entityEditor.choices]: + elif text in [x.name for x in entityEditor.choices]: raise ValueError("Target Resist Profile name already in use, please choose another.") return True diff --git a/gui/setEditor.py b/gui/setEditor.py index 4e8baa9ed..84090f6ff 100644 --- a/gui/setEditor.py +++ b/gui/setEditor.py @@ -36,14 +36,14 @@ class ImplantTextValidor(BaseValidator): return ImplantTextValidor() def Validate(self, win): - profileEditor = win.parent.Parent + entityEditor = win.parent textCtrl = self.GetWindow() text = textCtrl.GetValue().strip() try: if len(text) == 0: raise ValueError("You must supply a name for the Implant Set!") - elif text in [x.name for x in profileEditor.entityEditor.choices]: + elif text in [x.name for x in entityEditor.choices]: raise ValueError("Imlplant Set name already in use, please choose another.") return True diff --git a/gui/utils/exportHtml.py b/gui/utils/exportHtml.py index 8de0f35eb..e3338774e 100644 --- a/gui/utils/exportHtml.py +++ b/gui/utils/exportHtml.py @@ -46,12 +46,36 @@ class exportHtmlThread(threading.Thread): timestamp = time.localtime(time.time()) localDate = "%d/%02d/%02d %02d:%02d" % (timestamp[0], timestamp[1], timestamp[2], timestamp[3], timestamp[4]) + minimal = settings.getMinimalEnabled(); website = settings.getWebsite() if website == "o.smium.org": dnaUrl = "https://o.smium.org/loadout/dna/" elif website == "null-sec.com": dnaUrl = "https://null-sec.com/hangar/?dna=" + + if minimal: + HTML = self.generateMinimalHTML(sMkt,sFit, dnaUrl) + else: + HTML = self.generateFullHTML(sMkt,sFit, dnaUrl) + try: + FILE = open(settings.getPath(), "w") + FILE.write(HTML.encode('utf-8')) + FILE.close() + except IOError: + print "Failed to write to " + settings.getPath() + pass + + if self.callback: + wx.CallAfter(self.callback, -1) + + + + def generateFullHTML(self,sMkt,sFit,dnaUrl): + """ Generate the complete HTML with styling and javascript """ + timestamp = time.localtime(time.time()) + localDate = "%d/%02d/%02d %02d:%02d" % (timestamp[0], timestamp[1], timestamp[2], timestamp[3], timestamp[4]) + HTML = """ @@ -130,7 +154,7 @@ class exportHtmlThread(threading.Thread): $('a[data-dna]').each(function( index ) { var dna = $(this).data('dna'); if (typeof CCPEVE !== 'undefined') { // inside IGB - $(this).attr('href', 'javascript:CCPEVE.showFitting("'+dna+'");'); } + $(this).attr('href', 'javascript:CCPEVE.showFitting("'+dna+'");');} else { // outside IGB $(this).attr('href', '%s'+dna); } }); @@ -217,16 +241,46 @@ class exportHtmlThread(threading.Thread): -""" +""" - try: - FILE = open(settings.getPath(), "w") - FILE.write(HTML.encode('utf-8')) - FILE.close() - except IOError: - print "Failed to write to " + settings.getPath() - pass - if self.callback: - wx.CallAfter(self.callback, -1) + return HTML + + + + + def generateMinimalHTML(self,sMkt,sFit,dnaUrl): + """ Generate a minimal HTML version of the fittings, without any javascript or styling""" + categoryList = list(sMkt.getShipRoot()) + categoryList.sort(key=lambda ship: ship.name) + count = 0 + HTML = '' + for group in categoryList: + # init market group string to give ships something to attach to + + + ships = list(sMkt.getShipList(group.ID)) + ships.sort(key=lambda ship: ship.name) + + ships.sort(key=lambda ship: ship.name) + + for ship in ships: + fits = sFit.getFitsWithShip(ship.ID) + for fit in fits: + if self.stopRunning: + return + try: + dnaFit = sFit.exportDna(fit[0]) + HTML += 'IGB' +\ + ' / OOGB '+ship.name +': '+ fit[1]+ '
\n' + except: + continue + finally: + if self.callback: + wx.CallAfter(self.callback, count) + count += 1 + return HTML; + + + diff --git a/imgs/icons/03_11.png b/imgs/icons/03_11.png deleted file mode 100644 index 98f8bd62f..000000000 Binary files a/imgs/icons/03_11.png and /dev/null differ diff --git a/imgs/icons/11_04.png b/imgs/icons/11_4.png similarity index 100% rename from imgs/icons/11_04.png rename to imgs/icons/11_4.png diff --git a/imgs/icons/11_05.png b/imgs/icons/11_5.png similarity index 100% rename from imgs/icons/11_05.png rename to imgs/icons/11_5.png diff --git a/imgs/icons/12_04.png b/imgs/icons/12_4.png similarity index 100% rename from imgs/icons/12_04.png rename to imgs/icons/12_4.png diff --git a/imgs/icons/12_06.png b/imgs/icons/12_6.png similarity index 100% rename from imgs/icons/12_06.png rename to imgs/icons/12_6.png diff --git a/imgs/icons/12_07.png b/imgs/icons/12_7.png similarity index 100% rename from imgs/icons/12_07.png rename to imgs/icons/12_7.png diff --git a/imgs/icons/12_08.png b/imgs/icons/12_8.png similarity index 100% rename from imgs/icons/12_08.png rename to imgs/icons/12_8.png diff --git a/imgs/icons/12_09.png b/imgs/icons/12_9.png similarity index 100% rename from imgs/icons/12_09.png rename to imgs/icons/12_9.png diff --git a/imgs/icons/13_01.png b/imgs/icons/13_1.png similarity index 100% rename from imgs/icons/13_01.png rename to imgs/icons/13_1.png diff --git a/imgs/icons/13_02.png b/imgs/icons/13_2.png similarity index 100% rename from imgs/icons/13_02.png rename to imgs/icons/13_2.png diff --git a/imgs/icons/13_03.png b/imgs/icons/13_3.png similarity index 100% rename from imgs/icons/13_03.png rename to imgs/icons/13_3.png diff --git a/imgs/icons/13_04.png b/imgs/icons/13_4.png similarity index 100% rename from imgs/icons/13_04.png rename to imgs/icons/13_4.png diff --git a/imgs/icons/13_05.png b/imgs/icons/13_5.png similarity index 100% rename from imgs/icons/13_05.png rename to imgs/icons/13_5.png diff --git a/imgs/icons/13_06.png b/imgs/icons/13_6.png similarity index 100% rename from imgs/icons/13_06.png rename to imgs/icons/13_6.png diff --git a/imgs/icons/13_07.png b/imgs/icons/13_7.png similarity index 100% rename from imgs/icons/13_07.png rename to imgs/icons/13_7.png diff --git a/imgs/icons/13_08.png b/imgs/icons/13_8.png similarity index 100% rename from imgs/icons/13_08.png rename to imgs/icons/13_8.png diff --git a/imgs/icons/13_09.png b/imgs/icons/13_9.png similarity index 100% rename from imgs/icons/13_09.png rename to imgs/icons/13_9.png diff --git a/imgs/icons/14_01.png b/imgs/icons/14_1.png similarity index 100% rename from imgs/icons/14_01.png rename to imgs/icons/14_1.png diff --git a/imgs/icons/14_02.png b/imgs/icons/14_2.png similarity index 100% rename from imgs/icons/14_02.png rename to imgs/icons/14_2.png diff --git a/imgs/icons/14_03.png b/imgs/icons/14_3.png similarity index 100% rename from imgs/icons/14_03.png rename to imgs/icons/14_3.png diff --git a/imgs/icons/14_04.png b/imgs/icons/14_4.png similarity index 100% rename from imgs/icons/14_04.png rename to imgs/icons/14_4.png diff --git a/imgs/icons/14_05.png b/imgs/icons/14_5.png similarity index 100% rename from imgs/icons/14_05.png rename to imgs/icons/14_5.png diff --git a/imgs/icons/14_06.png b/imgs/icons/14_6.png similarity index 100% rename from imgs/icons/14_06.png rename to imgs/icons/14_6.png diff --git a/imgs/icons/14_07.png b/imgs/icons/14_7.png similarity index 100% rename from imgs/icons/14_07.png rename to imgs/icons/14_7.png diff --git a/imgs/icons/14_08.png b/imgs/icons/14_8.png similarity index 100% rename from imgs/icons/14_08.png rename to imgs/icons/14_8.png diff --git a/imgs/icons/14_09.png b/imgs/icons/14_9.png similarity index 100% rename from imgs/icons/14_09.png rename to imgs/icons/14_9.png diff --git a/imgs/icons/15_01.png b/imgs/icons/15_1.png similarity index 100% rename from imgs/icons/15_01.png rename to imgs/icons/15_1.png diff --git a/imgs/icons/15_02.png b/imgs/icons/15_2.png similarity index 100% rename from imgs/icons/15_02.png rename to imgs/icons/15_2.png diff --git a/imgs/icons/15_03.png b/imgs/icons/15_3.png similarity index 100% rename from imgs/icons/15_03.png rename to imgs/icons/15_3.png diff --git a/imgs/icons/15_04.png b/imgs/icons/15_4.png similarity index 100% rename from imgs/icons/15_04.png rename to imgs/icons/15_4.png diff --git a/imgs/icons/15_05.png b/imgs/icons/15_5.png similarity index 100% rename from imgs/icons/15_05.png rename to imgs/icons/15_5.png diff --git a/imgs/icons/15_06.png b/imgs/icons/15_6.png similarity index 100% rename from imgs/icons/15_06.png rename to imgs/icons/15_6.png diff --git a/imgs/icons/15_07.png b/imgs/icons/15_7.png similarity index 100% rename from imgs/icons/15_07.png rename to imgs/icons/15_7.png diff --git a/imgs/icons/15_08.png b/imgs/icons/15_8.png similarity index 100% rename from imgs/icons/15_08.png rename to imgs/icons/15_8.png diff --git a/imgs/icons/15_09.png b/imgs/icons/15_9.png similarity index 100% rename from imgs/icons/15_09.png rename to imgs/icons/15_9.png diff --git a/imgs/icons/16_01.png b/imgs/icons/16_1.png similarity index 100% rename from imgs/icons/16_01.png rename to imgs/icons/16_1.png diff --git a/imgs/icons/16_02.png b/imgs/icons/16_2.png similarity index 100% rename from imgs/icons/16_02.png rename to imgs/icons/16_2.png diff --git a/imgs/icons/16_03.png b/imgs/icons/16_3.png similarity index 100% rename from imgs/icons/16_03.png rename to imgs/icons/16_3.png diff --git a/imgs/icons/16_04.png b/imgs/icons/16_4.png similarity index 100% rename from imgs/icons/16_04.png rename to imgs/icons/16_4.png diff --git a/imgs/icons/16_05.png b/imgs/icons/16_5.png similarity index 100% rename from imgs/icons/16_05.png rename to imgs/icons/16_5.png diff --git a/imgs/icons/16_06.png b/imgs/icons/16_6.png similarity index 100% rename from imgs/icons/16_06.png rename to imgs/icons/16_6.png diff --git a/imgs/icons/16_07.png b/imgs/icons/16_7.png similarity index 100% rename from imgs/icons/16_07.png rename to imgs/icons/16_7.png diff --git a/imgs/icons/16_08.png b/imgs/icons/16_8.png similarity index 100% rename from imgs/icons/16_08.png rename to imgs/icons/16_8.png diff --git a/imgs/icons/16_09.png b/imgs/icons/16_9.png similarity index 100% rename from imgs/icons/16_09.png rename to imgs/icons/16_9.png diff --git a/imgs/icons/01_01.png b/imgs/icons/1_1.png similarity index 100% rename from imgs/icons/01_01.png rename to imgs/icons/1_1.png diff --git a/imgs/icons/01_10.png b/imgs/icons/1_10.png similarity index 100% rename from imgs/icons/01_10.png rename to imgs/icons/1_10.png diff --git a/imgs/icons/01_11.png b/imgs/icons/1_11.png similarity index 100% rename from imgs/icons/01_11.png rename to imgs/icons/1_11.png diff --git a/imgs/icons/01_13.png b/imgs/icons/1_13.png similarity index 100% rename from imgs/icons/01_13.png rename to imgs/icons/1_13.png diff --git a/imgs/icons/01_15.png b/imgs/icons/1_15.png similarity index 100% rename from imgs/icons/01_15.png rename to imgs/icons/1_15.png diff --git a/imgs/icons/01_16.png b/imgs/icons/1_16.png similarity index 100% rename from imgs/icons/01_16.png rename to imgs/icons/1_16.png diff --git a/imgs/icons/01_02.png b/imgs/icons/1_2.png similarity index 100% rename from imgs/icons/01_02.png rename to imgs/icons/1_2.png diff --git a/imgs/icons/01_03.png b/imgs/icons/1_3.png similarity index 100% rename from imgs/icons/01_03.png rename to imgs/icons/1_3.png diff --git a/imgs/icons/01_04.png b/imgs/icons/1_4.png similarity index 100% rename from imgs/icons/01_04.png rename to imgs/icons/1_4.png diff --git a/imgs/icons/01_05.png b/imgs/icons/1_5.png similarity index 100% rename from imgs/icons/01_05.png rename to imgs/icons/1_5.png diff --git a/imgs/icons/01_06.png b/imgs/icons/1_6.png similarity index 100% rename from imgs/icons/01_06.png rename to imgs/icons/1_6.png diff --git a/imgs/icons/01_07.png b/imgs/icons/1_7.png similarity index 100% rename from imgs/icons/01_07.png rename to imgs/icons/1_7.png diff --git a/imgs/icons/01_08.png b/imgs/icons/1_8.png similarity index 100% rename from imgs/icons/01_08.png rename to imgs/icons/1_8.png diff --git a/imgs/icons/01_09.png b/imgs/icons/1_9.png similarity index 100% rename from imgs/icons/01_09.png rename to imgs/icons/1_9.png diff --git a/imgs/icons/20_01.png b/imgs/icons/20_1.png similarity index 100% rename from imgs/icons/20_01.png rename to imgs/icons/20_1.png diff --git a/imgs/icons/20_02.png b/imgs/icons/20_2.png similarity index 100% rename from imgs/icons/20_02.png rename to imgs/icons/20_2.png diff --git a/imgs/icons/20_03.png b/imgs/icons/20_3.png similarity index 100% rename from imgs/icons/20_03.png rename to imgs/icons/20_3.png diff --git a/imgs/icons/20_04.png b/imgs/icons/20_4.png similarity index 100% rename from imgs/icons/20_04.png rename to imgs/icons/20_4.png diff --git a/imgs/icons/20_05.png b/imgs/icons/20_5.png similarity index 100% rename from imgs/icons/20_05.png rename to imgs/icons/20_5.png diff --git a/imgs/icons/20_06.png b/imgs/icons/20_6.png similarity index 100% rename from imgs/icons/20_06.png rename to imgs/icons/20_6.png diff --git a/imgs/icons/20_07.png b/imgs/icons/20_7.png similarity index 100% rename from imgs/icons/20_07.png rename to imgs/icons/20_7.png diff --git a/imgs/icons/20_08.png b/imgs/icons/20_8.png similarity index 100% rename from imgs/icons/20_08.png rename to imgs/icons/20_8.png diff --git a/imgs/icons/20_09.png b/imgs/icons/20_9.png similarity index 100% rename from imgs/icons/20_09.png rename to imgs/icons/20_9.png diff --git a/imgs/icons/21_01.png b/imgs/icons/21_1.png similarity index 100% rename from imgs/icons/21_01.png rename to imgs/icons/21_1.png diff --git a/imgs/icons/21_02.png b/imgs/icons/21_2.png similarity index 100% rename from imgs/icons/21_02.png rename to imgs/icons/21_2.png diff --git a/imgs/icons/21_03.png b/imgs/icons/21_3.png similarity index 100% rename from imgs/icons/21_03.png rename to imgs/icons/21_3.png diff --git a/imgs/icons/21_05.png b/imgs/icons/21_5.png similarity index 100% rename from imgs/icons/21_05.png rename to imgs/icons/21_5.png diff --git a/imgs/icons/21_06.png b/imgs/icons/21_6.png similarity index 100% rename from imgs/icons/21_06.png rename to imgs/icons/21_6.png diff --git a/imgs/icons/21_07.png b/imgs/icons/21_7.png similarity index 100% rename from imgs/icons/21_07.png rename to imgs/icons/21_7.png diff --git a/imgs/icons/21_09.png b/imgs/icons/21_9.png similarity index 100% rename from imgs/icons/21_09.png rename to imgs/icons/21_9.png diff --git a/imgs/icons/22_01.png b/imgs/icons/22_1.png similarity index 100% rename from imgs/icons/22_01.png rename to imgs/icons/22_1.png diff --git a/imgs/icons/22_02.png b/imgs/icons/22_2.png similarity index 100% rename from imgs/icons/22_02.png rename to imgs/icons/22_2.png diff --git a/imgs/icons/22_03.png b/imgs/icons/22_3.png similarity index 100% rename from imgs/icons/22_03.png rename to imgs/icons/22_3.png diff --git a/imgs/icons/22_04.png b/imgs/icons/22_4.png similarity index 100% rename from imgs/icons/22_04.png rename to imgs/icons/22_4.png diff --git a/imgs/icons/22_05.png b/imgs/icons/22_5.png similarity index 100% rename from imgs/icons/22_05.png rename to imgs/icons/22_5.png diff --git a/imgs/icons/22_06.png b/imgs/icons/22_6.png similarity index 100% rename from imgs/icons/22_06.png rename to imgs/icons/22_6.png diff --git a/imgs/icons/22_07.png b/imgs/icons/22_7.png similarity index 100% rename from imgs/icons/22_07.png rename to imgs/icons/22_7.png diff --git a/imgs/icons/22_09.png b/imgs/icons/22_9.png similarity index 100% rename from imgs/icons/22_09.png rename to imgs/icons/22_9.png diff --git a/imgs/icons/25_04.png b/imgs/icons/25_4.png similarity index 100% rename from imgs/icons/25_04.png rename to imgs/icons/25_4.png diff --git a/imgs/icons/26_01.png b/imgs/icons/26_1.png similarity index 100% rename from imgs/icons/26_01.png rename to imgs/icons/26_1.png diff --git a/imgs/icons/27_05.png b/imgs/icons/27_5.png similarity index 100% rename from imgs/icons/27_05.png rename to imgs/icons/27_5.png diff --git a/imgs/icons/27_09.png b/imgs/icons/27_9.png similarity index 100% rename from imgs/icons/27_09.png rename to imgs/icons/27_9.png diff --git a/imgs/icons/02_10.png b/imgs/icons/2_10.png similarity index 100% rename from imgs/icons/02_10.png rename to imgs/icons/2_10.png diff --git a/imgs/icons/02_11.png b/imgs/icons/2_11.png similarity index 100% rename from imgs/icons/02_11.png rename to imgs/icons/2_11.png diff --git a/imgs/icons/02_12.png b/imgs/icons/2_12.png similarity index 100% rename from imgs/icons/02_12.png rename to imgs/icons/2_12.png diff --git a/imgs/icons/02_14.png b/imgs/icons/2_14.png similarity index 100% rename from imgs/icons/02_14.png rename to imgs/icons/2_14.png diff --git a/imgs/icons/02_16.png b/imgs/icons/2_16.png similarity index 100% rename from imgs/icons/02_16.png rename to imgs/icons/2_16.png diff --git a/imgs/icons/02_02.png b/imgs/icons/2_2.png similarity index 100% rename from imgs/icons/02_02.png rename to imgs/icons/2_2.png diff --git a/imgs/icons/02_03.png b/imgs/icons/2_3.png similarity index 100% rename from imgs/icons/02_03.png rename to imgs/icons/2_3.png diff --git a/imgs/icons/02_04.png b/imgs/icons/2_4.png similarity index 100% rename from imgs/icons/02_04.png rename to imgs/icons/2_4.png diff --git a/imgs/icons/02_05.png b/imgs/icons/2_5.png similarity index 100% rename from imgs/icons/02_05.png rename to imgs/icons/2_5.png diff --git a/imgs/icons/02_07.png b/imgs/icons/2_7.png similarity index 100% rename from imgs/icons/02_07.png rename to imgs/icons/2_7.png diff --git a/imgs/icons/02_09.png b/imgs/icons/2_9.png similarity index 100% rename from imgs/icons/02_09.png rename to imgs/icons/2_9.png diff --git a/imgs/icons/34_01.png b/imgs/icons/34_1.png similarity index 100% rename from imgs/icons/34_01.png rename to imgs/icons/34_1.png diff --git a/imgs/icons/34_02.png b/imgs/icons/34_2.png similarity index 100% rename from imgs/icons/34_02.png rename to imgs/icons/34_2.png diff --git a/imgs/icons/35_01.png b/imgs/icons/35_1.png similarity index 100% rename from imgs/icons/35_01.png rename to imgs/icons/35_1.png diff --git a/imgs/icons/35_03.png b/imgs/icons/35_3.png similarity index 100% rename from imgs/icons/35_03.png rename to imgs/icons/35_3.png diff --git a/imgs/icons/35_09.png b/imgs/icons/35_9.png similarity index 100% rename from imgs/icons/35_09.png rename to imgs/icons/35_9.png diff --git a/imgs/icons/03_01.png b/imgs/icons/3_1.png similarity index 100% rename from imgs/icons/03_01.png rename to imgs/icons/3_1.png diff --git a/imgs/icons/03_10.png b/imgs/icons/3_10.png similarity index 100% rename from imgs/icons/03_10.png rename to imgs/icons/3_10.png diff --git a/imgs/icons/3_11.png b/imgs/icons/3_11.png new file mode 100644 index 000000000..d179363e2 Binary files /dev/null and b/imgs/icons/3_11.png differ diff --git a/imgs/icons/03_12.png b/imgs/icons/3_12.png similarity index 100% rename from imgs/icons/03_12.png rename to imgs/icons/3_12.png diff --git a/imgs/icons/03_13.png b/imgs/icons/3_13.png similarity index 100% rename from imgs/icons/03_13.png rename to imgs/icons/3_13.png diff --git a/imgs/icons/03_02.png b/imgs/icons/3_2.png similarity index 100% rename from imgs/icons/03_02.png rename to imgs/icons/3_2.png diff --git a/imgs/icons/03_04.png b/imgs/icons/3_4.png similarity index 100% rename from imgs/icons/03_04.png rename to imgs/icons/3_4.png diff --git a/imgs/icons/03_05.png b/imgs/icons/3_5.png similarity index 100% rename from imgs/icons/03_05.png rename to imgs/icons/3_5.png diff --git a/imgs/icons/03_06.png b/imgs/icons/3_6.png similarity index 100% rename from imgs/icons/03_06.png rename to imgs/icons/3_6.png diff --git a/imgs/icons/03_08.png b/imgs/icons/3_8.png similarity index 100% rename from imgs/icons/03_08.png rename to imgs/icons/3_8.png diff --git a/imgs/icons/03_09.png b/imgs/icons/3_9.png similarity index 100% rename from imgs/icons/03_09.png rename to imgs/icons/3_9.png diff --git a/imgs/icons/48_01.png b/imgs/icons/48_1.png similarity index 100% rename from imgs/icons/48_01.png rename to imgs/icons/48_1.png diff --git a/imgs/icons/48_02.png b/imgs/icons/48_2.png similarity index 100% rename from imgs/icons/48_02.png rename to imgs/icons/48_2.png diff --git a/imgs/icons/48_03.png b/imgs/icons/48_3.png similarity index 100% rename from imgs/icons/48_03.png rename to imgs/icons/48_3.png diff --git a/imgs/icons/48_04.png b/imgs/icons/48_4.png similarity index 100% rename from imgs/icons/48_04.png rename to imgs/icons/48_4.png diff --git a/imgs/icons/48_05.png b/imgs/icons/48_5.png similarity index 100% rename from imgs/icons/48_05.png rename to imgs/icons/48_5.png diff --git a/imgs/icons/48_06.png b/imgs/icons/48_6.png similarity index 100% rename from imgs/icons/48_06.png rename to imgs/icons/48_6.png diff --git a/imgs/icons/48_07.png b/imgs/icons/48_7.png similarity index 100% rename from imgs/icons/48_07.png rename to imgs/icons/48_7.png diff --git a/imgs/icons/48_08.png b/imgs/icons/48_8.png similarity index 100% rename from imgs/icons/48_08.png rename to imgs/icons/48_8.png diff --git a/imgs/icons/48_09.png b/imgs/icons/48_9.png similarity index 100% rename from imgs/icons/48_09.png rename to imgs/icons/48_9.png diff --git a/imgs/icons/49_05.png b/imgs/icons/49_5.png similarity index 100% rename from imgs/icons/49_05.png rename to imgs/icons/49_5.png diff --git a/imgs/icons/49_06.png b/imgs/icons/49_6.png similarity index 100% rename from imgs/icons/49_06.png rename to imgs/icons/49_6.png diff --git a/imgs/icons/49_07.png b/imgs/icons/49_7.png similarity index 100% rename from imgs/icons/49_07.png rename to imgs/icons/49_7.png diff --git a/imgs/icons/04_01.png b/imgs/icons/4_1.png similarity index 100% rename from imgs/icons/04_01.png rename to imgs/icons/4_1.png diff --git a/imgs/icons/04_10.png b/imgs/icons/4_10.png similarity index 100% rename from imgs/icons/04_10.png rename to imgs/icons/4_10.png diff --git a/imgs/icons/04_11.png b/imgs/icons/4_11.png similarity index 100% rename from imgs/icons/04_11.png rename to imgs/icons/4_11.png diff --git a/imgs/icons/04_12.png b/imgs/icons/4_12.png similarity index 100% rename from imgs/icons/04_12.png rename to imgs/icons/4_12.png diff --git a/imgs/icons/04_13.png b/imgs/icons/4_13.png similarity index 100% rename from imgs/icons/04_13.png rename to imgs/icons/4_13.png diff --git a/imgs/icons/04_09.png b/imgs/icons/4_9.png similarity index 100% rename from imgs/icons/04_09.png rename to imgs/icons/4_9.png diff --git a/imgs/icons/50_03.png b/imgs/icons/50_3.png similarity index 100% rename from imgs/icons/50_03.png rename to imgs/icons/50_3.png diff --git a/imgs/icons/52_01.png b/imgs/icons/52_1.png similarity index 100% rename from imgs/icons/52_01.png rename to imgs/icons/52_1.png diff --git a/imgs/icons/52_02.png b/imgs/icons/52_2.png similarity index 100% rename from imgs/icons/52_02.png rename to imgs/icons/52_2.png diff --git a/imgs/icons/52_03.png b/imgs/icons/52_3.png similarity index 100% rename from imgs/icons/52_03.png rename to imgs/icons/52_3.png diff --git a/imgs/icons/52_04.png b/imgs/icons/52_4.png similarity index 100% rename from imgs/icons/52_04.png rename to imgs/icons/52_4.png diff --git a/imgs/icons/52_05.png b/imgs/icons/52_5.png similarity index 100% rename from imgs/icons/52_05.png rename to imgs/icons/52_5.png diff --git a/imgs/icons/52_06.png b/imgs/icons/52_6.png similarity index 100% rename from imgs/icons/52_06.png rename to imgs/icons/52_6.png diff --git a/imgs/icons/52_07.png b/imgs/icons/52_7.png similarity index 100% rename from imgs/icons/52_07.png rename to imgs/icons/52_7.png diff --git a/imgs/icons/52_08.png b/imgs/icons/52_8.png similarity index 100% rename from imgs/icons/52_08.png rename to imgs/icons/52_8.png diff --git a/imgs/icons/53_01.png b/imgs/icons/53_1.png similarity index 100% rename from imgs/icons/53_01.png rename to imgs/icons/53_1.png diff --git a/imgs/icons/53_02.png b/imgs/icons/53_2.png similarity index 100% rename from imgs/icons/53_02.png rename to imgs/icons/53_2.png diff --git a/imgs/icons/53_03.png b/imgs/icons/53_3.png similarity index 100% rename from imgs/icons/53_03.png rename to imgs/icons/53_3.png diff --git a/imgs/icons/53_04.png b/imgs/icons/53_4.png similarity index 100% rename from imgs/icons/53_04.png rename to imgs/icons/53_4.png diff --git a/imgs/icons/53_05.png b/imgs/icons/53_5.png similarity index 100% rename from imgs/icons/53_05.png rename to imgs/icons/53_5.png diff --git a/imgs/icons/53_06.png b/imgs/icons/53_6.png similarity index 100% rename from imgs/icons/53_06.png rename to imgs/icons/53_6.png diff --git a/imgs/icons/53_07.png b/imgs/icons/53_7.png similarity index 100% rename from imgs/icons/53_07.png rename to imgs/icons/53_7.png diff --git a/imgs/icons/53_08.png b/imgs/icons/53_8.png similarity index 100% rename from imgs/icons/53_08.png rename to imgs/icons/53_8.png diff --git a/imgs/icons/53_09.png b/imgs/icons/53_9.png similarity index 100% rename from imgs/icons/53_09.png rename to imgs/icons/53_9.png diff --git a/imgs/icons/56_01.png b/imgs/icons/56_1.png similarity index 100% rename from imgs/icons/56_01.png rename to imgs/icons/56_1.png diff --git a/imgs/icons/56_02.png b/imgs/icons/56_2.png similarity index 100% rename from imgs/icons/56_02.png rename to imgs/icons/56_2.png diff --git a/imgs/icons/56_03.png b/imgs/icons/56_3.png similarity index 100% rename from imgs/icons/56_03.png rename to imgs/icons/56_3.png diff --git a/imgs/icons/56_04.png b/imgs/icons/56_4.png similarity index 100% rename from imgs/icons/56_04.png rename to imgs/icons/56_4.png diff --git a/imgs/icons/56_05.png b/imgs/icons/56_5.png similarity index 100% rename from imgs/icons/56_05.png rename to imgs/icons/56_5.png diff --git a/imgs/icons/56_06.png b/imgs/icons/56_6.png similarity index 100% rename from imgs/icons/56_06.png rename to imgs/icons/56_6.png diff --git a/imgs/icons/56_07.png b/imgs/icons/56_7.png similarity index 100% rename from imgs/icons/56_07.png rename to imgs/icons/56_7.png diff --git a/imgs/icons/56_08.png b/imgs/icons/56_8.png similarity index 100% rename from imgs/icons/56_08.png rename to imgs/icons/56_8.png diff --git a/imgs/icons/57_04.png b/imgs/icons/57_4.png similarity index 100% rename from imgs/icons/57_04.png rename to imgs/icons/57_4.png diff --git a/imgs/icons/05_01.png b/imgs/icons/5_1.png similarity index 100% rename from imgs/icons/05_01.png rename to imgs/icons/5_1.png diff --git a/imgs/icons/05_11.png b/imgs/icons/5_11.png similarity index 100% rename from imgs/icons/05_11.png rename to imgs/icons/5_11.png diff --git a/imgs/icons/05_12.png b/imgs/icons/5_12.png similarity index 100% rename from imgs/icons/05_12.png rename to imgs/icons/5_12.png diff --git a/imgs/icons/05_14.png b/imgs/icons/5_14.png similarity index 100% rename from imgs/icons/05_14.png rename to imgs/icons/5_14.png diff --git a/imgs/icons/05_02.png b/imgs/icons/5_2.png similarity index 100% rename from imgs/icons/05_02.png rename to imgs/icons/5_2.png diff --git a/imgs/icons/05_07.png b/imgs/icons/5_7.png similarity index 100% rename from imgs/icons/05_07.png rename to imgs/icons/5_7.png diff --git a/imgs/icons/62_01.png b/imgs/icons/62_1.png similarity index 100% rename from imgs/icons/62_01.png rename to imgs/icons/62_1.png diff --git a/imgs/icons/62_02.png b/imgs/icons/62_2.png similarity index 100% rename from imgs/icons/62_02.png rename to imgs/icons/62_2.png diff --git a/imgs/icons/62_03.png b/imgs/icons/62_3.png similarity index 100% rename from imgs/icons/62_03.png rename to imgs/icons/62_3.png diff --git a/imgs/icons/62_04.png b/imgs/icons/62_4.png similarity index 100% rename from imgs/icons/62_04.png rename to imgs/icons/62_4.png diff --git a/imgs/icons/62_05.png b/imgs/icons/62_5.png similarity index 100% rename from imgs/icons/62_05.png rename to imgs/icons/62_5.png diff --git a/imgs/icons/62_06.png b/imgs/icons/62_6.png similarity index 100% rename from imgs/icons/62_06.png rename to imgs/icons/62_6.png diff --git a/imgs/icons/62_07.png b/imgs/icons/62_7.png similarity index 100% rename from imgs/icons/62_07.png rename to imgs/icons/62_7.png diff --git a/imgs/icons/62_08.png b/imgs/icons/62_8.png similarity index 100% rename from imgs/icons/62_08.png rename to imgs/icons/62_8.png diff --git a/imgs/icons/62_09.png b/imgs/icons/62_9.png similarity index 100% rename from imgs/icons/62_09.png rename to imgs/icons/62_9.png diff --git a/imgs/icons/64_05.png b/imgs/icons/64_5.png similarity index 100% rename from imgs/icons/64_05.png rename to imgs/icons/64_5.png diff --git a/imgs/icons/64_06.png b/imgs/icons/64_6.png similarity index 100% rename from imgs/icons/64_06.png rename to imgs/icons/64_6.png diff --git a/imgs/icons/64_07.png b/imgs/icons/64_7.png similarity index 100% rename from imgs/icons/64_07.png rename to imgs/icons/64_7.png diff --git a/imgs/icons/64_08.png b/imgs/icons/64_8.png similarity index 100% rename from imgs/icons/64_08.png rename to imgs/icons/64_8.png diff --git a/imgs/icons/68_01.png b/imgs/icons/68_1.png similarity index 100% rename from imgs/icons/68_01.png rename to imgs/icons/68_1.png diff --git a/imgs/icons/68_02.png b/imgs/icons/68_2.png similarity index 100% rename from imgs/icons/68_02.png rename to imgs/icons/68_2.png diff --git a/imgs/icons/68_03.png b/imgs/icons/68_3.png similarity index 100% rename from imgs/icons/68_03.png rename to imgs/icons/68_3.png diff --git a/imgs/icons/68_04.png b/imgs/icons/68_4.png similarity index 100% rename from imgs/icons/68_04.png rename to imgs/icons/68_4.png diff --git a/imgs/icons/68_09.png b/imgs/icons/68_9.png similarity index 100% rename from imgs/icons/68_09.png rename to imgs/icons/68_9.png diff --git a/imgs/icons/70_09.png b/imgs/icons/70_09.png deleted file mode 100644 index 090145b3e..000000000 Binary files a/imgs/icons/70_09.png and /dev/null differ diff --git a/imgs/icons/70_03.png b/imgs/icons/70_3.png similarity index 100% rename from imgs/icons/70_03.png rename to imgs/icons/70_3.png diff --git a/imgs/icons/70_04.png b/imgs/icons/70_4.png similarity index 100% rename from imgs/icons/70_04.png rename to imgs/icons/70_4.png diff --git a/imgs/icons/70_05.png b/imgs/icons/70_5.png similarity index 100% rename from imgs/icons/70_05.png rename to imgs/icons/70_5.png diff --git a/imgs/icons/70_06.png b/imgs/icons/70_6.png similarity index 100% rename from imgs/icons/70_06.png rename to imgs/icons/70_6.png diff --git a/imgs/icons/70_07.png b/imgs/icons/70_7.png similarity index 100% rename from imgs/icons/70_07.png rename to imgs/icons/70_7.png diff --git a/imgs/icons/70_08.png b/imgs/icons/70_8.png similarity index 100% rename from imgs/icons/70_08.png rename to imgs/icons/70_8.png diff --git a/imgs/icons/74_01.png b/imgs/icons/74_1.png similarity index 100% rename from imgs/icons/74_01.png rename to imgs/icons/74_1.png diff --git a/imgs/icons/74_02.png b/imgs/icons/74_2.png similarity index 100% rename from imgs/icons/74_02.png rename to imgs/icons/74_2.png diff --git a/imgs/icons/74_03.png b/imgs/icons/74_3.png similarity index 100% rename from imgs/icons/74_03.png rename to imgs/icons/74_3.png diff --git a/imgs/icons/74_04.png b/imgs/icons/74_4.png similarity index 100% rename from imgs/icons/74_04.png rename to imgs/icons/74_4.png diff --git a/imgs/icons/74_05.png b/imgs/icons/74_5.png similarity index 100% rename from imgs/icons/74_05.png rename to imgs/icons/74_5.png diff --git a/imgs/icons/74_06.png b/imgs/icons/74_6.png similarity index 100% rename from imgs/icons/74_06.png rename to imgs/icons/74_6.png diff --git a/imgs/icons/74_07.png b/imgs/icons/74_7.png similarity index 100% rename from imgs/icons/74_07.png rename to imgs/icons/74_7.png diff --git a/imgs/icons/74_08.png b/imgs/icons/74_8.png similarity index 100% rename from imgs/icons/74_08.png rename to imgs/icons/74_8.png diff --git a/imgs/icons/74_09.png b/imgs/icons/74_9.png similarity index 100% rename from imgs/icons/74_09.png rename to imgs/icons/74_9.png diff --git a/imgs/icons/76_01.png b/imgs/icons/76_1.png similarity index 100% rename from imgs/icons/76_01.png rename to imgs/icons/76_1.png diff --git a/imgs/icons/76_04.png b/imgs/icons/76_4.png similarity index 100% rename from imgs/icons/76_04.png rename to imgs/icons/76_4.png diff --git a/imgs/icons/76_05.png b/imgs/icons/76_5.png similarity index 100% rename from imgs/icons/76_05.png rename to imgs/icons/76_5.png diff --git a/imgs/icons/76_06.png b/imgs/icons/76_6.png similarity index 100% rename from imgs/icons/76_06.png rename to imgs/icons/76_6.png diff --git a/imgs/icons/76_07.png b/imgs/icons/76_7.png similarity index 100% rename from imgs/icons/76_07.png rename to imgs/icons/76_7.png diff --git a/imgs/icons/76_08.png b/imgs/icons/76_8.png similarity index 100% rename from imgs/icons/76_08.png rename to imgs/icons/76_8.png diff --git a/imgs/icons/76_09.png b/imgs/icons/76_9.png similarity index 100% rename from imgs/icons/76_09.png rename to imgs/icons/76_9.png diff --git a/imgs/icons/79_09.png b/imgs/icons/79_9.png similarity index 100% rename from imgs/icons/79_09.png rename to imgs/icons/79_9.png diff --git a/imgs/icons/07_12.png b/imgs/icons/7_12.png similarity index 100% rename from imgs/icons/07_12.png rename to imgs/icons/7_12.png diff --git a/imgs/icons/07_15.png b/imgs/icons/7_15.png similarity index 100% rename from imgs/icons/07_15.png rename to imgs/icons/7_15.png diff --git a/imgs/icons/08_01.png b/imgs/icons/8_1.png similarity index 100% rename from imgs/icons/08_01.png rename to imgs/icons/8_1.png diff --git a/imgs/icons/08_10.png b/imgs/icons/8_10.png similarity index 100% rename from imgs/icons/08_10.png rename to imgs/icons/8_10.png diff --git a/imgs/icons/08_11.png b/imgs/icons/8_11.png similarity index 100% rename from imgs/icons/08_11.png rename to imgs/icons/8_11.png diff --git a/imgs/icons/08_12.png b/imgs/icons/8_12.png similarity index 100% rename from imgs/icons/08_12.png rename to imgs/icons/8_12.png diff --git a/imgs/icons/08_16.png b/imgs/icons/8_16.png similarity index 100% rename from imgs/icons/08_16.png rename to imgs/icons/8_16.png diff --git a/imgs/icons/08_02.png b/imgs/icons/8_2.png similarity index 100% rename from imgs/icons/08_02.png rename to imgs/icons/8_2.png diff --git a/imgs/icons/08_03.png b/imgs/icons/8_3.png similarity index 100% rename from imgs/icons/08_03.png rename to imgs/icons/8_3.png diff --git a/imgs/icons/08_04.png b/imgs/icons/8_4.png similarity index 100% rename from imgs/icons/08_04.png rename to imgs/icons/8_4.png diff --git a/imgs/icons/08_05.png b/imgs/icons/8_5.png similarity index 100% rename from imgs/icons/08_05.png rename to imgs/icons/8_5.png diff --git a/imgs/icons/08_06.png b/imgs/icons/8_6.png similarity index 100% rename from imgs/icons/08_06.png rename to imgs/icons/8_6.png diff --git a/imgs/icons/08_07.png b/imgs/icons/8_7.png similarity index 100% rename from imgs/icons/08_07.png rename to imgs/icons/8_7.png diff --git a/imgs/icons/08_08.png b/imgs/icons/8_8.png similarity index 100% rename from imgs/icons/08_08.png rename to imgs/icons/8_8.png diff --git a/imgs/icons/08_09.png b/imgs/icons/8_9.png similarity index 100% rename from imgs/icons/08_09.png rename to imgs/icons/8_9.png diff --git a/imgs/icons/95_05.png b/imgs/icons/95_5.png similarity index 100% rename from imgs/icons/95_05.png rename to imgs/icons/95_5.png diff --git a/imgs/icons/99_09.png b/imgs/icons/99_9.png similarity index 100% rename from imgs/icons/99_09.png rename to imgs/icons/99_9.png diff --git a/imgs/icons/09_16.png b/imgs/icons/9_16.png similarity index 100% rename from imgs/icons/09_16.png rename to imgs/icons/9_16.png diff --git a/imgs/icons/09_05.png b/imgs/icons/9_5.png similarity index 100% rename from imgs/icons/09_05.png rename to imgs/icons/9_5.png diff --git a/imgs/icons/multiuseanalyzer_64.png b/imgs/icons/multiuseanalyzer_64.png new file mode 100644 index 000000000..23fb02c27 Binary files /dev/null and b/imgs/icons/multiuseanalyzer_64.png differ diff --git a/scripts/icons_update.py b/scripts/icons_update.py index f8cd1602c..a88ad4283 100644 --- a/scripts/icons_update.py +++ b/scripts/icons_update.py @@ -127,13 +127,14 @@ def unzero(fname): except (TypeError, ValueError): pass if size is None: - fname = '{}_{}{}'.format(prefix, suffix, tail) + fname = '{}_{}'.format(prefix, suffix) else: - fname = '{}_{}_{}{}'.format(prefix, size, suffix, tail) + fname = '{}_{}_{}'.format(prefix, size, suffix) return fname else: return fname +# Get a list of needed icons based on the items / attributes / etc from the database for query in (query_items, query_groups, query_cats, query_market, query_attrib): for row in cursor.execute(query): fname = row[0] @@ -142,6 +143,7 @@ for query in (query_items, query_groups, query_cats, query_market, query_attrib) fname = strip_path(fname) needed.add(fname) +# Get a list of all the icons we currently have for fname in os.listdir(icons_dir): if not os.path.isfile(os.path.join(icons_dir, fname)): continue @@ -151,6 +153,7 @@ for fname in os.listdir(icons_dir): print fname,"exists" existing.add(fname) +# Get a list of all the icons currently available for dir in dirs: for fname in os.listdir(dir): if not os.path.isfile(os.path.join(dir, fname)): @@ -163,8 +166,6 @@ for dir in dirs: # Often items referred to with 01_01 format, fnames = export.setdefault(stripped.lower(), set()) fnames.add(fname) - fnames = export.setdefault(sizeless.lower(), set()) - fnames.add(fname) def crop_image(img): w, h = img.size diff --git a/scripts/sdeReadIcons.py b/scripts/sdeReadIcons.py new file mode 100644 index 000000000..2284bf7e9 --- /dev/null +++ b/scripts/sdeReadIcons.py @@ -0,0 +1,22 @@ +''' +A change to EVE Online's cache format rendered Reverence unable to correctly dump the icons file. As a stop gap, this +reads the offical SDE iconIDs.yaml and populates our own icons.json file. This files should then be transferred to the +other JSON files Phobos dumps before being converted to SQL +''' + +import yaml +import json + +iconDict = {} + +stream = open(r"C:\path\to\sde\fsd\iconIDs.yaml", "r") +docs = yaml.load_all(stream) + +for doc in docs: + for k,v in doc.items(): + iconDict[str(k)] = {"iconFile": v['iconFile']} + +with open('icons.json', 'w') as outfile: + json.dump(iconDict, outfile) + +print "done" \ No newline at end of file diff --git a/service/crudeTests.py b/service/crudeTests.py new file mode 100644 index 000000000..e69de29bb diff --git a/service/damagePattern.py b/service/damagePattern.py index b67b10956..f617fa846 100644 --- a/service/damagePattern.py +++ b/service/damagePattern.py @@ -21,6 +21,8 @@ import eos.db import eos.types import copy +from eos.db.saveddata.loadDefaultDatabaseValues import DefaultDatabaseValues + class ImportError(Exception): pass @@ -33,13 +35,6 @@ class DamagePattern(): return cls.instance - def __init__(self): - uniform = eos.db.getDamagePattern("Uniform") - if uniform is None: - uniform = eos.types.DamagePattern(25, 25, 25, 25) - uniform.name = "Uniform" - eos.db.save(uniform) - def getDamagePatternList(self): return eos.db.getDamagePatternList() @@ -96,4 +91,3 @@ class DamagePattern(): patterns.sort(key=lambda p: p.name) return eos.types.DamagePattern.exportPatterns(*patterns) - diff --git a/service/fit.py b/service/fit.py index eefa64cca..455e76463 100644 --- a/service/fit.py +++ b/service/fit.py @@ -1,4 +1,4 @@ -#=============================================================================== +# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with pyfa. If not, see . -#=============================================================================== +# =============================================================================== import locale import copy @@ -40,6 +40,7 @@ from service.port import Port logger = logging.getLogger(__name__) + class FitBackupThread(threading.Thread): def __init__(self, path, callback): threading.Thread.__init__(self) @@ -260,7 +261,7 @@ class Fit(object): if not projected: for fitP in fit.projectedFits: - self.getFit(fitP.ID, projected = True) + self.getFit(fitP.ID, projected=True) self.recalc(fit, withBoosters=True) fit.fill() @@ -415,7 +416,7 @@ class Fit(object): def changeActiveFighters(self, fitID, fighter, amount): fit = eos.db.getFit(fitID) fighter.amountActive = amount - + eos.db.commit() self.recalc(fit) @@ -429,7 +430,7 @@ class Fit(object): fit.projectedFighters.remove(thing) else: del fit.__projectedFits[thing.ID] - #fit.projectedFits.remove(thing) + # fit.projectedFits.remove(thing) eos.db.commit() self.recalc(fit) @@ -479,8 +480,6 @@ class Fit(object): def changeModule(self, fitID, position, newItemID): fit = eos.db.getFit(fitID) - if fit.modules[position].isEmpty: - return None # Dummy it out in case the next bit fails fit.modules.toDummy(position) @@ -947,7 +946,7 @@ class Fit(object): fits = [] for path in paths: if callback: # Pulse - wx.CallAfter(callback, 1, "Processing file:\n%s"%path) + wx.CallAfter(callback, 1, "Processing file:\n%s" % path) file = open(path, "r") srcString = file.read() @@ -959,38 +958,38 @@ class Fit(object): # If file had ANSI encoding, decode it to unicode using detection # of BOM header or if there is no header try default # codepage then fallback to utf-16, cp1252 - + if isinstance(srcString, str): encoding_map = ( - ('\xef\xbb\xbf', 'utf-8'), - ('\xff\xfe\0\0', 'utf-32'), - ('\0\0\xfe\xff', 'UTF-32BE'), - ('\xff\xfe', 'utf-16'), - ('\xfe\xff', 'UTF-16BE')) + ('\xef\xbb\xbf', 'utf-8'), + ('\xff\xfe\0\0', 'utf-32'), + ('\0\0\xfe\xff', 'UTF-32BE'), + ('\xff\xfe', 'utf-16'), + ('\xfe\xff', 'UTF-16BE')) for bom, encoding in encoding_map: if srcString.startswith(bom): codec_found = encoding savebom = bom - + if codec_found is None: logger.info("Unicode BOM not found in file %s.", path) attempt_codecs = (defcodepage, "utf-8", "utf-16", "cp1252") for page in attempt_codecs: - try: - logger.info("Attempting to decode file %s using %s page.", path, page) - srcString = unicode(srcString, page) - codec_found = page - logger.info("File %s decoded using %s page.", path, page) - except UnicodeDecodeError: - logger.info("Error unicode decoding %s from page %s, trying next codec", path, page) - else: - break + try: + logger.info("Attempting to decode file %s using %s page.", path, page) + srcString = unicode(srcString, page) + codec_found = page + logger.info("File %s decoded using %s page.", path, page) + except UnicodeDecodeError: + logger.info("Error unicode decoding %s from page %s, trying next codec", path, page) + else: + break else: logger.info("Unicode BOM detected in %s, using %s page.", path, codec_found) srcString = unicode(srcString[len(savebom):], codec_found) - + else: # nasty hack to detect other transparent utf-16 loading if srcString[0] == '<' and 'utf-16' in srcString[:128].lower(): @@ -1005,10 +1004,10 @@ class Fit(object): _, fitsImport = Port.importAuto(srcString, path, callback=callback, encoding=codec_found) fits += fitsImport except xml.parsers.expat.ExpatError, e: - return False, "Malformed XML in %s"%path + return False, "Malformed XML in %s" % path except Exception, e: logger.exception("Unknown exception processing: %s", path) - return False, "Unknown Error while processing %s"%path + return False, "Unknown Error while processing %s" % path IDs = [] numFits = len(fits) @@ -1023,7 +1022,7 @@ class Fit(object): wx.CallAfter( callback, 1, "Processing complete, saving fits to database\n(%d/%d)" % - (i+1, numFits) + (i + 1, numFits) ) return True, fits @@ -1126,7 +1125,7 @@ class Fit(object): self.recalc(fit) def recalc(self, fit, withBoosters=True): - logger.debug("="*10+"recalc"+"="*10) + logger.debug("=" * 10 + "recalc" + "=" * 10) if fit.factorReload is not self.serviceFittingOptions["useGlobalForceReload"]: fit.factorReload = self.serviceFittingOptions["useGlobalForceReload"] fit.clear() diff --git a/service/market.py b/service/market.py index 96d3dc412..73f6ab770 100644 --- a/service/market.py +++ b/service/market.py @@ -26,6 +26,7 @@ import Queue import config import eos.db import eos.types +from sqlalchemy.sql import and_, or_ from service.settings import SettingsProvider, NetworkSettings import service import service.conversions as conversions @@ -125,7 +126,7 @@ class SearchWorkerThread(threading.Thread): sMkt = Market.getInstance() if filterOn is True: # Rely on category data provided by eos as we don't hardcode them much in service - filter = eos.types.Category.name.in_(sMkt.SEARCH_CATEGORIES) + filter = or_(eos.types.Category.name.in_(sMkt.SEARCH_CATEGORIES), eos.types.Group.name.in_(sMkt.SEARCH_GROUPS)) elif filterOn: # filter by selected categories filter = eos.types.Category.name.in_(filterOn) else: @@ -314,7 +315,8 @@ class Market(): "Standard Cerebral Accelerator": 977, # Implants & Boosters > Booster "Talocan Data Analyzer I": 714, # Ship Equipment > Electronics and Sensor Upgrades > Scanners > Data and Composition Scanners "Terran Data Analyzer I": 714, # Ship Equipment > Electronics and Sensor Upgrades > Scanners > Data and Composition Scanners - "Tetrimon Data Analyzer I": 714 } # Ship Equipment > Electronics and Sensor Upgrades > Scanners > Data and Composition Scanners + "Tetrimon Data Analyzer I": 714 # Ship Equipment > Electronics and Sensor Upgrades > Scanners > Data and Composition Scanners + } self.ITEMS_FORCEDMARKETGROUP_R = self.__makeRevDict(self.ITEMS_FORCEDMARKETGROUP) @@ -330,6 +332,7 @@ class Market(): ("complex", frozenset((6,))), ("officer", frozenset((5,)))]) self.SEARCH_CATEGORIES = ("Drone", "Module", "Subsystem", "Charge", "Implant", "Deployable", "Fighter", "Structure") + self.SEARCH_GROUPS = ("Ice Product",) self.ROOT_MARKET_GROUPS = (9, # Modules 1111, # Rigs 157, # Drones diff --git a/service/port.py b/service/port.py index 71076bb46..f8a9334ac 100644 --- a/service/port.py +++ b/service/port.py @@ -65,7 +65,7 @@ class Port(object): # max length is 50 characters name = ofit.name[:47] + '...' if len(ofit.name) > 50 else ofit.name fit['name'] = name - fit['ship']['href'] = "%stypes/%d/"%(eve._authed_endpoint, ofit.ship.item.ID) + fit['ship']['href'] = "%sinventory/types/%d/"%(eve._authed_endpoint, ofit.ship.item.ID) fit['ship']['id'] = ofit.ship.item.ID fit['ship']['name'] = '' @@ -93,7 +93,7 @@ class Port(object): slotNum[slot] += 1 item['quantity'] = 1 - item['type']['href'] = "%stypes/%d/"%(eve._authed_endpoint, module.item.ID) + item['type']['href'] = "%sinventory/types/%d/"%(eve._authed_endpoint, module.item.ID) item['type']['id'] = module.item.ID item['type']['name'] = '' fit['items'].append(item) @@ -108,7 +108,7 @@ class Port(object): item = nested_dict() item['flag'] = INV_FLAG_CARGOBAY item['quantity'] = cargo.amount - item['type']['href'] = "%stypes/%d/"%(eve._authed_endpoint, cargo.item.ID) + item['type']['href'] = "%sinventory/types/%d/"%(eve._authed_endpoint, cargo.item.ID) item['type']['id'] = cargo.item.ID item['type']['name'] = '' fit['items'].append(item) @@ -117,7 +117,7 @@ class Port(object): item = nested_dict() item['flag'] = INV_FLAG_CARGOBAY item['quantity'] = amount - item['type']['href'] = "%stypes/%d/"%(eve._authed_endpoint, chargeID) + item['type']['href'] = "%sinventory/types/%d/"%(eve._authed_endpoint, chargeID) item['type']['id'] = chargeID item['type']['name'] = '' fit['items'].append(item) @@ -126,7 +126,7 @@ class Port(object): item = nested_dict() item['flag'] = INV_FLAG_DRONEBAY item['quantity'] = drone.amount - item['type']['href'] = "%stypes/%d/"%(eve._authed_endpoint, drone.item.ID) + item['type']['href'] = "%sinventory/types/%d/"%(eve._authed_endpoint, drone.item.ID) item['type']['id'] = drone.item.ID item['type']['name'] = '' fit['items'].append(item) diff --git a/service/prefetch.py b/service/prefetch.py index 664e5168c..b16f52d40 100644 --- a/service/prefetch.py +++ b/service/prefetch.py @@ -22,6 +22,7 @@ import config import os import eos.types import eos.db.migration as migration +from eos.db.saveddata.loadDefaultDatabaseValues import DefaultDatabaseValues class PrefetchThread(threading.Thread): def run(self): @@ -51,8 +52,19 @@ if os.path.isfile(config.saveDB): # If database exists, run migration after init'd database eos.db.saveddata_meta.create_all() migration.update(eos.db.saveddata_engine) + # Import default database values + # Import values that must exist otherwise Pyfa breaks + DefaultDatabaseValues.importRequiredDefaults() else: # If database does not exist, do not worry about migration. Simply # create and set version eos.db.saveddata_meta.create_all() eos.db.saveddata_engine.execute('PRAGMA user_version = {}'.format(migration.getAppVersion())) + #Import default database values + # Import values that must exist otherwise Pyfa breaks + DefaultDatabaseValues.importRequiredDefaults() + # Import default values for damage profiles + DefaultDatabaseValues.importDamageProfileDefaults() + # Import default values for target resist profiles + DefaultDatabaseValues.importResistProfileDefaults() + diff --git a/service/server.py b/service/server.py index 9f48534e1..ed42d0082 100644 --- a/service/server.py +++ b/service/server.py @@ -12,8 +12,29 @@ logger = logging.getLogger(__name__) HTML = ''' + + + + pyfa Local Server + + + -Done. Please close this window. + + +
+

pyfa

+
+

If you see this message then it means you should be logged into CREST. You may close this window and return to the application.

+
+