Skip to content

Commit

Permalink
colors: We like fallback values
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Jul 9, 2024
1 parent 1c88a01 commit 12fc45a
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,33 +170,33 @@ end

-- fallback integer index to named index
-- sourced from PowerBarColor - Blizzard_UnitFrame/Mainline/PowerBarColorUtil.lua
colors.power[Enum.PowerType.Mana] = colors.power.MANA
colors.power[Enum.PowerType.Rage] = colors.power.RAGE
colors.power[Enum.PowerType.Focus] = colors.power.FOCUS
colors.power[Enum.PowerType.Energy] = colors.power.ENERGY
colors.power[Enum.PowerType.ComboPoints] = colors.power.COMBO_POINTS
colors.power[Enum.PowerType.Runes] = colors.power.RUNES
colors.power[Enum.PowerType.RunicPower] = colors.power.RUNIC_POWER
colors.power[Enum.PowerType.SoulShards] = colors.power.SOUL_SHARDS
colors.power[Enum.PowerType.LunarPower] = colors.power.LUNAR_POWER
colors.power[Enum.PowerType.HolyPower] = colors.power.HOLY_POWER
colors.power[Enum.PowerType.Maelstrom] = colors.power.MAELSTROM
colors.power[Enum.PowerType.Insanity] = colors.power.INSANITY
colors.power[Enum.PowerType.Fury] = colors.power.FURY
colors.power[Enum.PowerType.Pain] = colors.power.PAIN
colors.power[Enum.PowerType.Mana or 0] = colors.power.MANA
colors.power[Enum.PowerType.Rage or 1] = colors.power.RAGE
colors.power[Enum.PowerType.Focus or 2] = colors.power.FOCUS
colors.power[Enum.PowerType.Energy or 3] = colors.power.ENERGY
colors.power[Enum.PowerType.ComboPoints or 4] = colors.power.COMBO_POINTS
colors.power[Enum.PowerType.Runes or 5] = colors.power.RUNES
colors.power[Enum.PowerType.RunicPower or 6] = colors.power.RUNIC_POWER
colors.power[Enum.PowerType.SoulShards or 7] = colors.power.SOUL_SHARDS
colors.power[Enum.PowerType.LunarPower or 8] = colors.power.LUNAR_POWER
colors.power[Enum.PowerType.HolyPower or 9] = colors.power.HOLY_POWER
colors.power[Enum.PowerType.Maelstrom or 11] = colors.power.MAELSTROM
colors.power[Enum.PowerType.Insanity or 13] = colors.power.INSANITY
colors.power[Enum.PowerType.Fury or 17] = colors.power.FURY
colors.power[Enum.PowerType.Pain or 18] = colors.power.PAIN

-- these two don't have fallback values in PowerBarColor, but we want them
colors.power[Enum.PowerType.Chi] = colors.power.CHI
colors.power[Enum.PowerType.ArcaneCharges] = colors.power.ARCANE_CHARGES
colors.power[Enum.PowerType.Chi or 12] = colors.power.CHI
colors.power[Enum.PowerType.ArcaneCharges or 16] = colors.power.ARCANE_CHARGES

-- there's no official colour for evoker's essence
-- use the average colour of the essence texture instead
colors.power.ESSENCE = oUF:CreateColor(100, 173, 206)
colors.power[Enum.PowerType.Essence] = colors.power.ESSENCE
colors.power[Enum.PowerType.Essence or 19] = colors.power.ESSENCE

-- alternate power, sourced from Blizzard_UnitFrame/Mainline/CompactUnitFrame.lua
colors.power.ALTERNATE = oUF:CreateColor(0.7, 0.7, 0.6)
colors.power[Enum.PowerType.Alternate] = colors.power.ALTERNATE
colors.power[Enum.PowerType.Alternate or 10] = colors.power.ALTERNATE

for i = 0, 3 do
colors.threat[i] = oUF:CreateColor(GetThreatStatusColor(i))
Expand Down

0 comments on commit 12fc45a

Please sign in to comment.