standingsUtil.py (873B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\standings\standingsUtil.py 2 from carbonui.util.color import Color 3 from eve.client.script.ui.shared.standings import standingUIConst 4 5 def RoundStandingTo10(standing): 6 if standing >= 9.995: 7 effectiveStanding = 10.0 8 else: 9 effectiveStanding = standing 10 return effectiveStanding 11 12 13 def GetStandingChangeFormatted(standingDiff): 14 if standingDiff > 0.0: 15 color = standingUIConst.COLOR_GOOD 16 standingDiff = '+%s' % standingDiff 17 elif standingDiff == 0.0: 18 color = standingUIConst.COLOR_NEUTRAL 19 standingDiff = '%s' % standingDiff 20 else: 21 color = standingUIConst.COLOR_BAD 22 standingDiff = '%s' % standingDiff 23 color = Color.RGBtoHex(*color) 24 return '<color=%s>%s</color>' % (color, standingDiff)