Skip to content

Commit

Permalink
Update source comments
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Jul 9, 2024
1 parent 317a89e commit 1c88a01
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions blizzard.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
local _, ns = ...
local oUF = ns.oUF

-- sourced from FrameXML/TargetFrame.lua
-- sourced from Blizzard_UnitFrame/TargetFrame.lua
local MAX_BOSS_FRAMES = _G.MAX_BOSS_FRAMES or 5

-- sourced from FrameXML/RaidFrame.lua
-- sourced from Blizzard_FrameXMLBase/Shared/Constants.lua
local MEMBERS_PER_RAID_GROUP = _G.MEMBERS_PER_RAID_GROUP or 5

local hookedFrames = {}
Expand Down
9 changes: 6 additions & 3 deletions colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ for power, color in next, PowerBarColor do
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
Expand All @@ -180,18 +181,20 @@ 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.Chi] = colors.power.CHI
colors.power[Enum.PowerType.Insanity] = colors.power.INSANITY
colors.power[Enum.PowerType.ArcaneCharges] = colors.power.ARCANE_CHARGES
colors.power[Enum.PowerType.Fury] = colors.power.FURY
colors.power[Enum.PowerType.Pain] = 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

-- 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

-- alternate power, originally sourced from CompactUnitFrame.lua
-- 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

Expand Down
3 changes: 2 additions & 1 deletion elements/additionalpower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ local oUF = ns.oUF

local _, playerClass = UnitClass('player')

-- sourced from FrameXML/AlternatePowerBar.lua
-- sourced from Blizzard_UnitFrame/AlternatePowerBar.lua
local ALT_POWER_BAR_PAIR_DISPLAY_INFO = _G.ALT_POWER_BAR_PAIR_DISPLAY_INFO

local ADDITIONAL_POWER_BAR_NAME = 'MANA'
local ADDITIONAL_POWER_BAR_INDEX = 0

Expand Down
3 changes: 2 additions & 1 deletion elements/alternativepower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ local Private = oUF.Private

local unitSelectionType = Private.unitSelectionType

-- sourced from FrameXML/UnitPowerBarAlt.lua
-- sourced from Blizzard_UnitFrame/UnitPowerBarAlt.lua
local ALTERNATE_POWER_INDEX = Enum.PowerType.Alternate or 10

local ALTERNATE_POWER_NAME = 'ALTERNATE'

local function updateTooltip(self)
Expand Down
3 changes: 2 additions & 1 deletion elements/classpower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ local oUF = ns.oUF

local _, PlayerClass = UnitClass('player')

-- sourced from FrameXML/Constants.lua
-- sourced from Blizzard_FrameXMLBase/Constants.lua
local SPEC_MAGE_ARCANE = _G.SPEC_MAGE_ARCANE or 1
local SPEC_MONK_WINDWALKER = _G.SPEC_MONK_WINDWALKER or 3
local SPEC_WARLOCK_DESTRUCTION = _G.SPEC_WARLOCK_DESTRUCTION or 3

local SPELL_POWER_ENERGY = Enum.PowerType.Energy or 3
local SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints or 4
local SPELL_POWER_SOUL_SHARDS = Enum.PowerType.SoulShards or 7
Expand Down
2 changes: 1 addition & 1 deletion elements/grouproleindicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A default texture will be applied if the widget is a Texture and doesn't have a
local _, ns = ...
local oUF = ns.oUF

-- sourced from Interface\AddOns\Blizzard_Deprecated\Deprecated_10_1_5.lua
-- originally sourced from Blizzard_Deprecated/Deprecated_10_1_5.lua
local function GetTexCoordsForRoleSmallCircle(role)
if(role == 'TANK') then
return 0, 19 / 64, 22 / 64, 41 / 64
Expand Down
2 changes: 1 addition & 1 deletion elements/power.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ local Private = oUF.Private

local unitSelectionType = Private.unitSelectionType

-- sourced from FrameXML/UnitPowerBarAlt.lua
-- sourced from Blizzard_UnitFrame/UnitPowerBarAlt.lua
local ALTERNATE_POWER_INDEX = Enum.PowerType.Alternate or 10

--[[ Override: Power:GetDisplayPower()
Expand Down
3 changes: 2 additions & 1 deletion elements/powerprediction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ A default texture will be applied if the widget is a StatusBar and doesn't have
local _, ns = ...
local oUF = ns.oUF

-- sourced from FrameXML/AlternatePowerBar.lua
-- sourced from Blizzard_UnitFrame/AlternatePowerBar.lua
local ALT_POWER_BAR_PAIR_DISPLAY_INFO = _G.ALT_POWER_BAR_PAIR_DISPLAY_INFO

local ADDITIONAL_POWER_BAR_INDEX = 0

local _, playerClass = UnitClass('player')
Expand Down
2 changes: 1 addition & 1 deletion elements/pvpclassificationindicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This element updates by changing the texture.
local _, ns = ...
local oUF = ns.oUF

-- sourced from FrameXML/CompactUnitFrame.lua
-- sourced from Blizzard_UnitFrame/Mainline/CompactUnitFrame.lua
local ICONS = {
[Enum.PvPUnitClassification.FlagCarrierHorde or 0] = "nameplates-icon-flag-horde",
[Enum.PvPUnitClassification.FlagCarrierAlliance or 1] = "nameplates-icon-flag-alliance",
Expand Down
5 changes: 2 additions & 3 deletions elements/stagger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ if(select(2, UnitClass('player')) ~= 'MONK') then return end
local _, ns = ...
local oUF = ns.oUF

-- sourced from FrameXML/Constants.lua
-- sourced from Blizzard_FrameXMLBase/Constants.lua
local SPEC_MONK_BREWMASTER = _G.SPEC_MONK_BREWMASTER or 1

-- sourced from FrameXML/MonkStaggerBar.lua
local BREWMASTER_POWER_BAR_NAME = _G.BREWMASTER_POWER_BAR_NAME or 'STAGGER'
local BREWMASTER_POWER_BAR_NAME = 'STAGGER'

-- percentages at which bar should change color
local STAGGER_YELLOW_TRANSITION = _G.STAGGER_YELLOW_TRANSITION or 0.3
Expand Down
2 changes: 1 addition & 1 deletion elements/summonindicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This element updates by changing the texture.
local _, ns = ...
local oUF = ns.oUF

-- sourced from Blizzard_APIDocumentation/IncomingSummonDocumentation.lua
-- sourced from Blizzard_APIDocumentationGenerated/IncomingSummonDocumentation.lua
local SUMMON_STATUS_NONE = Enum.SummonStatus.None or 0
local SUMMON_STATUS_PENDING = Enum.SummonStatus.Pending or 1
local SUMMON_STATUS_ACCEPTED = Enum.SummonStatus.Accepted or 2
Expand Down

0 comments on commit 1c88a01

Please sign in to comment.