diff --git a/eos/effects/armorrepairamountbonussubcap.py b/eos/effects/armorrepairamountbonussubcap.py new file mode 100644 index 000000000..789904788 --- /dev/null +++ b/eos/effects/armorrepairamountbonussubcap.py @@ -0,0 +1,8 @@ +# armorRepairAmountBonusSubcap +# +# Used by: +# Implants named like: Grade Asklepian (15 of 16) +type = "passive" +def handler(fit, src, context): + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"), + "armorDamageAmount", src.getModifiedItemAttr("armorRepairBonus")) diff --git a/eos/effects/setbonusasklepian.py b/eos/effects/setbonusasklepian.py new file mode 100644 index 000000000..4fa394586 --- /dev/null +++ b/eos/effects/setbonusasklepian.py @@ -0,0 +1,10 @@ +# setBonusAsklepian +# +# Used by: +# Implants named like: Asklepian Omega (3 of 3) +# Implants named like: Grade Asklepian (16 of 16) +runTime = "early" +type = "passive" +def handler(fit, src, context): + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Cybernetics"), + "armorRepairBonus", src.getModifiedItemAttr("implantSetSerpentis2")) diff --git a/eos/effects/setbonuschristmasagilitybonus.py b/eos/effects/setbonuschristmasagilitybonus.py index f0ca5c03f..760c76e05 100644 --- a/eos/effects/setbonuschristmasagilitybonus.py +++ b/eos/effects/setbonuschristmasagilitybonus.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "agilityBonus", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmasarmorhpbonus2.py b/eos/effects/setbonuschristmasarmorhpbonus2.py index 9f5c52fd4..6d096e01a 100644 --- a/eos/effects/setbonuschristmasarmorhpbonus2.py +++ b/eos/effects/setbonuschristmasarmorhpbonus2.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "armorHpBonus2", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmasbonusvelocity.py b/eos/effects/setbonuschristmasbonusvelocity.py index 09b1ef21f..09352ce10 100644 --- a/eos/effects/setbonuschristmasbonusvelocity.py +++ b/eos/effects/setbonuschristmasbonusvelocity.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "implantBonusVelocity", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmascapacitorcapacity.py b/eos/effects/setbonuschristmascapacitorcapacity.py index cc949b255..79cc5654a 100644 --- a/eos/effects/setbonuschristmascapacitorcapacity.py +++ b/eos/effects/setbonuschristmascapacitorcapacity.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "capacitorCapacityBonus", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmascapacitorrecharge2.py b/eos/effects/setbonuschristmascapacitorrecharge2.py index a526176e4..a6c85f4de 100644 --- a/eos/effects/setbonuschristmascapacitorrecharge2.py +++ b/eos/effects/setbonuschristmascapacitorrecharge2.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "capRechargeBonus", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmascpuoutput.py b/eos/effects/setbonuschristmascpuoutput.py index e264c8dd5..554485070 100644 --- a/eos/effects/setbonuschristmascpuoutput.py +++ b/eos/effects/setbonuschristmascpuoutput.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "cpuOutputBonus2", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmaspowergrid.py b/eos/effects/setbonuschristmaspowergrid.py index 9c39919be..936f394dc 100644 --- a/eos/effects/setbonuschristmaspowergrid.py +++ b/eos/effects/setbonuschristmaspowergrid.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "powerEngineeringOutputBonus", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/setbonuschristmasshieldcapacitybonus.py b/eos/effects/setbonuschristmasshieldcapacitybonus.py index c604d0281..8de48f2ab 100644 --- a/eos/effects/setbonuschristmasshieldcapacitybonus.py +++ b/eos/effects/setbonuschristmasshieldcapacitybonus.py @@ -5,5 +5,5 @@ runTime = "early" type = "passive" def handler(fit, implant, context): - fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Cyberimplant", + fit.appliedImplants.filteredItemMultiply(lambda mod: mod.item.group.name == "Special Edition Implant", "shieldCapacityBonus", implant.getModifiedItemAttr("implantSetChristmas")) diff --git a/eos/effects/systemarmorremoterepairamount.py b/eos/effects/systemarmorremoterepairamount.py index ec0e84f4b..288ccfefd 100644 --- a/eos/effects/systemarmorremoterepairamount.py +++ b/eos/effects/systemarmorremoterepairamount.py @@ -5,6 +5,6 @@ runTime = "early" type = ("projected", "passive") def handler(fit, module, context): - fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Remote Armor Repairer", + fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "armorDamageAmount", module.getModifiedItemAttr("armorDamageAmountMultiplierRemote"), stackingPenalties=True) diff --git a/eos/effects/systemarmorrepairamount.py b/eos/effects/systemarmorrepairamount.py index 1c659a1b2..5ba4e2aa1 100644 --- a/eos/effects/systemarmorrepairamount.py +++ b/eos/effects/systemarmorrepairamount.py @@ -5,6 +5,7 @@ runTime = "early" type = ("projected", "passive") def handler(fit, module, context): - fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Armor Repair Unit", + fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Repair Systems") + or mod.item.requiresSkill("Capital Repair Systems"), "armorDamageAmount", module.getModifiedItemAttr("armorDamageAmountMultiplier"), stackingPenalties=True, penaltyGroup="postMul") diff --git a/eos/effects/systemshieldremoterepairamount.py b/eos/effects/systemshieldremoterepairamount.py index e1b1b4582..5c2edef34 100644 --- a/eos/effects/systemshieldremoterepairamount.py +++ b/eos/effects/systemshieldremoterepairamount.py @@ -5,6 +5,6 @@ runTime = "early" type = ("projected", "passive") def handler(fit, module, context): - fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Remote Shield Booster", + fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Shield Emission Systems"), "shieldBonus", module.getModifiedItemAttr("shieldBonusMultiplierRemote"), stackingPenalties=True, penaltyGroup="postMul") diff --git a/eos/effects/systemshieldrepairamountshieldskills.py b/eos/effects/systemshieldrepairamountshieldskills.py index 7ce51af06..40dc3377d 100644 --- a/eos/effects/systemshieldrepairamountshieldskills.py +++ b/eos/effects/systemshieldrepairamountshieldskills.py @@ -5,6 +5,7 @@ runTime = "early" type = ("projected", "passive") def handler(fit, module, context): - fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Shield Operation") or mod.item.requiresSkill("Capital Shield Operation"), + fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Shield Operation") + or mod.item.requiresSkill("Capital Shield Operation"), "shieldBonus", module.getModifiedItemAttr("shieldBonusMultiplier"), stackingPenalties=True, penaltyGroup="postMul") diff --git a/eos/saveddata/implant.py b/eos/saveddata/implant.py index b5be77986..a4a6de74d 100644 --- a/eos/saveddata/implant.py +++ b/eos/saveddata/implant.py @@ -104,3 +104,8 @@ class Implant(HandledItem, ItemAttrShortcut): copy = Implant(self.item) copy.active = self.active return copy + + def __repr__(self): + return "Implant(ID={}, name={}) at {}".format( + self.item.ID, self.item.name, hex(id(self)) + ) diff --git a/gui/builtinStatsViews/priceViewFull.py b/gui/builtinStatsViews/priceViewFull.py index 593a2ab8e..16935a136 100644 --- a/gui/builtinStatsViews/priceViewFull.py +++ b/gui/builtinStatsViews/priceViewFull.py @@ -83,6 +83,11 @@ class PriceViewFull(StatsView): for drone in fit.drones: for _ in xrange(drone.amount): typeIDs.append(drone.itemID) + + for fighter in fit.fighters: + for _ in xrange(fighter.amountActive): + typeIDs.append(fighter.itemID) + for cargo in fit.cargo: for _ in xrange(cargo.amount): typeIDs.append(cargo.itemID) diff --git a/gui/itemStats.py b/gui/itemStats.py index d3388e978..f154d277a 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -29,6 +29,7 @@ from gui.utils.numberFormatter import formatAmount import service import config from gui.contextMenu import ContextMenu +from gui.utils.numberFormatter import formatAmount try: from collections import OrderedDict @@ -551,6 +552,10 @@ class ItemCompare(wx.Panel): self.UpdateList() event.Skip() + def processPrices(self, prices): + for i, price in enumerate(prices): + self.paramList.SetStringItem(i, len(self.attrs)+1, formatAmount(price.price, 3, 3, 9, currency=True)) + def PopulateList(self): self.paramList.InsertColumn(0, "Item") self.paramList.SetColumnWidth(0, 200) @@ -560,6 +565,12 @@ class ItemCompare(wx.Panel): self.paramList.InsertColumn(i+1, name) self.paramList.SetColumnWidth(i+1, 120) + self.paramList.InsertColumn(len(self.attrs)+1, "Price") + self.paramList.SetColumnWidth(len(self.attrs)+1, 60) + + sMkt = service.Market.getInstance() + sMkt.getPrices([x.ID for x in self.items], self.processPrices) + for item in self.items: i = self.paramList.InsertStringItem(sys.maxint, item.name) for x, attr in enumerate(self.attrs.keys()): diff --git a/service/market.py b/service/market.py index 1b9bb870b..4cfc1a9dd 100644 --- a/service/market.py +++ b/service/market.py @@ -762,7 +762,7 @@ class Market(): def cb(): try: callback(requests) - except: + except Exception, e: pass eos.db.commit()