info.py (786B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\dynamicItem\info.py 2 import eveformat 3 from dogma.attributes.format import GetAttribute 4 from eve.client.script.ui.shared.dynamicItem.const import COLOR_NEGATIVE, COLOR_POSITIVE 5 6 def FormatAttributeBonusRange(attributeID, low, high): 7 attribute = GetAttribute(attributeID) 8 color_low = COLOR_NEGATIVE 9 color_high = COLOR_POSITIVE 10 if not attribute.highIsGood: 11 low, high = high, low 12 color_low, color_high = color_high, color_low 13 return u'{} - {}'.format(eveformat.color(u'{:+.2%}'.format(low - 1.0), color=color_low if low - 1.0 < 0.0 else color_high), eveformat.color(u'{:+.2%}'.format(high - 1.0), color=color_low if high - 1.0 < 0.0 else color_high))