diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index 07ff058..3a8e982 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -8,11 +8,11 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2 WeakAuras.doubleWidth = WeakAuras.normalWidth * 2 local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version") -local versionString = "5.19.0" +local versionString = "5.19.0 Beta" local buildTime = "20250127040000" local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit or false -WeakAuras.versionString = versionStringFromToc +WeakAuras.versionString = versionString WeakAuras.buildTime = buildTime WeakAuras.newFeatureString = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0|t" WeakAuras.BuildInfo = select(4, GetBuildInfo()) diff --git a/WeakAuras/RegionTypes/RegionPrototype.lua b/WeakAuras/RegionTypes/RegionPrototype.lua index 82d3b45..4e56045 100644 --- a/WeakAuras/RegionTypes/RegionPrototype.lua +++ b/WeakAuras/RegionTypes/RegionPrototype.lua @@ -403,6 +403,8 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource local inverseProperty = progressSource[5] local pausedProperty = progressSource[6] local remainingProperty = progressSource[7] + local useAdditionalProgress = progressSource[8] + if progressType == "number" then local value = state[property] if type(value) ~= "number" then value = 0 end @@ -435,6 +437,13 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource if self.UpdateValue then self:UpdateValue() end + if self.SetAdditionalProgress then + if useAdditionalProgress then + self:SetAdditionalProgress(state.additionalProgress, adjustMin, max, false) + else + self:SetAdditionalProgress(nil) + end + end elseif progressType == "timer" then local expirationTime local paused = pausedProperty and state[pausedProperty] @@ -484,6 +493,13 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource if self.UpdateTime then self:UpdateTime() end + if self.SetAdditionalProgress then + if useAdditionalProgress then + self:SetAdditionalProgress(state.additionalProgress, adjustMin, max, inverse) + else + self:SetAdditionalProgress(nil) + end + end elseif progressType == "elapsedTimer" then local startTime = state[property] or math.huge local duration = totalProperty and state[totalProperty] or 0 @@ -514,11 +530,18 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource if self.UpdateTime then self:UpdateTime() end + if self.SetAdditionalProgress then + if useAdditionalProgress then + self:SetAdditionalProgress(state.additionalProgress, adjustMin, max, false) + else + self:SetAdditionalProgress(nil) + end + end end end -local autoTimedProgressSource = {-1, "timer", "expirationTime", "duration", "inverse", "paused", "remaining"} -local autoStaticProgressSource = {-1, "number", "value", "total", nil, nil, nil, nil} +local autoTimedProgressSource = {-1, "timer", "expirationTime", "duration", "inverse", "paused", "remaining", true} +local autoStaticProgressSource = {-1, "number", "value", "total", nil, nil, nil, nil, true} local function UpdateProgressFromAuto(self, minMaxConfig, state) if state.progressType == "timed" then UpdateProgressFromState(self, minMaxConfig, state, autoTimedProgressSource) @@ -535,6 +558,9 @@ local function UpdateProgressFromAuto(self, minMaxConfig, state) if self.UpdateTime then self:UpdateTime() end + if self.SetAdditionalProgress then + self:SetAdditionalProgress(nil) + end end end diff --git a/WeakAurasOptions/VersionCheck.lua b/WeakAurasOptions/VersionCheck.lua index 58c2772..713aae4 100644 --- a/WeakAurasOptions/VersionCheck.lua +++ b/WeakAurasOptions/VersionCheck.lua @@ -4,7 +4,7 @@ local L = WeakAuras.L local optionsVersion = GetAddOnMetadata(AddonName, "Version") -if optionsVersion ~= WeakAuras.versionString then +if optionsVersion .. " Beta" ~= WeakAuras.versionString then local message = string.format(L["The WeakAuras Options Addon version %s doesn't match the WeakAuras version %s. If you updated the addon while the game was running, try restarting World of Warcraft. Otherwise try reinstalling WeakAuras"], optionsVersion, WeakAuras.versionString) WeakAuras.IsLibsOk = function() return false end