(fit, module, context, projectionRange, **kwargs)
| 26834 | |
| 26835 | @staticmethod |
| 26836 | def handler(fit, module, context, projectionRange, **kwargs): |
| 26837 | if 'projected' not in context: |
| 26838 | return |
| 26839 | if fit.ship.getModifiedItemAttr('disallowOffensiveModifiers'): |
| 26840 | return |
| 26841 | rangeFactor = calculateRangeFactor( |
| 26842 | srcOptimalRange=module.getModifiedItemAttr('maxRange'), |
| 26843 | srcFalloffRange=module.getModifiedItemAttr('falloffEffectiveness'), |
| 26844 | distance=projectionRange) |
| 26845 | for srcAttr, tgtAttr in ( |
| 26846 | ('trackingSpeedBonus', 'trackingSpeed'), |
| 26847 | ('maxRangeBonus', 'maxRange'), |
| 26848 | ('falloffBonus', 'falloff') |
| 26849 | ): |
| 26850 | fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Gunnery'), |
| 26851 | tgtAttr, module.getModifiedItemAttr(srcAttr) * rangeFactor, |
| 26852 | stackingPenalties=True, **kwargs) |
| 26853 | |
| 26854 | |
| 26855 | class Effect6425(BaseEffect): |
nothing calls this directly
no test coverage detected