Mercurial > wow > itemauditor
diff Modules/Api.lua @ 73:cd00b87fad31
Fixed a bug in IAapi.RegisterCraftingDecider and added a parameter so registered deciders can provide their own options group.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Thu, 29 Jul 2010 22:29:47 -0700 |
parents | 3930518cb8d9 |
children | 63823b6b5e28 |
line wrap: on
line diff
--- a/Modules/Api.lua Wed Jul 28 23:17:30 2010 -0700 +++ b/Modules/Api.lua Thu Jul 29 22:29:47 2010 -0700 @@ -23,10 +23,11 @@ IAapi.RegisterCraftingDecider('Five', function() return 5 end) ]] -function IAapi.RegisterCraftingDecider(name, decider) +function IAapi.RegisterCraftingDecider(name, decider, optionsTable) assert(type(name) == 'string', 'name must be a string to identify your addon. This will be displayed to the user.') - assert(type(destination) == 'function', 'decider must be a function.') - Crafting.RegisterCraftingDecider(name, decider) + assert(type(decider) == 'function', 'decider must be a function.') + assert(optionsTable == nil or type(optionsTable) == 'table') + Crafting.RegisterCraftingDecider(name, decider, optionsTable) end function IAapi.RegisterQueueDestination(name, destination)