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:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user