Fetch spoolup time for gun's misc value from spoolup calculator

This commit is contained in:
DarkPhoenix
2018-12-12 12:36:31 +03:00
parent e76dc2e92b
commit e6b2d15468
2 changed files with 13 additions and 18 deletions

View File

@@ -115,16 +115,12 @@ class Miscellanea(ViewColumn):
text = "{0}".format(formatAmount(trackingSpeed, 3, 0, 3))
tooltip = "tracking speed"
info.append((text, tooltip))
maxBonusDamage = stuff.getModifiedItemAttr("damageMultiplierBonusMax")
bonusDamagePerCycle = stuff.getModifiedItemAttr("damageMultiplierBonusPerCycle")
cycleTime = stuff.getModifiedItemAttr("speed")
if maxBonusDamage and bonusDamagePerCycle and cycleTime:
cyclesToFullDamage = int(maxBonusDamage / bonusDamagePerCycle)
timeToFullDamage = (cycleTime / 1000) * cyclesToFullDamage
if cyclesToFullDamage:
text = "{0}s".format(formatAmount(timeToFullDamage, 3, 0, 3))
tooltip = "spool-up time"
info.append((text, tooltip))
# TODO: use spoolup options to fetch main value
volley, spoolTime = stuff.getVolley(spoolType=SpoolType.SCALE, spoolAmount=1, ignoreState=True)
if spoolTime:
text = "{0}s".format(formatAmount(spoolTime, 3, 0, 3))
tooltip = "spool-up time"
info.append((text, tooltip))
if not info:
return "", None
text = ' | '.join(i[0] for i in info)