Fix addon initialization order with guard checks

Refactor mouseover extensions to split initialization into two phases: OnLoad (empty) and OnAddOnLoad (actual setup). This ensures hooks are only registered when the target addon's globals are defined. Add guard clauses to check for required functions before hooking. Also remove Cursive's premature initialization attempt.
This commit is contained in:
Brues
2026-07-27 14:32:12 -05:00
parent 586c51b53a
commit 9bebbbb836
8 changed files with 33 additions and 19 deletions
-5
View File
@@ -74,9 +74,4 @@ function Extension.OnLoad()
end)
end
-- Also try to hook immediately in case Cursive is already loaded
if Cursive and Cursive.ui then
HookCursiveUI()
end
EventUtil.ContinueOnAddOnLoaded("Cursive", Extension.OnLoad)