| 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: |