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

Method addRps

graphs/data/fitRemoteReps/cache.py:135–142  ·  view source on GitHub ↗
(rrKey, addedTimeStart, addedTimeFinish, addedRepAmounts)

Source from the content-addressed store, hash-verified

133 intCacheRepAmount = fitCache['internalRepAmount'] = {}
134
135 def addRps(rrKey, addedTimeStart, addedTimeFinish, addedRepAmounts):
136 if not addedRepAmounts:
137 return
138 repAmountSum = sum(addedRepAmounts, RRTypes(0, 0, 0, 0))
139 if repAmountSum.shield > 0 or repAmountSum.armor > 0 or repAmountSum.hull > 0:
140 addedRps = repAmountSum / (addedTimeFinish - addedTimeStart)
141 rrCacheRps = intCacheRps.setdefault(rrKey, [])
142 rrCacheRps.append((addedTimeStart, addedTimeFinish, addedRps))
143
144 def addRepAmount(rrKey, addedTime, addedRepAmount):
145 if addedRepAmount.shield > 0 or addedRepAmount.armor > 0 or addedRepAmount.hull > 0:

Callers

nothing calls this directly

Calls 2

RRTypesClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected