Skip to content

Commit

Permalink
Variance: enlarge on minTimer
Browse files Browse the repository at this point in the history
  • Loading branch information
Zidras committed Dec 8, 2024
1 parent ecefca4 commit 6af0213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DBM-Core/DBM-Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ local function currentFullDate()
end

DBM = {
Revision = parseCurseDate("20241207225353"),
Revision = parseCurseDate("20241208000140"),
DisplayVersion = "10.1.13 alpha", -- the string that is shown as version
ReleaseRevision = releaseDate(2024, 07, 20) -- the date of the latest stable version that is available, optionally pass hours, minutes, and seconds for multiple releases in one day
}
Expand Down
5 changes: 3 additions & 2 deletions DBM-StatusBarTimers/DBT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ do
newFrame.obj = newBar
end
self.numBars = self.numBars + 1
if ((colorType and colorType == 7 and self.Options.Bar7ForceLarge) or (timer <= (self.Options.EnlargeBarTime or 11) or huge)) and self.Options.HugeBarsEnabled then -- Start enlarged
if ((colorType and colorType == 7 and self.Options.Bar7ForceLarge) or ((varianceMinTimer or timer) <= (self.Options.EnlargeBarTime or 11) or huge)) and self.Options.HugeBarsEnabled then -- Start enlarged
newBar.enlarged = true
newBar.huge = true
tinsert(largeBars, newBar)
Expand Down Expand Up @@ -849,6 +849,7 @@ function barPrototype:Update(elapsed)
local paused = self.paused
self.timer = self.timer - (paused and 0 or elapsed)
local timerValue = self.timer
local timerLowestValueFromVariance = self.varianceDuration and timerValue - self.varianceDuration or timerValue
local totaltimeValue = self.totalTime
local barOptions = DBT.Options
local currentStyle = barOptions.BarStyle
Expand Down Expand Up @@ -996,7 +997,7 @@ function barPrototype:Update(elapsed)
self:ApplyStyle()
DBT:UpdateBars(true)
end
if not paused and (timerValue <= enlargeTime) and not self.small and not isEnlarged and isMoving ~= "enlarge" and enlargeEnabled then
if not paused and (timerLowestValueFromVariance <= enlargeTime) and not self.small and not isEnlarged and isMoving ~= "enlarge" and enlargeEnabled then
self:RemoveFromList()
self:Enlarge()
end
Expand Down

0 comments on commit 6af0213

Please sign in to comment.