diff --git a/config.py b/config.py index 5536e3795..8af9d3dbf 100644 --- a/config.py +++ b/config.py @@ -24,10 +24,10 @@ saveInRoot = False # Version data -version = "2.2.0b1" -tag = "git" -expansionName = "Into the Abyss" -expansionVersion = "1.1" +version = "2.3.0" +tag = "Stable" +expansionName = "YC120.7" +expansionVersion = "1.2" evemonMinVersion = "4081" minItemSearchLength = 3 diff --git a/dist_assets/mac/pyfa.spec b/dist_assets/mac/pyfa.spec index da72e4681..cf27cfe87 100644 --- a/dist_assets/mac/pyfa.spec +++ b/dist_assets/mac/pyfa.spec @@ -73,4 +73,7 @@ exe = EXE(pyz, app = BUNDLE(exe, name='pyfa.app', icon=icon, - bundle_identifier=None) \ No newline at end of file + bundle_identifier=None, + info_plist={ + 'NSHighResolutionCapable': 'True' + }) diff --git a/eos/db/gamedata/dynamicAttributes.py b/eos/db/gamedata/dynamicAttributes.py index be0e9b9d1..26d25be0e 100644 --- a/eos/db/gamedata/dynamicAttributes.py +++ b/eos/db/gamedata/dynamicAttributes.py @@ -38,8 +38,7 @@ dynamicAttributes_table = Table("mutaplasmidAttributes", gamedata_meta, dynamicApplicable_table = Table("mutaplasmidItems", gamedata_meta, Column("typeID", ForeignKey("mutaplasmids.typeID"), primary_key=True), - Column("applicableTypeID", ForeignKey("invtypes.typeID"), primary_key=True), - ) + Column("applicableTypeID", ForeignKey("invtypes.typeID"), primary_key=True),) mapper(DynamicItem, dynamic_table, properties={ "attributes": relation(DynamicItemAttribute), diff --git a/eos/db/gamedata/item.py b/eos/db/gamedata/item.py index 767029d21..fba3e9820 100644 --- a/eos/db/gamedata/item.py +++ b/eos/db/gamedata/item.py @@ -63,8 +63,7 @@ mapper(Item, items_table, primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID, secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID, secondary=dynamicApplicable_table, - backref="applicableItems" - ) + backref="applicableItems") }) Item.category = association_proxy("group", "category") diff --git a/eos/db/gamedata/queries.py b/eos/db/gamedata/queries.py index 956ef054e..90e757788 100644 --- a/eos/db/gamedata/queries.py +++ b/eos/db/gamedata/queries.py @@ -127,6 +127,7 @@ def getItemWithBaseItemAttribute(lookfor, baseItemID, eager=None): gamedata_session.expunge(item) return item + @cachedQuery(1, "lookfor") def getItems(lookfor, eager=None): """ diff --git a/eos/db/saveddata/fit.py b/eos/db/saveddata/fit.py index 0c34d5279..0ae4509e2 100644 --- a/eos/db/saveddata/fit.py +++ b/eos/db/saveddata/fit.py @@ -56,7 +56,7 @@ fits_table = Table("fits", saveddata_meta, Column("booster", Boolean, nullable=False, index=True, default=0), Column("targetResistsID", ForeignKey("targetResists.ID"), nullable=True), Column("modeID", Integer, nullable=True), - Column("implantLocation", Integer, nullable=True), + Column("implantLocation", Integer, nullable=False), Column("notes", String, nullable=True), Column("ignoreRestrictions", Boolean, default=0), Column("created", DateTime, nullable=True, default=datetime.datetime.now), diff --git a/eos/db/saveddata/mutator.py b/eos/db/saveddata/mutator.py index 43ecff834..11b595025 100644 --- a/eos/db/saveddata/mutator.py +++ b/eos/db/saveddata/mutator.py @@ -29,7 +29,6 @@ mutator_table = Table("mutators", saveddata_meta, Column("attrID", Integer, primary_key=True, index=True), Column("value", Float, nullable=False), Column("created", DateTime, nullable=True, default=datetime.datetime.now), - Column("modified", DateTime, nullable=True, onupdate=datetime.datetime.now) - ) + Column("modified", DateTime, nullable=True, onupdate=datetime.datetime.now)) mapper(Mutator, mutator_table) diff --git a/eos/effects/armorallrepairsystemsamountbonuspassive.py b/eos/effects/armorallrepairsystemsamountbonuspassive.py index c2eb9e2c4..8307ae2ee 100644 --- a/eos/effects/armorallrepairsystemsamountbonuspassive.py +++ b/eos/effects/armorallrepairsystemsamountbonuspassive.py @@ -1,7 +1,7 @@ # armorAllRepairSystemsAmountBonusPassive # # Used by: -# Implants named like: Agency 'Hardshell' TB Dose (3 of 4) +# Implants named like: Agency 'Hardshell' TB Dose (4 of 4) # Implants named like: Exile Booster (4 of 4) # Implant: Antipharmakon Kosybo type = "passive" diff --git a/eos/effects/boostermaxvelocitypenalty.py b/eos/effects/boostermaxvelocitypenalty.py index d42479397..83856e018 100644 --- a/eos/effects/boostermaxvelocitypenalty.py +++ b/eos/effects/boostermaxvelocitypenalty.py @@ -1,7 +1,8 @@ # boosterMaxVelocityPenalty # # Used by: -# Implants named like: Booster (12 of 33) +# Implants named like: Crash Booster (3 of 4) +# Items from market group: Implants & Boosters > Booster > Booster Slot 02 (9 of 13) type = "boosterSideEffect" # User-friendly name for the side effect diff --git a/eos/effects/boostershieldcapacitypenalty.py b/eos/effects/boostershieldcapacitypenalty.py index 6e0b11eb7..ade1336d0 100644 --- a/eos/effects/boostershieldcapacitypenalty.py +++ b/eos/effects/boostershieldcapacitypenalty.py @@ -1,7 +1,7 @@ # boosterShieldCapacityPenalty # # Used by: -# Implants named like: Booster (12 of 33) +# Implants from group: Booster (12 of 66) type = "boosterSideEffect" # User-friendly name for the side effect diff --git a/eos/effects/capacitorcapacitybonus.py b/eos/effects/capacitorcapacitybonus.py index f2c0632da..c998bcaa0 100644 --- a/eos/effects/capacitorcapacitybonus.py +++ b/eos/effects/capacitorcapacitybonus.py @@ -1,7 +1,7 @@ # capacitorCapacityBonus # # Used by: -# Modules from group: Capacitor Battery (27 of 27) +# Modules from group: Capacitor Battery (30 of 30) type = "passive" diff --git a/eos/effects/energynosferatufalloff.py b/eos/effects/energynosferatufalloff.py index 0dc4fd81b..2d6414e61 100644 --- a/eos/effects/energynosferatufalloff.py +++ b/eos/effects/energynosferatufalloff.py @@ -1,7 +1,7 @@ # energyNosferatuFalloff # # Used by: -# Modules from group: Energy Nosferatu (51 of 51) +# Modules from group: Energy Nosferatu (54 of 54) from eos.modifiedAttributeDict import ModifiedAttributeDict type = "active", "projected" diff --git a/eos/effects/missileskillwarheadupgradesemdamagebonus.py b/eos/effects/missileskillwarheadupgradesemdamagebonus.py index 30d0605d5..63e95f67f 100644 --- a/eos/effects/missileskillwarheadupgradesemdamagebonus.py +++ b/eos/effects/missileskillwarheadupgradesemdamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesEmDamageBonus # # Used by: -# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4) +# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py b/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py index f0f3fcf3b..6a6228e8e 100644 --- a/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py +++ b/eos/effects/missileskillwarheadupgradesexplosivedamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesExplosiveDamageBonus # # Used by: -# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4) +# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py b/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py index a9eb7b86e..8b25142a8 100644 --- a/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py +++ b/eos/effects/missileskillwarheadupgradeskineticdamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesKineticDamageBonus # # Used by: -# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4) +# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py b/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py index 8fc3ffc5c..737e5d20d 100644 --- a/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py +++ b/eos/effects/missileskillwarheadupgradesthermaldamagebonus.py @@ -1,7 +1,7 @@ # missileSkillWarheadUpgradesThermalDamageBonus # # Used by: -# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4) +# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4) # Skill: Warhead Upgrades type = "passive" diff --git a/eos/effects/modifyenergywarfareresistance.py b/eos/effects/modifyenergywarfareresistance.py index 8cffe1386..874cbf0d7 100644 --- a/eos/effects/modifyenergywarfareresistance.py +++ b/eos/effects/modifyenergywarfareresistance.py @@ -1,7 +1,7 @@ # modifyEnergyWarfareResistance # # Used by: -# Modules from group: Capacitor Battery (27 of 27) +# Modules from group: Capacitor Battery (30 of 30) type = "passive" diff --git a/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py b/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py index 1ffbda714..6f68c7292 100644 --- a/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py +++ b/eos/effects/navigationvelocitybonuspostpercentmaxvelocityship.py @@ -2,7 +2,7 @@ # # Used by: # Modules from group: Rig Anchor (4 of 4) -# Implants named like: Agency 'Overclocker' SB Dose (3 of 4) +# Implants named like: Agency 'Overclocker' SB Dose (4 of 4) # Implants named like: grade Snake (16 of 18) # Modules named like: Auxiliary Thrusters (8 of 8) # Implant: Quafe Zero diff --git a/eos/effects/overloadselfdurationbonus.py b/eos/effects/overloadselfdurationbonus.py index 498e3a527..90c275da8 100644 --- a/eos/effects/overloadselfdurationbonus.py +++ b/eos/effects/overloadselfdurationbonus.py @@ -3,7 +3,7 @@ # Used by: # Modules from group: Capacitor Booster (59 of 59) # Modules from group: Energy Neutralizer (54 of 54) -# Modules from group: Energy Nosferatu (51 of 51) +# Modules from group: Energy Nosferatu (54 of 54) # Modules from group: Hull Repair Unit (25 of 25) # Modules from group: Remote Armor Repairer (39 of 39) # Modules from group: Remote Capacitor Transmitter (41 of 41) diff --git a/eos/effects/shieldboostamplifierpassivebooster.py b/eos/effects/shieldboostamplifierpassivebooster.py index 3dbd40327..30432474d 100644 --- a/eos/effects/shieldboostamplifierpassivebooster.py +++ b/eos/effects/shieldboostamplifierpassivebooster.py @@ -1,7 +1,7 @@ # shieldBoostAmplifierPassiveBooster # # Used by: -# Implants named like: Agency 'Hardshell' TB Dose (3 of 4) +# Implants named like: Agency 'Hardshell' TB Dose (4 of 4) # Implants named like: Blue Pill Booster (5 of 5) # Implant: Antipharmakon Thureo type = "passive" diff --git a/eos/effects/shippdmgbonusmf.py b/eos/effects/shippdmgbonusmf.py index 0a359917e..c7ad6a186 100644 --- a/eos/effects/shippdmgbonusmf.py +++ b/eos/effects/shippdmgbonusmf.py @@ -1,11 +1,12 @@ # shipPDmgBonusMF # # Used by: -# Variations of ship: Slasher (3 of 3) # Ship: Cheetah # Ship: Freki # Ship: Republic Fleet Firetail # Ship: Rifter +# Ship: Slasher +# Ship: Stiletto # Ship: Wolf type = "passive" diff --git a/eos/effects/shipprojectilerofmf.py b/eos/effects/shipprojectilerofmf.py new file mode 100644 index 000000000..d4eb0ef4a --- /dev/null +++ b/eos/effects/shipprojectilerofmf.py @@ -0,0 +1,10 @@ +# shipProjectileRofMF +# +# Used by: +# Ship: Claw +type = "passive" + + +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"), "speed", + src.getModifiedItemAttr("shipBonusMF"), stackingPenalties=True, skill="Minmatar Frigate") diff --git a/eos/effects/skillbonusdronedurability.py b/eos/effects/skillbonusdronedurability.py index e91f30acf..97b3c34bf 100644 --- a/eos/effects/skillbonusdronedurability.py +++ b/eos/effects/skillbonusdronedurability.py @@ -1,8 +1,7 @@ # skillBonusDroneDurability # # Used by: -# Implant: CreoDron 'Bumblebee' Drone Tuner T10-5D -# Implant: CreoDron 'Yellowjacket' Drone Tuner D5-10T +# Implants from group: Cyber Drones (2 of 2) # Skill: Drone Durability type = "passive" diff --git a/eos/effects/skillbonusdroneinterfacing.py b/eos/effects/skillbonusdroneinterfacing.py index 93093efc3..0fbac4beb 100644 --- a/eos/effects/skillbonusdroneinterfacing.py +++ b/eos/effects/skillbonusdroneinterfacing.py @@ -1,8 +1,7 @@ # skillBonusDroneInterfacing # # Used by: -# Implant: CreoDron 'Bumblebee' Drone Tuner T10-5D -# Implant: CreoDron 'Yellowjacket' Drone Tuner D5-10T +# Implants from group: Cyber Drones (2 of 2) # Skill: Drone Interfacing type = "passive" diff --git a/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py b/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py index 5a801aab4..481ef2604 100644 --- a/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py +++ b/eos/effects/surgicalstrikedamagemultiplierbonuspostpercentdamagemultiplierlocationshipmodulesrequiringgunnery.py @@ -1,7 +1,7 @@ # surgicalStrikeDamageMultiplierBonusPostPercentDamageMultiplierLocationShipModulesRequiringGunnery # # Used by: -# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4) +# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4) # Implants named like: Eifyr and Co. 'Gunslinger' Surgical Strike SS (6 of 6) # Implant: Standard Cerebral Accelerator type = "passive" diff --git a/eos/gamedata.py b/eos/gamedata.py index 243f71bad..7c7f85b8f 100644 --- a/eos/gamedata.py +++ b/eos/gamedata.py @@ -536,6 +536,7 @@ class DynamicItemAttribute(EqBase): class DynamicItemItem(EqBase): pass + class MarketGroup(EqBase): def __repr__(self): return "MarketGroup(ID={}, name={}, parent={}) at {}".format( diff --git a/eos/modifiedAttributeDict.py b/eos/modifiedAttributeDict.py index cb90d6679..06d348b81 100644 --- a/eos/modifiedAttributeDict.py +++ b/eos/modifiedAttributeDict.py @@ -42,6 +42,7 @@ class ItemAttrShortcut(object): return return_value or default + class ChargeAttrShortcut(object): def getModifiedChargeAttr(self, key, default=0): return_value = self.chargeModifiedAttributes.get(key) diff --git a/eos/saveddata/booster.py b/eos/saveddata/booster.py index 655a3d3f1..4c6bf23db 100644 --- a/eos/saveddata/booster.py +++ b/eos/saveddata/booster.py @@ -142,14 +142,8 @@ class Booster(HandledItem, ItemAttrShortcut): copy = Booster(self.item) copy.active = self.active - # Legacy booster side effect code, disabling as not currently implemented - ''' - origSideEffects = list(self.iterSideEffects()) - copySideEffects = list(copy.iterSideEffects()) - i = 0 - while i < len(origSideEffects): - copySideEffects[i].active = origSideEffects[i].active - i += 1 - ''' + for sideEffect in self.sideEffects: + copyEffect = next(filter(lambda eff: eff.effectID == sideEffect.effectID, copy.sideEffects)) + copyEffect.active = sideEffect.active return copy diff --git a/eos/saveddata/fighter.py b/eos/saveddata/fighter.py index 180838e31..694970343 100644 --- a/eos/saveddata/fighter.py +++ b/eos/saveddata/fighter.py @@ -291,6 +291,10 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): def __deepcopy__(self, memo): copy = Fighter(self.item) copy.amount = self.amount + copy.active = self.active + for ability in self.abilities: + copyAbility = next(filter(lambda a: a.effectID == ability.effectID, copy.abilities)) + copyAbility.active = ability.active return copy def fits(self, fit): diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index d44f8adca..8f5cc2b36 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -1580,6 +1580,7 @@ class Fit(object): copy_ship.name = "%s copy" % self.name copy_ship.damagePattern = self.damagePattern copy_ship.targetResists = self.targetResists + copy_ship.implantLocation = self.implantLocation copy_ship.notes = self.notes toCopy = ( @@ -1598,12 +1599,27 @@ class Fit(object): for i in orig: c.append(deepcopy(i)) - for fit in self.projectedFits: - copy_ship.__projectedFits[fit.ID] = fit - # this bit is required -- see GH issue # 83 + # this bit is required -- see GH issue # 83 + def forceUpdateSavedata(fit): eos.db.saveddata_session.flush() eos.db.saveddata_session.refresh(fit) + for fit in self.commandFits: + copy_ship.__commandFits[fit.ID] = fit + forceUpdateSavedata(fit) + copyCommandInfo = fit.getCommandInfo(copy_ship.ID) + originalCommandInfo = fit.getCommandInfo(self.ID) + copyCommandInfo.active = originalCommandInfo.active + forceUpdateSavedata(fit) + + for fit in self.projectedFits: + copy_ship.__projectedFits[fit.ID] = fit + forceUpdateSavedata(fit) + copyProjectionInfo = fit.getProjectionInfo(copy_ship.ID) + originalProjectionInfo = fit.getProjectionInfo(self.ID) + copyProjectionInfo.active = originalProjectionInfo.active + forceUpdateSavedata(fit) + return copy_ship def __repr__(self): diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index 8146561c5..d95afc5c6 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -177,7 +177,6 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): self.__chargeModifiedAttributes.original = self.__charge.attributes self.__chargeModifiedAttributes.overrides = self.__charge.overrides - @classmethod def buildEmpty(cls, slot): empty = Module(None) @@ -209,7 +208,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): return self.__item is None or \ (self.__item.category.name not in ("Module", "Subsystem", "Structure Module") and self.__item.group.name not in self.SYSTEM_GROUPS) or \ - (self.item.isAbyssal and (not self.baseItemID or not self.mutaplasmidID) ) + (self.item.isAbyssal and (not self.baseItemID or not self.mutaplasmidID)) @property def isMutated(self): diff --git a/eos/saveddata/mutator.py b/eos/saveddata/mutator.py index ff1473005..07af6876f 100644 --- a/eos/saveddata/mutator.py +++ b/eos/saveddata/mutator.py @@ -79,7 +79,7 @@ class Mutator(EqBase): @validates("value") def validator(self, key, val): """ Validates values as properly falling within the range of the modules' Mutaplasmid """ - mod = val/self.baseValue + mod = val / self.baseValue if self.minMod <= mod <= self.maxMod: # sweet, all good @@ -129,5 +129,3 @@ class Mutator(EqBase): @property def attribute(self): return self.__attr - - diff --git a/eve.db b/eve.db index 6bd7efc6b..ecab30628 100644 Binary files a/eve.db and b/eve.db differ diff --git a/gui/attribute_gauge.py b/gui/attribute_gauge.py index 38de597b9..1057775f7 100644 --- a/gui/attribute_gauge.py +++ b/gui/attribute_gauge.py @@ -169,7 +169,7 @@ class AttributeGauge(wx.Window): def SetValue(self, value, animate=True): """ Sets the current position of the gauge. """ - print ("="*20, self._percentage) + print("=" * 20, self._percentage) if self._value == value: return @@ -248,14 +248,15 @@ class AttributeGauge(wx.Window): w = min(w, half) # Ensure that we don't overshoot our drawing area w = math.ceil(w) # round up to nearest pixel, this ensures that we don't lose representation for sub pixels - # print("Percentage: {}\t\t\t\t\tValue: {}\t\t\t\t\tWidth: {}\t\t\t\t\tHalf: {}\t\t\t\t\tRect Width: {}".format(round(self._percentage, 3), round(value,3), w, half, rect.width)) + # print("Percentage: {}\t\t\t\t\tValue: {}\t\t\t\t\tWidth: {}\t\t\t\t\tHalf: {}\t\t\t\t\tRect Width: {}".format( + # round(self._percentage, 3), round(value,3), w, half, rect.width)) # set guide_lines every 10 pixels of the main gauge (not including borders) if self.guide_lines: for x in range(1, 20): dc.SetBrush(wx.Brush(wx.LIGHT_GREY)) dc.SetPen(wx.Pen(wx.LIGHT_GREY)) - dc.DrawRectangle(x*10, 1, 1, rect.height) + dc.DrawRectangle(x * 10, 1, 1, rect.height) dc.SetBrush(wx.Brush(colour)) dc.SetPen(wx.Pen(colour)) @@ -264,10 +265,10 @@ class AttributeGauge(wx.Window): # However, if there is an odd width, the middle pixel is shared between the left and right gauge if value >= 0: - padding = (half if is_even else math.ceil(half-1)) + 1 + padding = (half if is_even else math.ceil(half - 1)) + 1 dc.DrawRectangle(padding, 1, w, rect.height) else: - padding = half - w + 1 if is_even else math.ceil(half)-(w-1) + padding = half - w + 1 if is_even else math.ceil(half) - (w - 1) dc.DrawRectangle(padding, 1, w, rect.height) if self.leading_edge and (self.edge_on_neutral or value != 0): @@ -277,7 +278,7 @@ class AttributeGauge(wx.Window): if value > 0: dc.DrawRectangle(min(padding + w, rect.width), 1, 1, rect.height) else: - dc.DrawRectangle(max(padding-1, 1), 1, 1, rect.height) + dc.DrawRectangle(max(padding - 1, 1), 1, 1, rect.height) def OnTimer(self, event): old_value = self._old_percentage @@ -332,14 +333,12 @@ if __name__ == "__main__": wx.Panel.__init__(self, parent, size=size) box = wx.BoxSizer(wx.VERTICAL) - font = wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL, False) - self.gauge = gauge = AttributeGauge(self, size=(204, 4)) gauge.SetBackgroundColour(wx.Colour(52, 86, 98)) gauge.SetBarColour(wx.Colour(255, 128, 0)) gauge.SetValue(100) gauge.SetFractionDigits(1) - box.Add(gauge, 0, wx.ALL|wx.CENTER, 10) + box.Add(gauge, 0, wx.ALL | wx.CENTER, 10) self.gauge11 = gauge = AttributeGauge(self, size=(204, 6)) gauge.SetBackgroundColour(wx.Colour(52, 86, 98)) @@ -473,16 +472,16 @@ if __name__ == "__main__": def UpdateValue2(self, event): num = self.spinCtrl2.GetValue() self.gauge2.SetValue(num) - self.gauge3.SetValue(num*-1) + self.gauge3.SetValue(num * -1) self.gauge4.SetValue(num) - self.gauge5.SetValue(num*-1) + self.gauge5.SetValue(num * -1) self.gauge6.SetValue(num) - self.gauge7.SetValue(num*-1) + self.gauge7.SetValue(num * -1) self.gauge8.SetValue(num) - self.gauge9.SetValue(num*-1) + self.gauge9.SetValue(num * -1) def OnTimer(self, evt): - num = random.randint(-100,100) + num = random.randint(-100, 100) self.gauge.SetValue(num) self.gauge11.SetValue(num) self.gauge12.SetValue(num) diff --git a/gui/builtinItemStatsViews/attributeSlider.py b/gui/builtinItemStatsViews/attributeSlider.py index 49cb776fa..69358278c 100644 --- a/gui/builtinItemStatsViews/attributeSlider.py +++ b/gui/builtinItemStatsViews/attributeSlider.py @@ -100,10 +100,10 @@ class AttributeSlider(wx.Panel): slider_percentage = 0 if mod < 1: modEnd = self.UserMinValue - slider_percentage = (1-mod)/(1 - modEnd) * -100 + slider_percentage = (1 - mod) / (1 - modEnd) * -100 elif mod > 1: modEnd = self.UserMaxValue - slider_percentage = ((mod-1)/(modEnd-1)) * 100 + slider_percentage = ((mod - 1) / (modEnd - 1)) * 100 # print(slider_percentage) if self.inverse: slider_percentage *= -1 @@ -111,6 +111,7 @@ class AttributeSlider(wx.Panel): if post_event: wx.PostEvent(self, ValueChanged(self, None, value, None, slider_percentage)) + class TestAttributeSlider(wx.Frame): def __init__(self, parent, id): @@ -245,4 +246,3 @@ if __name__ == "__main__": # else: # self.statxt2.SetLabel("{0:.3f} ({1:+.3f})".format(newValue, newValue - self.base_value, )) # self.statxt2.SetToolTip("{0:+f}%".format(new_mod*100)) - diff --git a/gui/builtinItemStatsViews/itemMutator.py b/gui/builtinItemStatsViews/itemMutator.py index ac76955b1..614274e6e 100644 --- a/gui/builtinItemStatsViews/itemMutator.py +++ b/gui/builtinItemStatsViews/itemMutator.py @@ -9,13 +9,13 @@ from gui.contextMenu import ContextMenu from .itemAttributes import ItemParams from gui.bitmap_loader import BitmapLoader import gui.globalEvents as GE -import gui.mainFrame import random from logbook import Logger pyfalog = Logger(__name__) + class ItemMutator(wx.Panel): def __init__(self, parent, stuff, item): @@ -77,7 +77,6 @@ class ItemMutator(wx.Panel): headingSizer.Add(displayName, 3, wx.ALL | wx.EXPAND, 0) - range_low = wx.StaticText(self, wx.ID_ANY, ItemParams.FormatValue(*m.attribute.unit.TranslateValue(worse_range[0]))) range_low.SetForegroundColour(self.goodColor if worse_range[2] else self.badColor) @@ -168,4 +167,3 @@ class ItemMutator(wx.Panel): # Send signal to GUI to update stats with current active fit wx.PostEvent(mainFrame, GE.FitChanged(fitID=activeFit)) - diff --git a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py index 920ee2654..a31e56f8a 100644 --- a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py +++ b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py @@ -123,7 +123,7 @@ class PFGeneralPref(PreferenceView): self.sFit = Fit.getInstance() self.cbGlobalChar.SetValue(self.sFit.serviceFittingOptions["useGlobalCharacter"]) - self.cbDefaultCharImplants.SetValue(self.sFit.serviceFittingOptions["useCharecterImplantsByDefault"]) + self.cbDefaultCharImplants.SetValue(self.sFit.serviceFittingOptions["useCharacterImplantsByDefault"]) self.cbGlobalDmgPattern.SetValue(self.sFit.serviceFittingOptions["useGlobalDamagePattern"]) self.cbFitColorSlots.SetValue(self.sFit.serviceFittingOptions["colorFitBySlot"] or False) self.cbRackSlots.SetValue(self.sFit.serviceFittingOptions["rackSlots"] or False) @@ -194,7 +194,7 @@ class PFGeneralPref(PreferenceView): event.Skip() def OnCBDefaultCharImplantsStateChange(self, event): - self.sFit.serviceFittingOptions["useCharecterImplantsByDefault"] = self.cbDefaultCharImplants.GetValue() + self.sFit.serviceFittingOptions["useCharacterImplantsByDefault"] = self.cbDefaultCharImplants.GetValue() event.Skip() def OnCBGlobalDmgPatternStateChange(self, event): diff --git a/gui/pyfa_gauge.py b/gui/pyfa_gauge.py index 43b1dc728..61379c5b0 100644 --- a/gui/pyfa_gauge.py +++ b/gui/pyfa_gauge.py @@ -130,7 +130,7 @@ class PyGauge(wx.Window): return self._max_range def Animate(self): - #sFit = Fit.getInstance() + # sFit = Fit.getInstance() if True: if not self._timer: self._timer = wx.Timer(self, self._timer_id) diff --git a/gui/utils/exportHtml.py b/gui/utils/exportHtml.py index 796e3aa4c..d1c0af9d0 100644 --- a/gui/utils/exportHtml.py +++ b/gui/utils/exportHtml.py @@ -238,8 +238,8 @@ class exportHtmlThread(threading.Thread): HTML += ( '