(src, tgt, atkSpeed, atkAngle, distance, tgtSpeed, tgtAngle, tgtSigRadius)
| 31 | |
| 32 | |
| 33 | def getApplicationPerKey(src, tgt, atkSpeed, atkAngle, distance, tgtSpeed, tgtAngle, tgtSigRadius): |
| 34 | inLockRange = checkLockRange(src=src, distance=distance) |
| 35 | inDroneRange = checkDroneControlRange(src=src, distance=distance) |
| 36 | applicationMap = {} |
| 37 | for mod in src.item.activeModulesIter(): |
| 38 | if not mod.isDealingDamage(): |
| 39 | continue |
| 40 | if "ChainLightning" in mod.item.effects: |
| 41 | if inLockRange: |
| 42 | applicationMap[mod] = getVortonMult( |
| 43 | mod=mod, |
| 44 | distance=distance, |
| 45 | tgtSpeed=tgtSpeed, |
| 46 | tgtSigRadius=tgtSigRadius) |
| 47 | elif mod.hardpoint == FittingHardpoint.TURRET: |
| 48 | if inLockRange: |
| 49 | applicationMap[mod] = getTurretMult( |
| 50 | mod=mod, |
| 51 | src=src, |
| 52 | tgt=tgt, |
| 53 | atkSpeed=atkSpeed, |
| 54 | atkAngle=atkAngle, |
| 55 | distance=distance, |
| 56 | tgtSpeed=tgtSpeed, |
| 57 | tgtAngle=tgtAngle, |
| 58 | tgtSigRadius=tgtSigRadius) |
| 59 | else: |
| 60 | applicationMap[mod] = 0 |
| 61 | # Missile launcher or civilian missile launcher |
| 62 | elif mod.hardpoint == FittingHardpoint.MISSILE or mod.item.ID == 32461: |
| 63 | # FoF missiles can shoot beyond lock range |
| 64 | if inLockRange or (mod.charge is not None and 'fofMissileLaunching' in mod.charge.effects): |
| 65 | applicationMap[mod] = getLauncherMult( |
| 66 | mod=mod, |
| 67 | distance=distance, |
| 68 | tgtSpeed=tgtSpeed, |
| 69 | tgtSigRadius=tgtSigRadius) |
| 70 | else: |
| 71 | applicationMap[mod] = 0 |
| 72 | elif mod.item.group.name in ('Smart Bomb', 'Structure Area Denial Module'): |
| 73 | applicationMap[mod] = getSmartbombMult( |
| 74 | mod=mod, |
| 75 | distance=distance) |
| 76 | elif mod.item.group.name == 'Missile Launcher Bomb': |
| 77 | applicationMap[mod] = getBombMult( |
| 78 | mod=mod, |
| 79 | src=src, |
| 80 | tgt=tgt, |
| 81 | distance=distance, |
| 82 | tgtSigRadius=tgtSigRadius) |
| 83 | elif mod.item.group.name == 'Structure Guided Bomb Launcher': |
| 84 | if inLockRange: |
| 85 | applicationMap[mod] = getGuidedBombMult( |
| 86 | mod=mod, |
| 87 | src=src, |
| 88 | distance=distance, |
| 89 | tgtSigRadius=tgtSigRadius) |
| 90 | else: |
no test coverage detected