Cleaned Config

This commit is contained in:
Cooldude2606
2020-03-29 23:39:24 +01:00
parent 5dbc7a5e5c
commit 95af6cfc34
45 changed files with 49 additions and 79 deletions

View File

@@ -196,7 +196,7 @@
]]
local Game = require 'utils.game' --- @dep utils.game
local player_return,write_json = _C.ext_require('expcore.common','player_return','write_json') --- @dep expcore.common
local player_return,write_json = _C.player_return, _C.write_json --- @dep expcore.common
local Commands = {
defines={ -- common values are stored error like signals

View File

@@ -192,19 +192,6 @@ function Common.opt_require(path)
else return nil,rtn end
end
--- Calls a require and returns only the keys given, file must return a table
-- @usage local extract, param_check = _C.ext_require('expcore.common','extract','param_check') --- @dep expcore.common
-- @tparam string path the path that you want to require
-- @tparam string ... the name of the keys that you want returned
-- @return the keys in the order given
function Common.ext_require(path,...)
local rtn = require(path)
if type(rtn) ~= 'table' then
error('File did not return a table, can not extract keys.',2)
end
return table.extract_keys(rtn,...)
end
--- Returns a desync safe file path for the current file
-- @tparam[opt=0] number offset the offset in the stack to get, 0 is current file
-- @treturn string the file path

View File

@@ -118,7 +118,7 @@ local Event = require 'utils.event' --- @dep utils.event
local Groups = require 'expcore.permission_groups' --- @dep expcore.permission_groups
local Async = require 'expcore.async' --- @dep expcore.async
local Colours = require 'utils.color_presets' --- @dep utils.color_presets
local write_json = _C.ext_require('expcore.common','write_json') --- @dep expcore.common
local write_json = _C.write_json --- @dep expcore.common
local Roles = {
_prototype={},