Redefine Warp Disruption Field Generators operation
If we are applying effects onto our self, disallowAssistance all the time, and go into low mass/high sig etc mode when no script is loaded.
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 77a66a66ea)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
# warpDisruptSphere
|
||||
#
|
||||
# Used by:
|
||||
@@ -9,18 +10,23 @@ runTime = "early"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
fit.ship.boostItemAttr("mass", module.getModifiedItemAttr("massBonusPercentage"))
|
||||
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusBonus"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
"speedBoostFactor", module.getModifiedItemAttr("speedBoostFactorBonus"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
"speedFactor", module.getModifiedItemAttr("speedFactorBonus"))
|
||||
fit.ship.forceItemAttr("disallowAssistance", 1)
|
||||
|
||||
|
||||
if "projected" in context:
|
||||
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
|
||||
|
||||
if module.charge is not None and module.charge.ID == 45010:
|
||||
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
|
||||
else:
|
||||
if module.charge is None:
|
||||
fit.ship.boostItemAttr("mass", module.getModifiedItemAttr("massBonusPercentage"))
|
||||
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusBonus"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
"speedBoostFactor", module.getModifiedItemAttr("speedBoostFactorBonus"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
|
||||
"speedFactor", module.getModifiedItemAttr("speedFactorBonus"))
|
||||
|
||||
fit.ship.forceItemAttr("disallowAssistance", 1)
|
||||
|
||||
Reference in New Issue
Block a user