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.
This commit is contained in:
Brues
2026-08-21 13:26:09 -05:00
parent 685ecb4a3e
commit 9c29f0c7d4
+8
View File
@@ -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()