From 0dbdbf7cfeac93dfa7922b9cfe41ab89359344d3 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Wed, 26 Oct 2016 08:42:49 -0700 Subject: [PATCH 1/2] Add Burst Jammer to effects modified by Scorpion hull bonus --- eos/effects/caldarishipewstrengthcb.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eos/effects/caldarishipewstrengthcb.py b/eos/effects/caldarishipewstrengthcb.py index 1ac5a01c0..4a8dd9c52 100644 --- a/eos/effects/caldarishipewstrengthcb.py +++ b/eos/effects/caldarishipewstrengthcb.py @@ -3,8 +3,13 @@ # Used by: # Ship: Scorpion type = "passive" + + def handler(fit, ship, context): for sensorType in ("Gravimetric", "Ladar", "Magnetometric", "Radar"): - fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "ECM", - "scan{0}StrengthBonus".format(sensorType), - ship.getModifiedItemAttr("shipBonusCB"), skill="Caldari Battleship") + fit.modules.filteredItemBoost( + (lambda mod: mod.item.group.name == "ECM" or + mod.item.group.name == "Burst Jammer" + ), + "scan{0}StrengthBonus".format(sensorType), + ship.getModifiedItemAttr("shipBonusCB"), skill="Caldari Battleship") From e7c79e58b4b0cf2589233f06a62236d66ecd0504 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Wed, 26 Oct 2016 10:09:43 -0700 Subject: [PATCH 2/2] Use in instead of or, because that makes sense --- eos/effects/caldarishipewstrengthcb.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/eos/effects/caldarishipewstrengthcb.py b/eos/effects/caldarishipewstrengthcb.py index 4a8dd9c52..a1e808484 100644 --- a/eos/effects/caldarishipewstrengthcb.py +++ b/eos/effects/caldarishipewstrengthcb.py @@ -7,9 +7,10 @@ type = "passive" def handler(fit, ship, context): for sensorType in ("Gravimetric", "Ladar", "Magnetometric", "Radar"): - fit.modules.filteredItemBoost( - (lambda mod: mod.item.group.name == "ECM" or - mod.item.group.name == "Burst Jammer" - ), - "scan{0}StrengthBonus".format(sensorType), - ship.getModifiedItemAttr("shipBonusCB"), skill="Caldari Battleship") + fit.modules.filteredItemBoost(lambda mod: mod.item.group.name in + ( + "ECM", + "Burst Jammer", + ), + "scan{0}StrengthBonus".format(sensorType), + ship.getModifiedItemAttr("shipBonusCB"), skill="Caldari Battleship")