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

Method dpsToolTip

gui/builtinStatsViews/firepowerViewFull.py:163–183  ·  view source on GitHub ↗
(normal, preSpool, fullSpool, prec, lowest, highest)

Source from the content-addressed store, hash-verified

161 return roundToPrec(preSpool.total, prec) != roundToPrec(fullSpool.total, prec)
162
163 def dpsToolTip(normal, preSpool, fullSpool, prec, lowest, highest):
164 if normal is None or preSpool is None or fullSpool is None:
165 return ""
166 hasSpool = hasSpoolUp(preSpool, fullSpool)
167 lines = []
168 if hasSpool:
169 lines.append(_t("Spool up") + ": {}-{}".format(
170 formatAmount(preSpool.total, prec, lowest, highest),
171 formatAmount(fullSpool.total, prec, lowest, highest)))
172 if getattr(normal, 'total', None):
173 if hasSpool:
174 lines.append("")
175 lines.append(_t("Current") + ": {}".format(formatAmount(normal.total, prec, lowest, highest)))
176 for dmgType in normal.names(includePure=True):
177 val = getattr(normal, dmgType, None)
178 if val:
179 lines.append("{}{}: {}%".format(
180 " " if hasSpool else "",
181 _t(dmgType).capitalize(),
182 formatAmount(val / normal.total * 100, 3, 0, 0)))
183 return "\n".join(lines)
184
185 defaultSpoolValue = eos.config.settings['globalDefaultSpoolupPercentage']
186 stats = (

Callers

nothing calls this directly

Calls 4

formatAmountFunction · 0.90
_tFunction · 0.50
appendMethod · 0.45
namesMethod · 0.45

Tested by

no test coverage detected