From 265784e6dc024bc305c38b63cee05db790739869 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 1 Dec 2017 16:16:44 +0000 Subject: [PATCH] Started the expcore --- control.lua | 4 ++++ locale/ExpCore/load.lua | 39 +++++++++++++++++++++++++++++++++++++++ locale/StdLib/load.lua | 1 - 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 locale/ExpCore/load.lua diff --git a/control.lua b/control.lua index 586fad64..dfe86488 100644 --- a/control.lua +++ b/control.lua @@ -29,3 +29,7 @@ local Color, Game, Event = require('/locale/StdLib/load'){'Color','Game','Event' -- loads the ExpLib, functions are plased into the lua global local ExpLib = require 'ExpLib' ExpLib._unpack_to_G(ExpLib) +--_G.discord_emit = function(...) return false end -- un-comment this line if you are not using the json.data + +-- loads the ExpCore files these are need in order to run the other addons +local Ranking, Server, Gui = require('/locale/ExpCore/load'){'Ranking','Server','Gui'} \ No newline at end of file diff --git a/locale/ExpCore/load.lua b/locale/ExpCore/load.lua new file mode 100644 index 00000000..78620b4e --- /dev/null +++ b/locale/ExpCore/load.lua @@ -0,0 +1,39 @@ +--[[ +Explosive Gaming + +This file can be used with permission but this and the credit below must remain in the file. +Contact a member of management on our discord to seek permission to use our code. +Any changes that you may make to the code are yours but that does not make the script yours. +Discord: https://discord.gg/r6dC2uK +]] + +--[[ +StdLib + +This file allow you to only require this one file to return the diffent libarys. +This file will return a function which can be used to access only the part you want. +Pass a table with the names of the objects you want and it will be return in that order +]] + +local ExpCore = {} + +require '/commands' +ExpCore.Ranking = require '/ranking' +require '/ranks' +ExpCore.Server = require '/server' +ExpCore.Gui = require '/gui' +require '/GuiParts/inputs' +require '/GuiParts/toolbar' +require '/GuiParts/center' +require '/GuiParts/left' +require '/GuiParts/popup' + +return function(rtn) + local to_return = {} + for _,name in pairs(rtn) do + if ExpCore[name] then + table.insert(to_return,StdExpCoreLib[name]) + end + end + return unpack(to_return) +end \ No newline at end of file diff --git a/locale/StdLib/load.lua b/locale/StdLib/load.lua index a7501775..461d01c2 100644 --- a/locale/StdLib/load.lua +++ b/locale/StdLib/load.lua @@ -31,6 +31,5 @@ return function(rtn) table.insert(to_return,StdLib[name]) end end - test = to_return return unpack(to_return) end \ No newline at end of file