MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / handler

Method handler

eos/effects.py:26914–26932  ·  view source on GitHub ↗
(fit, module, context, projectionRange, **kwargs)

Source from the content-addressed store, hash-verified

26912
26913 @staticmethod
26914 def handler(fit, module, context, projectionRange, **kwargs):
26915 if 'projected' not in context:
26916 return
26917 if fit.ship.getModifiedItemAttr('disallowAssistance'):
26918 return
26919 rangeFactor = calculateRangeFactor(
26920 srcOptimalRange=module.getModifiedItemAttr('maxRange'),
26921 srcFalloffRange=module.getModifiedItemAttr('falloffEffectiveness'),
26922 distance=projectionRange)
26923 for srcAttr, tgtAttr in (
26924 ('maxTargetRangeBonus', 'maxTargetRange'),
26925 ('scanResolutionBonus', 'scanResolution'),
26926 ('scanGravimetricStrengthPercent', 'scanGravimetricStrength'),
26927 ('scanMagnetometricStrengthPercent', 'scanMagnetometricStrength'),
26928 ('scanRadarStrengthPercent', 'scanRadarStrength'),
26929 ('scanLadarStrengthPercent', 'scanLadarStrength')
26930 ):
26931 fit.ship.boostItemAttr(tgtAttr, module.getModifiedItemAttr(srcAttr) * rangeFactor,
26932 stackingPenalties=True, **kwargs)
26933
26934
26935class Effect6428(BaseEffect):

Callers

nothing calls this directly

Calls 3

calculateRangeFactorFunction · 0.90
boostItemAttrMethod · 0.80
getModifiedItemAttrMethod · 0.45

Tested by

no test coverage detected