Mercurial > wow > dependencyloader
diff DependencyLoader/Addon.lua @ 12:b230b94d4487
fixed Addon.lua to use the unhooked EnableAddOn (still needs to be changed to grab from the interface)
improved the error message when creating an Addon object on a Blizzard addon (will add direct support later)
implemented the hooks on EnableAddOn and LoadAddOn
rearranged functions inside Tree.lua, with some edits
copied OptDeps from main module to the bootstrap module, to delegate loading to the client when possible
author | mckenziemc |
---|---|
date | Fri, 10 Dec 2010 00:21:17 -0800 |
parents | e0a4a8b5b389 |
children | a46bf694050c |
line wrap: on
line diff
--- a/DependencyLoader/Addon.lua Sun Dec 05 03:39:26 2010 -0800 +++ b/DependencyLoader/Addon.lua Fri Dec 10 00:21:17 2010 -0800 @@ -10,6 +10,7 @@ local Addon, addon = addonTable:NewClass("Addon") +Addon.enableAddon = EnableAddOn -- TODO: use raw hook from main module? Addon.addons = {} Addon.nameToIndex = {} @@ -41,7 +42,8 @@ instance.name = GetAddOnInfo(id) instance.index = index else - error("Addon not found") + local message = "Addon not found: "..(id or "nil") + error(message) end end @@ -166,7 +168,7 @@ function addon:Enable() -- FIXME: delay this till after PLAYER_LOGIN or it'll get force-loaded - EnableAddOn(self.name) + Addon.enableAddon(self.name) end