Fix graphs
This commit is contained in:
4
graphs/data/fitDamageStats/cache/time.py
vendored
4
graphs/data/fitDamageStats/cache/time.py
vendored
@@ -117,7 +117,7 @@ class TimeCache(FitDataCache):
|
||||
pointData[timeStart] = (dps, volley)
|
||||
# Gap between items
|
||||
elif floatUnerr(prevTimeEnd) < floatUnerr(timeStart):
|
||||
pointData[prevTimeEnd] = (DmgTypes(0, 0, 0, 0), DmgTypes(0, 0, 0, 0))
|
||||
pointData[prevTimeEnd] = (DmgTypes.default(), DmgTypes.default())
|
||||
pointData[timeStart] = (dps, volley)
|
||||
# Changed value
|
||||
elif dps != prevDps or volley != prevVolley:
|
||||
@@ -157,7 +157,7 @@ class TimeCache(FitDataCache):
|
||||
def addDpsVolley(ddKey, addedTimeStart, addedTimeFinish, addedVolleys):
|
||||
if not addedVolleys:
|
||||
return
|
||||
volleySum = sum(addedVolleys, DmgTypes(0, 0, 0, 0))
|
||||
volleySum = sum(addedVolleys, DmgTypes.default())
|
||||
if volleySum.total > 0:
|
||||
addedDps = volleySum / (addedTimeFinish - addedTimeStart)
|
||||
# We can take "just best" volley, no matter target resistances, because all
|
||||
|
||||
@@ -28,7 +28,7 @@ from .calc.projected import getScramRange, getScrammables, getTackledSpeed, getS
|
||||
|
||||
|
||||
def applyDamage(dmgMap, applicationMap, tgtResists):
|
||||
total = DmgTypes(em=0, thermal=0, kinetic=0, explosive=0)
|
||||
total = DmgTypes.default()
|
||||
for key, dmg in dmgMap.items():
|
||||
total += dmg * applicationMap.get(key, 0)
|
||||
if not GraphSettings.getInstance().get('ignoreResists'):
|
||||
@@ -37,7 +37,8 @@ def applyDamage(dmgMap, applicationMap, tgtResists):
|
||||
em=total.em * (1 - emRes),
|
||||
thermal=total.thermal * (1 - thermRes),
|
||||
kinetic=total.kinetic * (1 - kinRes),
|
||||
explosive=total.explosive * (1 - exploRes))
|
||||
explosive=total.explosive * (1 - exploRes),
|
||||
breacher=total.breacher)
|
||||
return total
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user