Merge remote-tracking branch 'origin/master' into citadel

Conflicts:
	config.py
This commit is contained in:
blitzmann
2016-07-16 21:45:28 -04:00
18 changed files with 54 additions and 13 deletions

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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"))

View File

@@ -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)

View File

@@ -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")

View File

@@ -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")

View File

@@ -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")

View File

@@ -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))
)

View File

@@ -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)

View File

@@ -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()):

View File

@@ -762,7 +762,7 @@ class Market():
def cb():
try:
callback(requests)
except:
except Exception, e:
pass
eos.db.commit()