From 016854a292b84f7fe6eeb7d3b8736d57702433cb Mon Sep 17 00:00:00 2001 From: blitzmann Date: Mon, 4 Jul 2016 23:30:52 -0400 Subject: [PATCH] Clean up effects --- eos/effects/pointdefense.py | 8 +------- eos/effects/structureMissileGuidanceEnhancer.py | 11 ++++++----- eos/effects/structureballisticcontrolsystem.py | 13 ++++++------- eos/effects/structureenergyneutralizerfalloff.py | 9 --------- eos/effects/structuremoduleeffectecm.py | 8 -------- .../structuremoduleeffectremotesensordampener.py | 9 +-------- eos/effects/structuremoduleeffectstasiswebifier.py | 10 ---------- eos/effects/structuremoduleeffecttargetpainter.py | 8 -------- .../structuremoduleeffectweapondisruption.py | 9 +-------- .../structurewarpscrambleblockmwdwithnpceffect.py | 9 --------- 10 files changed, 15 insertions(+), 79 deletions(-) diff --git a/eos/effects/pointdefense.py b/eos/effects/pointdefense.py index fba6177ae..41574b8ab 100644 --- a/eos/effects/pointdefense.py +++ b/eos/effects/pointdefense.py @@ -4,10 +4,4 @@ # Citadel Point Defense type = 'active' def handler(fit, module, context): - # Set reload time to 1 second - module.reloadTime = 1000 - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. -# also doesn't have reload so... \ No newline at end of file + pass diff --git a/eos/effects/structureMissileGuidanceEnhancer.py b/eos/effects/structureMissileGuidanceEnhancer.py index 0ce10caac..3e06f4488 100644 --- a/eos/effects/structureMissileGuidanceEnhancer.py +++ b/eos/effects/structureMissileGuidanceEnhancer.py @@ -4,15 +4,16 @@ # Modules from group: Missile Guidance Enhancer (3 of 3) type = "passive" def handler(fit, module, context): - fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + groups = ("Structure Anti-Capital Missile", "Structure Anti-Subcapital Missile") + fit.modules.filteredChargeBoost(lambda mod: mod.charge.group.name in groups, "aoeCloudSize", module.getModifiedItemAttr("aoeCloudSizeBonus"), stackingPenalties=True) - fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + fit.modules.filteredChargeBoost(lambda mod: mod.charge.group.name in groups, "aoeVelocity", module.getModifiedItemAttr("aoeVelocityBonus"), stackingPenalties=True) - fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + fit.modules.filteredChargeBoost(lambda mod: mod.charge.group.name in groups, "explosionDelay", module.getModifiedItemAttr("explosionDelayBonus"), stackingPenalties=True) - fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + fit.modules.filteredChargeBoost(lambda mod: mod.charge.group.name in groups, "maxVelocity", module.getModifiedItemAttr("missileVelocityBonus"), - stackingPenalties=True) + stackingPenalties=True) \ No newline at end of file diff --git a/eos/effects/structureballisticcontrolsystem.py b/eos/effects/structureballisticcontrolsystem.py index 146dcd166..b21499c99 100644 --- a/eos/effects/structureballisticcontrolsystem.py +++ b/eos/effects/structureballisticcontrolsystem.py @@ -1,14 +1,13 @@ -# missileDMGBonus -# -# Used by: -# Modules from group: Ballistic Control system (17 of 17) -# Modules named like: QA Multiship Module Players (4 of 4) type = "passive" def handler(fit, module, context): + missileGroups = ("Structure Anti-Capital Missile", "Structure Anti-Subcapital Missile") + for dmgType in ("em", "kinetic", "explosive", "thermal"): - fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"), + fit.modules.filteredChargeMultiply(lambda mod: mod.charge.group.name in missileGroups, "%sDamage" % dmgType, module.getModifiedItemAttr("missileDamageMultiplierBonus"), stackingPenalties = True) - fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Missile Launcher Operation"), + + launcherGroups = ("Structure AXL Missile Launcher", "Structure ASML Missile Launcher") + fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name in launcherGroups, "speed", module.getModifiedItemAttr("speedMultiplier"), stackingPenalties=True) diff --git a/eos/effects/structureenergyneutralizerfalloff.py b/eos/effects/structureenergyneutralizerfalloff.py index 448574da3..8a5754ef6 100644 --- a/eos/effects/structureenergyneutralizerfalloff.py +++ b/eos/effects/structureenergyneutralizerfalloff.py @@ -1,7 +1,3 @@ -# energyNeutralizerFalloff -# -# Used by: -# Modules from group: Energy Neutralizer (51 of 51) from eos.types import State type = "active", "projected" def handler(fit, container, context): @@ -10,8 +6,3 @@ def handler(fit, container, context): amount = container.getModifiedItemAttr("energyNeutralizerAmount") time = container.getModifiedItemAttr("duration") fit.addDrain(time, amount, 0) - - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure.` \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectecm.py b/eos/effects/structuremoduleeffectecm.py index 3666b00ab..ff841419e 100644 --- a/eos/effects/structuremoduleeffectecm.py +++ b/eos/effects/structuremoduleeffectecm.py @@ -1,7 +1,3 @@ -# remoteECMFalloff -# -# Used by: -# Modules from group: ECM (39 of 39) type = "projected", "active" def handler(fit, module, context): if "projected" in context: @@ -9,7 +5,3 @@ def handler(fit, module, context): strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType))/fit.scanStrength fit.ecmProjectedStr *= strModifier - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectremotesensordampener.py b/eos/effects/structuremoduleeffectremotesensordampener.py index eb02524de..5ec677fcc 100644 --- a/eos/effects/structuremoduleeffectremotesensordampener.py +++ b/eos/effects/structuremoduleeffectremotesensordampener.py @@ -1,7 +1,4 @@ -# remoteSensorDampFalloff -# -# Used by: -# Modules from group: Sensor Dampener (6 of 6) + type= "projected", "active" def handler(fit, module, context): if "projected" not in context: @@ -12,7 +9,3 @@ def handler(fit, module, context): fit.ship.boostItemAttr("scanResolution", module.getModifiedItemAttr("scanResolutionBonus"), stackingPenalties = True, remoteResists=True) - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectstasiswebifier.py b/eos/effects/structuremoduleeffectstasiswebifier.py index 7e28f4fe7..f0c5872a1 100644 --- a/eos/effects/structuremoduleeffectstasiswebifier.py +++ b/eos/effects/structuremoduleeffectstasiswebifier.py @@ -1,15 +1,5 @@ -# remoteWebifierFalloff -# -# Used by: -# Modules from group: Stasis Grappler (7 of 7) -# Modules from group: Stasis Web (18 of 18) type = "active", "projected" def handler(fit, module, context): if "projected" not in context: return fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("speedFactor"), stackingPenalties = True, remoteResists=True) - - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffecttargetpainter.py b/eos/effects/structuremoduleeffecttargetpainter.py index 50b526878..e86453eb5 100644 --- a/eos/effects/structuremoduleeffecttargetpainter.py +++ b/eos/effects/structuremoduleeffecttargetpainter.py @@ -1,13 +1,5 @@ -# remoteTargetPaintFalloff -# -# Used by: -# Modules from group: Target Painter (8 of 8) type = "projected", "active" def handler(fit, container, context): if "projected" in context: fit.ship.boostItemAttr("signatureRadius", container.getModifiedItemAttr("signatureRadiusBonus"), stackingPenalties = True, remoteResists=True) - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structuremoduleeffectweapondisruption.py b/eos/effects/structuremoduleeffectweapondisruption.py index 878153040..7c25bd67a 100644 --- a/eos/effects/structuremoduleeffectweapondisruption.py +++ b/eos/effects/structuremoduleeffectweapondisruption.py @@ -1,7 +1,4 @@ -# remoteGuidanceDisruptFalloff -# -# Used by: -# Variations of module: Standup Weapon Disruptor + type = "active", "projected" def handler(fit, module, context): @@ -25,7 +22,3 @@ def handler(fit, module, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"), "falloff", module.getModifiedItemAttr("falloffBonus"), stackingPenalties = True, remoteResists=True) - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file diff --git a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py index b287d368f..c04eca1dd 100644 --- a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py +++ b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py @@ -1,7 +1,3 @@ -# structureWarpScrambleBlockMWDWithNPCEffect -# -# Used by: -# Modules named like: Standup Warp Scrambler runTime = "early" type = "projected", "active" @@ -14,8 +10,3 @@ def handler(fit, module, context): for mod in fit.modules: if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE: mod.state = State.ONLINE - - -# TODO -# believe this doesn't actual require skills to use. -# Need to figure out how to remove the skill req *OR* tie it to the structure. \ No newline at end of file