mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-02 03:39:59 +00:00
Drop the vanilla compat layer
compat\vanilla.lua named the handful of things that differed between clients back when pfUI targeted several. Only one client remains, so every constant had exactly one value. Inline each at its use site and delete the file, init\compat.xml, and both TOC entries. COOLDOWN_FRAME_TYPE -> "Model" LOOT_BUTTON_FRAME_TYPE -> "LootButton" MINIMAP_TRACKING_FRAME -> _G.MiniMapTrackingFrame FRIENDS_NAME_LOCATION -> "ButtonTextNameLocation" EVENTS_MINIMAP_ZONE_UPDATE -> the event list, in panel.lua MICRO_BUTTONS -> a local in panel.lua NAMEPLATE_OBJECTORDER -> a local in nameplates.lua ACTIONBAR_SECURE_TEMPLATE_BAR/_BUTTON -> nil, so the argument goes away NAMEPLATE_FRAMETYPE and PLAYER_BUFF_START_ID had no readers left. RunMacroText moves to pfUI.lua. compat\vanilla.lua was setfenv'd into the pfUI environment, so the function only ever existed on pfUI.env; at file scope it lands on _G as a real export instead. Nothing in pfUI calls it, and ClassicAPI neither defines nor looks for a RunMacroText global -- it does the same throwaway edit box natively in src/macro/Execute.cpp and only defers to a global RunMacro.
This commit is contained in:
+3
-3
@@ -767,7 +767,7 @@ function pfUI.uf:UpdateConfig()
|
||||
if not f.buffs[i].cd then
|
||||
if cooldown_anim == 1 then
|
||||
-- Animation enabled: Use Model frame with CooldownFrameTemplate
|
||||
f.buffs[i].cd = CreateFrame(COOLDOWN_FRAME_TYPE, f.buffs[i]:GetName() .. "Cooldown", f.buffs[i], "CooldownFrameTemplate")
|
||||
f.buffs[i].cd = CreateFrame("Model", f.buffs[i]:GetName() .. "Cooldown", f.buffs[i], "CooldownFrameTemplate")
|
||||
else
|
||||
-- Animation disabled: Use regular Frame with dummy functions
|
||||
f.buffs[i].cd = CreateFrame("Frame", f.buffs[i]:GetName() .. "Cooldown", f.buffs[i])
|
||||
@@ -840,7 +840,7 @@ function pfUI.uf:UpdateConfig()
|
||||
if not f.debuffs[i].cd then
|
||||
if cooldown_anim == 1 then
|
||||
-- Animation enabled: Use Model frame with CooldownFrameTemplate
|
||||
f.debuffs[i].cd = CreateFrame(COOLDOWN_FRAME_TYPE, f.debuffs[i]:GetName() .. "Cooldown", f.debuffs[i], "CooldownFrameTemplate")
|
||||
f.debuffs[i].cd = CreateFrame("Model", f.debuffs[i]:GetName() .. "Cooldown", f.debuffs[i], "CooldownFrameTemplate")
|
||||
else
|
||||
-- Animation disabled: Use regular Frame with dummy functions
|
||||
f.debuffs[i].cd = CreateFrame("Frame", f.debuffs[i]:GetName() .. "Cooldown", f.debuffs[i])
|
||||
@@ -2244,7 +2244,7 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration)
|
||||
-- Check if parent frame has cooldown animation enabled
|
||||
local parent_cooldown_anim = frame.config and tonumber(frame.config.cooldown_anim) or 1
|
||||
if parent_cooldown_anim == 1 then
|
||||
frame.icon[pos].cd = CreateFrame(COOLDOWN_FRAME_TYPE, nil, frame.icon[pos])
|
||||
frame.icon[pos].cd = CreateFrame("Model", nil, frame.icon[pos])
|
||||
else
|
||||
frame.icon[pos].cd = CreateFrame("Frame", nil, frame.icon[pos])
|
||||
frame.icon[pos].cd.AdvanceTime = DoNothing
|
||||
|
||||
Reference in New Issue
Block a user