mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Unify low flash and low color thresholds
Low Flash was using >= while Low Color was using >, so they would activate at ever-so-slightly different values (0.4 vs 0.39999, for example).
This commit is contained in:
@ -278,12 +278,12 @@ function IceUnitBar.prototype:Update()
|
|||||||
-- This looks slightly quirky. Basically the easiest way for me to achieve this is to have lowThresholdColor override
|
-- This looks slightly quirky. Basically the easiest way for me to achieve this is to have lowThresholdColor override
|
||||||
-- the scaled color. You'll need to switch them both on to get things to work.
|
-- the scaled color. You'll need to switch them both on to get things to work.
|
||||||
if( self.moduleSettings.lowThresholdColor ) then
|
if( self.moduleSettings.lowThresholdColor ) then
|
||||||
if( self.healthPercentage < self.moduleSettings.lowThreshold ) then
|
if( self.healthPercentage <= self.moduleSettings.lowThreshold ) then
|
||||||
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MinHealthColor" ]
|
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MinHealthColor" ]
|
||||||
elseif not self.moduleSettings.scaleHealthColor then
|
elseif not self.moduleSettings.scaleHealthColor then
|
||||||
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MaxHealthColor" ]
|
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MaxHealthColor" ]
|
||||||
end
|
end
|
||||||
if( self.manaPercentage < self.moduleSettings.lowThreshold ) then
|
if( self.manaPercentage <= self.moduleSettings.lowThreshold ) then
|
||||||
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MinManaColor" ]
|
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MinManaColor" ]
|
||||||
elseif not self.moduleSettings.scaleManaColor then
|
elseif not self.moduleSettings.scaleManaColor then
|
||||||
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MaxManaColor" ]
|
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MaxManaColor" ]
|
||||||
|
Reference in New Issue
Block a user