(fit, module, context, projectionRange, **kwargs)
| 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 | |
| 26965 | class Effect6431(BaseEffect): |
nothing calls this directly
no test coverage detected