From 2fe33e8510475993644f0a7637fcbf24bd968b6e Mon Sep 17 00:00:00 2001 From: michaelsp Date: Thu, 27 Jun 2024 02:45:33 +0200 Subject: [PATCH] Removed colorize by elapsed/remaining time option for group of buffs/debuffs (CF issue #1301) --- Options/modules/statuses/StatusAura.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Options/modules/statuses/StatusAura.lua b/Options/modules/statuses/StatusAura.lua index 015a7b19..56a7732f 100644 --- a/Options/modules/statuses/StatusAura.lua +++ b/Options/modules/statuses/StatusAura.lua @@ -1,15 +1,19 @@ local L = Grid2Options.L +local GetSpellInfo = Grid2.API.GetSpellInfo local MonitorizeValues = { [0]= L["NONE"], [1] = L["Value1"], [2] = L["Value2"], [3] = L["Value3"] } local DurationValues = { [1] = L['Automatic'], [2] = L['Custom'] } local TextValues1 = { [1] = L['Value Tracked'], [2] = L['Aura Name'], [3] = L['Custom Text'] } local TextValues2 = { [2] = L['Aura Name'], [3] = L['Custom Text'] } local ColorCountValues = {1,2,3,4,5,6,7,8,9} -local ColorizeByValues1= { [1] = L["Single Color"], [5] = L["Number of stacks"], [6] = L["Remaining time"], [7] = L["Elapsed time"] } -local ColorizeByValues2= { [1] = L["Single Color"], [5] = L["Number of stacks"], [6] = L["Remaining time"], [7] = L["Elapsed time"], [8] = L["Value"] } -local ColorizeByValues3= { [1] = L["Single Color"], [5] = L["Number of stacks"], [6] = L["Remaining time"], [7] = L["Elapsed time"], [2] = L["Debuff Type"] } - -local GetSpellInfo = Grid2.API.GetSpellInfo +local ColorizeValues = { + buffs = { [1] = L["Single Color"], [5] = L["Number of stacks"] }, + debuffs = { [1] = L["Single Color"], [5] = L["Number of stacks"], [2] = L["Debuff Type"] }, + default = { -- buff/debuff + [true] = { [1] = L["Single Color"], [5] = L["Number of stacks"], [6] = L["Remaining time"], [7] = L["Elapsed time"], [8] = L["Value"] }, + [false] = { [1] = L["Single Color"], [5] = L["Number of stacks"], [6] = L["Remaining time"], [7] = L["Elapsed time"] }, + }, +} --{{ colors for aura statuses local function StatusAuraUpdateColors(status, newCount) @@ -70,7 +74,7 @@ function Grid2Options:MakeStatusAuraColorsSelectionOptions(status, options, opti status:UpdateDB() self:MakeStatusOptions(status) end, - values = (status.dbx.type=='debuffs' and ColorizeByValues3) or (status.dbx.valueIndex and ColorizeByValues2) or ColorizeByValues1, + values = ColorizeValues[status.dbx.type] or ColorizeValues.default[status.dbx.valueIndex~=nil] } if not status.dbx.colorCount then return end options.colorCount = {