MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / _getDamagePerKey

Method _getDamagePerKey

graphs/data/fitDamageStats/getter.py:47–67  ·  view source on GitHub ↗
(self, src, time)

Source from the content-addressed store, hash-verified

45class YDpsMixin:
46
47 def _getDamagePerKey(self, src, time):
48 # Use data from time cache if time was not specified
49 if time is not None:
50 return self._getTimeCacheDataPoint(src=src, time=time)
51 # Compose map ourselves using current fit settings if time is not specified
52 dpsMap = {}
53 defaultSpoolValue = eos.config.settings['globalDefaultSpoolupPercentage']
54 for mod in src.item.activeModulesIter():
55 if not mod.isDealingDamage():
56 continue
57 dpsMap[mod] = mod.getDps(spoolOptions=SpoolOptions(SpoolType.SPOOL_SCALE, defaultSpoolValue, False))
58 for drone in src.item.activeDronesIter():
59 if not drone.isDealingDamage():
60 continue
61 dpsMap[drone] = drone.getDps()
62 for fighter in src.item.activeFightersIter():
63 if not fighter.isDealingDamage():
64 continue
65 for effectID, effectDps in fighter.getDpsPerEffect().items():
66 dpsMap[(fighter, effectID)] = effectDps
67 return dpsMap
68
69 def _prepareTimeCache(self, src, maxTime):
70 self.graph._timeCache.prepareDpsData(src=src, maxTime=maxTime)

Callers 3

_getCommonDataMethod · 0.45
_getCommonDataMethod · 0.45
_getCommonDataMethod · 0.45

Calls 8

activeModulesIterMethod · 0.80
activeDronesIterMethod · 0.80
activeFightersIterMethod · 0.80
itemsMethod · 0.80
getDpsPerEffectMethod · 0.80
isDealingDamageMethod · 0.45
getDpsMethod · 0.45

Tested by

no test coverage detected