Merge branch 'master' into singularity
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
# Submit a bug report bug report or feature request
|
<!--
|
||||||
|
|
||||||
|
Submit a bug report bug report or feature request
|
||||||
|
|
||||||
Here you can inform pyfa developers of potential bugs or suggest features / improvements to the project. Please check
|
Here you can inform pyfa developers of potential bugs or suggest features / improvements to the project. Please check
|
||||||
to make sure that the bug hasn't been reported or feature requested before submitting. If you have general questions
|
to make sure that the bug hasn't been reported or feature requested before submitting. If you have general questions
|
||||||
about the project and want to reach out to the developers personally, please check out out our [Slack]
|
about the project and want to reach out to the developers personally, please check out out our [Slack]
|
||||||
(https://pyfainvite.azurewebsites.net/).
|
(https://pyfainvite.azurewebsites.net/).
|
||||||
|
|
||||||
---
|
-->
|
||||||
|
|
||||||
## Bug Report
|
## Bug Report
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ def handler(fit, src, context, **kwargs):
|
|||||||
amount = src.getModifiedItemAttr("powerTransferAmount")
|
amount = src.getModifiedItemAttr("powerTransferAmount")
|
||||||
time = src.getModifiedItemAttr("duration")
|
time = src.getModifiedItemAttr("duration")
|
||||||
|
|
||||||
if 'effect' in kwargs:
|
if 'effect' in kwargs and "projected" in context:
|
||||||
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
||||||
|
|
||||||
if "projected" in context:
|
if "projected" in context:
|
||||||
|
|||||||
@@ -11,13 +11,14 @@ displayName = "ECM"
|
|||||||
prefix = "fighterAbilityECM"
|
prefix = "fighterAbilityECM"
|
||||||
|
|
||||||
type = "projected", "active"
|
type = "projected", "active"
|
||||||
|
grouped = True
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, module, context, **kwargs):
|
def handler(fit, module, context, **kwargs):
|
||||||
if "projected" not in context:
|
if "projected" not in context:
|
||||||
return
|
return
|
||||||
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
|
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
|
||||||
strModifier = 1 - module.getModifiedItemAttr("{}Strength{}".format(prefix, fit.scanType)) / fit.scanStrength
|
strModifier = 1 - (module.getModifiedItemAttr("{}Strength{}".format(prefix, fit.scanType)) * module.amountActive) / fit.scanStrength
|
||||||
|
|
||||||
if 'effect' in kwargs:
|
if 'effect' in kwargs:
|
||||||
strModifier *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
strModifier *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
||||||
|
|||||||
@@ -9,11 +9,12 @@ from eos.modifiedAttributeDict import ModifiedAttributeDict
|
|||||||
displayName = "Energy Neutralizer"
|
displayName = "Energy Neutralizer"
|
||||||
prefix = "fighterAbilityEnergyNeutralizer"
|
prefix = "fighterAbilityEnergyNeutralizer"
|
||||||
type = "active", "projected"
|
type = "active", "projected"
|
||||||
|
grouped = True
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context, **kwargs):
|
def handler(fit, src, context, **kwargs):
|
||||||
if "projected" in context:
|
if "projected" in context:
|
||||||
amount = src.getModifiedItemAttr("{}Amount".format(prefix))
|
amount = src.getModifiedItemAttr("{}Amount".format(prefix)) * src.amountActive
|
||||||
time = src.getModifiedItemAttr("{}Duration".format(prefix))
|
time = src.getModifiedItemAttr("{}Duration".format(prefix))
|
||||||
|
|
||||||
if 'effect' in kwargs:
|
if 'effect' in kwargs:
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ runTime = "late"
|
|||||||
|
|
||||||
|
|
||||||
def handler(fit, module, context):
|
def handler(fit, module, context):
|
||||||
module.boostItemAttr("maxVelocity", module.getModifiedItemAttr("fighterAbilityMicroWarpDriveSpeedBonus"))
|
module.boostItemAttr("maxVelocity", module.getModifiedItemAttr("fighterAbilityMicroWarpDriveSpeedBonus"),
|
||||||
|
stackingPenalties=True)
|
||||||
module.boostItemAttr("signatureRadius",
|
module.boostItemAttr("signatureRadius",
|
||||||
module.getModifiedItemAttr("fighterAbilityMicroWarpDriveSignatureRadiusBonus"),
|
module.getModifiedItemAttr("fighterAbilityMicroWarpDriveSignatureRadiusBonus"),
|
||||||
stackingPenalties=True)
|
stackingPenalties=True)
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ effects, and thus this effect file contains some custom information useful only
|
|||||||
|
|
||||||
# User-friendly name for the ability
|
# User-friendly name for the ability
|
||||||
displayName = "Stasis Webifier"
|
displayName = "Stasis Webifier"
|
||||||
|
|
||||||
prefix = "fighterAbilityStasisWebifier"
|
prefix = "fighterAbilityStasisWebifier"
|
||||||
|
|
||||||
type = "active", "projected"
|
type = "active", "projected"
|
||||||
|
grouped = True
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
if "projected" not in context:
|
if "projected" not in context:
|
||||||
return
|
return
|
||||||
fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("{}SpeedPenalty".format(prefix)))
|
fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("{}SpeedPenalty".format(prefix)) * src.amountActive,
|
||||||
|
stackingPenalties=True)
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ effects, and thus this effect file contains some custom information useful only
|
|||||||
displayName = "Warp Disruption"
|
displayName = "Warp Disruption"
|
||||||
prefix = "fighterAbilityWarpDisruption"
|
prefix = "fighterAbilityWarpDisruption"
|
||||||
type = "active", "projected"
|
type = "active", "projected"
|
||||||
|
grouped = True
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
if "projected" not in context:
|
if "projected" not in context:
|
||||||
return
|
return
|
||||||
fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("{}PointStrength".format(prefix)))
|
fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("{}PointStrength".format(prefix)) * src.amountActive)
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ type = "passive"
|
|||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Repair Drone Operation"),
|
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Drone Operation"),
|
||||||
"structureDamageAmount", src.getModifiedItemAttr("shipBonusRole2"))
|
"structureDamageAmount", src.getModifiedItemAttr("shipBonusRole2"))
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Repair Drone Operation"),
|
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Drone Operation"),
|
||||||
"shieldBonus", src.getModifiedItemAttr("shipBonusRole2"))
|
"shieldBonus", src.getModifiedItemAttr("shipBonusRole2"))
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Repair Drone Operation"),
|
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Drone Operation"),
|
||||||
"armorDamageAmount", src.getModifiedItemAttr("shipBonusRole2"))
|
"armorDamageAmount", src.getModifiedItemAttr("shipBonusRole2"))
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Repair Drone Operation"),
|
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Drone Operation"),
|
||||||
"armorHP", src.getModifiedItemAttr("shipBonusRole2"))
|
"armorHP", src.getModifiedItemAttr("shipBonusRole2"))
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Repair Drone Operation"),
|
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Drone Operation"),
|
||||||
"shieldCapacity", src.getModifiedItemAttr("shipBonusRole2"))
|
"shieldCapacity", src.getModifiedItemAttr("shipBonusRole2"))
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Repair Drone Operation"),
|
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Drone Operation"),
|
||||||
"hp", src.getModifiedItemAttr("shipBonusRole2"))
|
"hp", src.getModifiedItemAttr("shipBonusRole2"))
|
||||||
|
|||||||
@@ -271,17 +271,19 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
|||||||
projected = False
|
projected = False
|
||||||
|
|
||||||
for ability in self.abilities:
|
for ability in self.abilities:
|
||||||
if ability.active:
|
if not ability.active:
|
||||||
effect = ability.effect
|
continue
|
||||||
if effect.runTime == runTime and effect.activeByDefault and \
|
|
||||||
((projected and effect.isType("projected")) or not projected):
|
effect = ability.effect
|
||||||
if ability.grouped:
|
if effect.runTime == runTime and effect.activeByDefault and \
|
||||||
|
((projected and effect.isType("projected")) or not projected):
|
||||||
|
if ability.grouped:
|
||||||
|
effect.handler(fit, self, context)
|
||||||
|
else:
|
||||||
|
i = 0
|
||||||
|
while i != self.amountActive:
|
||||||
effect.handler(fit, self, context)
|
effect.handler(fit, self, context)
|
||||||
else:
|
i += 1
|
||||||
i = 0
|
|
||||||
while i != self.amountActive:
|
|
||||||
effect.handler(fit, self, context)
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
def __deepcopy__(self, memo):
|
def __deepcopy__(self, memo):
|
||||||
copy = Fighter(self.item)
|
copy = Fighter(self.item)
|
||||||
|
|||||||
@@ -358,12 +358,13 @@ class FitItem(SFItem.SFBrowserItem):
|
|||||||
self.deleted = True
|
self.deleted = True
|
||||||
|
|
||||||
sFit = Fit.getInstance()
|
sFit = Fit.getInstance()
|
||||||
fit = sFit.getFit(self.fitID)
|
|
||||||
|
|
||||||
# need to delete from import cache before actually deleting fit
|
# need to delete from import cache before actually deleting fit
|
||||||
if self.shipBrowser.GetActiveStage() == 5:
|
if self.shipBrowser.GetActiveStage() == 5:
|
||||||
if fit in self.shipBrowser.lastdata: # remove fit from import cache
|
for x in self.shipBrowser.lastdata: # remove fit from import cache
|
||||||
self.shipBrowser.lastdata.remove(fit)
|
if x[0] == self.fitID:
|
||||||
|
self.shipBrowser.lastdata.remove(x)
|
||||||
|
break
|
||||||
|
|
||||||
sFit.deleteFit(self.fitID)
|
sFit.deleteFit(self.fitID)
|
||||||
|
|
||||||
@@ -372,7 +373,7 @@ class FitItem(SFItem.SFBrowserItem):
|
|||||||
|
|
||||||
# todo: would a simple RefreshList() work here instead of posting that a stage has been selected?
|
# todo: would a simple RefreshList() work here instead of posting that a stage has been selected?
|
||||||
if self.shipBrowser.GetActiveStage() == 5:
|
if self.shipBrowser.GetActiveStage() == 5:
|
||||||
wx.PostEvent(self.shipBrowser, events.ImportSelected(fits=self.shipBrowser.lastdata))
|
wx.PostEvent(self.shipBrowser, events.ImportSelected(fits=self.shipBrowser.lastdata, recent=self.shipBrowser.recentFits))
|
||||||
elif self.shipBrowser.GetActiveStage() == 4:
|
elif self.shipBrowser.GetActiveStage() == 4:
|
||||||
wx.PostEvent(self.shipBrowser, events.SearchSelected(text=self.shipBrowser.navpanel.lastSearch, back=True))
|
wx.PostEvent(self.shipBrowser, events.SearchSelected(text=self.shipBrowser.navpanel.lastSearch, back=True))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -59,13 +59,14 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from utils.compat import OrderedDict
|
from utils.compat import OrderedDict
|
||||||
|
|
||||||
EFT_SLOT_ORDER = [Slot.LOW, Slot.MED, Slot.HIGH, Slot.RIG, Slot.SUBSYSTEM]
|
EFT_SLOT_ORDER = [Slot.LOW, Slot.MED, Slot.HIGH, Slot.RIG, Slot.SUBSYSTEM, Slot.SERVICE]
|
||||||
INV_FLAGS = {
|
INV_FLAGS = {
|
||||||
Slot.LOW: 11,
|
Slot.LOW: 11,
|
||||||
Slot.MED: 19,
|
Slot.MED: 19,
|
||||||
Slot.HIGH: 27,
|
Slot.HIGH: 27,
|
||||||
Slot.RIG: 92,
|
Slot.RIG: 92,
|
||||||
Slot.SUBSYSTEM: 125
|
Slot.SUBSYSTEM: 125,
|
||||||
|
Slot.SERVICE: 164
|
||||||
}
|
}
|
||||||
|
|
||||||
INV_FLAG_CARGOBAY = 5
|
INV_FLAG_CARGOBAY = 5
|
||||||
|
|||||||
Reference in New Issue
Block a user