MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / getToolTip

Method getToolTip

gui/builtinViewColumns/maxRange.py:79–94  ·  view source on GitHub ↗
(self, mod)

Source from the content-addressed store, hash-verified

77 return ("displayName", bool, False), ("showIcon", bool, True)
78
79 def getToolTip(self, mod):
80 lines = []
81 missileRangeData = mod.missileMaxRangeData if hasattr(mod, "missileMaxRangeData") else None
82 if missileRangeData is not None:
83 lines.append('Missile flight range')
84 lowerRange, higherRange, higherChance = missileRangeData
85 if roundToPrec(higherChance, 3) not in (0, 1):
86 lines.append('{}% chance to fly {}m'.format(
87 formatAmount((1 - higherChance) * 100, prec=3, lowest=0, highest=0),
88 formatAmount(lowerRange, prec=3, lowest=0, highest=3)))
89 lines.append('{}% chance to fly {}m'.format(
90 formatAmount(higherChance * 100, prec=3, lowest=0, highest=0),
91 formatAmount(higherRange, prec=3, lowest=0, highest=3)))
92 else:
93 lines.append("Optimal + Falloff")
94 return '\n'.join(lines)
95
96
97MaxRange.register()

Callers

nothing calls this directly

Calls 3

formatAmountFunction · 0.90
roundToPrecFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected