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

Method handler

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

Source from the content-addressed store, hash-verified

26944
26945 @staticmethod
26946 def handler(fit, module, context, projectionRange, **kwargs):
26947 if 'projected' not in context:
26948 return
26949 if fit.ship.getModifiedItemAttr('disallowAssistance'):
26950 return
26951 rangeFactor = calculateRangeFactor(
26952 srcOptimalRange=module.getModifiedItemAttr('maxRange'),
26953 srcFalloffRange=module.getModifiedItemAttr('falloffEffectiveness'),
26954 distance=projectionRange)
26955 for srcAttr, tgtAttr in (
26956 ('trackingSpeedBonus', 'trackingSpeed'),
26957 ('maxRangeBonus', 'maxRange'),
26958 ('falloffBonus', 'falloff')
26959 ):
26960 fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Gunnery'),
26961 tgtAttr, module.getModifiedItemAttr(srcAttr) * rangeFactor,
26962 stackingPenalties=True, **kwargs)
26963
26964
26965class Effect6431(BaseEffect):

Callers

nothing calls this directly

Calls 4

calculateRangeFactorFunction · 0.90
filteredItemBoostMethod · 0.80
requiresSkillMethod · 0.80
getModifiedItemAttrMethod · 0.45

Tested by

no test coverage detected