From 9c29f0c7d45d80e6d0d84a072dae57f038af9fd6 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 21 Aug 2026 13:26:09 -0500 Subject: [PATCH] Add handlesHookScript capability flag Introduce pfUI.handlesHookScript boolean in pfUI.lua to signal that this fork's actionbar buttons correctly support the modern HookScript widget method. This prevents ClassicAPI's AddOnCompat shim from shadowing HookScript during actionbar load. The flag documents behavior (not identity): forks that maintain HookScript-correct actionbar code should keep the flag; forks that do not should clear it to opt into the safe compatibility fallback. --- pfUI.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pfUI.lua b/pfUI.lua index 61a84b99..aa15bb51 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -110,6 +110,14 @@ pfUI.movables = {} pfUI.version = {} pfUI.env = {} +-- Capability flag: this fork's pfActionBar buttons correctly handle the modern +-- HookScript widget method, so ClassicAPI's AddOnCompat shim must NOT shadow +-- HookScript during actionbar load (older forks branch on `if button.HookScript` +-- and take a modern path they were never written for). This describes behavior, +-- not identity: a fork that keeps the HookScript-correct actionbar code keeps +-- the flag; one that lacks it should drop the flag and get the safe fallback. +pfUI.handlesHookScript = true + if not pfUI.disabled then pfUI.events = Mixin({}, CallbackRegistryMixin) pfUI.events:OnLoad()