local MAJOR_VERSION = "AceCoreAddon-2.0"local MINOR_VERSION = 1if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary") endif not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return endif not AceLibrary:HasInstance("AceOO-2.0") then error(MAJOR_VERSION .. " requires AceOO-2.0") endlocal AceOO = AceLibrary:GetInstance("AceOO-2.0")local AceCoreAddon = AceOO.LibraryMixin {"NewModule", "CreatePrototype", "HasModule"}function AceCoreAddon:NewModule(name, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) if not self.modules[0] then error ("You must call CreatePrototype() before attempting to create a new module.", 2) end if (not name or name == "") then error ("NewModule must be supplied a name. This must be a non-nil non zero length string.", 2) end if self.modules[name] then error("The module name provided to NewModule must be unique", 2) end self.modules[name] = self.modules[0]:new(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) self.modules[name].name = name ace:print("New Module Created") return self.modules[name]endfunction AceCoreAddon:HasModule(name) if self.modules[name] then return true endendfunction AceCoreAddon:CreatePrototype() if not self.modules then self.modules = {} end self.modules[0] = AceOO.Class("AceAddon-2.0") self.modulePrototype = self.modules[0].prototype ace:print("New Module Prototype Created")endAceLibrary:Register(AceCoreAddon, MAJOR_VERSION, MINOR_VERSION, AceCoreAddon.activate)AceCoreAddon = AceLibrary(MAJOR_VERSION)