From 0994158abdf8f452beeee0fe081b612bd7cec042 Mon Sep 17 00:00:00 2001 From: Neugeniko Date: Wed, 7 Mar 2018 15:27:53 +1100 Subject: [PATCH] Redefne structure mounted disruptor operation If we are projecting effects, modify warpScrambleStatus all the time, and turn off modules requiring 'High Speed Maneuvering' (MWDs) or "Micro Jump Drive Operation" (MJD etc) if a scrambling script is loaded. --- ...tructurewarpscrambleblockmwdwithnpceffect.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py index 283a1451f..aee7b22f9 100644 --- a/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py +++ b/eos/effects/structurewarpscrambleblockmwdwithnpceffect.py @@ -7,12 +7,11 @@ type = "projected", "active" def handler(fit, module, context): - if "projected" not in context: - return - - fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) - - # this is such a dirty hack - 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 + if "projected" in context: + fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength")) + if module.charge is not None and module.charge.ID == 47336: + 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 + if not mod.isEmpty and mod.item.requiresSkill("Micro Jump Drive Operation") and mod.state > State.ONLINE: + mod.state = State.ONLINE