Skip to content

Commit

Permalink
feat: #2116 update state labels for spell and item cooldowns to be cl…
Browse files Browse the repository at this point in the history
…earer that they are based on total usability, not on/off cooldown (i.e. readiness) status. Also updated ordering to reflect top-to-bottom evaluation order
  • Loading branch information
ascott18 committed Nov 18, 2023
1 parent 24f6e15 commit a317109
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions Components/IconTypes/IconType_cooldown/cooldown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ Type:RegisterConfigPanel_XMLTemplate(100, "TellMeWhen_ChooseName", {
})

Type:RegisterConfigPanel_XMLTemplate(165, "TellMeWhen_IconStates", {
[STATE_USABLE] = { text = "|cFF00FF00" .. L["ICONMENU_READY"], },
[STATE_UNUSABLE] = { text = "|cFFFF0000" .. L["ICONMENU_NOTREADY"], },
[STATE_UNUSABLE_NORANGE] = { text = "|cFFFFff00" .. L["ICONMENU_OORANGE"], requires = "RangeCheck" },
[STATE_UNUSABLE_NOMANA] = { text = "|cFFFFff00" .. L["ICONMENU_OOPOWER"], requires = "ManaCheck" },
[STATE_USABLE] = { text = "|cFF00FF00" .. L["ICONMENU_USABLE"], order = 3, },
[STATE_UNUSABLE] = { text = "|cFFFF0000" .. L["ICONMENU_UNUSABLE"], order = 4, },
[STATE_UNUSABLE_NORANGE] = { text = "|cFFFFff00" .. L["ICONMENU_OORANGE"], requires = "RangeCheck", order = 1 },
[STATE_UNUSABLE_NOMANA] = { text = "|cFFFFff00" .. L["ICONMENU_OOPOWER"], requires = "ManaCheck", order = 2 },
})

Type:RegisterConfigPanel_ConstructorFunc(150, "TellMeWhen_CooldownSettings", function(self)
Expand Down Expand Up @@ -250,7 +250,10 @@ local function SpellCooldown_OnUpdate(icon, time)
end
elseif not unusableFound then
--wipe(unusableData)
unusableData.state = not inrange and STATE_UNUSABLE_NORANGE or nomana and STATE_UNUSABLE_NOMANA or STATE_UNUSABLE
unusableData.state =
not inrange and STATE_UNUSABLE_NORANGE or
nomana and STATE_UNUSABLE_NOMANA or
STATE_UNUSABLE
unusableData.tex = GetSpellTexture(iName)
unusableData.iName = iName
unusableData.stack = stack
Expand Down
6 changes: 3 additions & 3 deletions Components/IconTypes/IconType_item/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ Type:RegisterConfigPanel_XMLTemplate(100, "TellMeWhen_ChooseName", {
})

Type:RegisterConfigPanel_XMLTemplate(165, "TellMeWhen_IconStates", {
[STATE_USABLE] = { text = "|cFF00FF00" .. L["ICONMENU_READY"], },
[STATE_UNUSABLE] = { text = "|cFFFF0000" .. L["ICONMENU_NOTREADY"], },
[STATE_UNUSABLE_NORANGE] = { text = "|cFFFFff00" .. L["ICONMENU_OORANGE"], requires = "RangeCheck" },
[STATE_USABLE] = { text = "|cFF00FF00" .. L["ICONMENU_USABLE"], order = 2 },
[STATE_UNUSABLE] = { text = "|cFFFF0000" .. L["ICONMENU_UNUSABLE"], order = 3 },
[STATE_UNUSABLE_NORANGE] = { text = "|cFFFFff00" .. L["ICONMENU_OORANGE"], requires = "RangeCheck", order = 1 },
})

Type:RegisterConfigPanel_ConstructorFunc(150, "TellMeWhen_ItemSettings", function(self)
Expand Down

0 comments on commit a317109

Please sign in to comment.