Files
pyfa/eos/effects/warpscrambleblockmwdwithnpceffect.py
Neugeniko 0713251685 Redefine scrambler 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.

(cherry picked from commit 04c62aabea)
2018-03-24 17:59:23 -04:00

23 lines
735 B
Python

# warpScrambleBlockMWDWithNPCEffect
#
# Used by:
# Modules named like: Warp Scrambler (26 of 26)
from eos.saveddata.module import State
runTime = "early"
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 not mod.isEmpty and mod.item.requiresSkill("Micro Jump Drive Operation") and mod.state > State.ONLINE:
mod.state = State.ONLINE