Fix an issue with with Cap Power Relay using an effect without an expecting source attribute. Used to work, but with changes to getModifiedItemAttr need to default these to None

This commit is contained in:
blitzmann
2017-11-24 00:55:23 -05:00
parent e032c9c5b1
commit a7086b78cb
3 changed files with 9 additions and 3 deletions

View File

@@ -10,4 +10,6 @@ type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("capacitorCapacity", module.getModifiedItemAttr("capacitorCapacityMultiplier"))
# We default this to None as there are times when the source attribute doesn't exist (for example, Cap Power Relay).
# It will return 0 as it doesn't exist, which would nullify whatever the target attribute is
fit.ship.multiplyItemAttr("capacitorCapacity", module.getModifiedItemAttr("capacitorCapacityMultiplier", None))

View File

@@ -9,4 +9,6 @@ type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("powerOutput", module.getModifiedItemAttr("powerOutputMultiplier"))
# We default this to None as there are times when the source attribute doesn't exist (for example, Cap Power Relay).
# It will return 0 as it doesn't exist, which would nullify whatever the target attribute is
fit.ship.multiplyItemAttr("powerOutput", module.getModifiedItemAttr("powerOutputMultiplier", None))

View File

@@ -9,4 +9,6 @@ type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("shieldCapacity", module.getModifiedItemAttr("shieldCapacityMultiplier"))
# We default this to None as there are times when the source attribute doesn't exist (for example, Cap Power Relay).
# It will return 0 as it doesn't exist, which would nullify whatever the target attribute is
fit.ship.multiplyItemAttr("shieldCapacity", module.getModifiedItemAttr("shieldCapacityMultiplier", None))