This commit is contained in:
Cooldude2606
2019-07-23 17:46:49 +01:00
parent 604fb66f46
commit 9ecd0cca0d
150 changed files with 15734 additions and 1895 deletions

View File

@@ -1,6 +1,8 @@
--- This is a very simple config file which adds a admin only auth function
-- not much to change here its more so it can be enabled and disabled from ./config/file_loader.lua
--- This is a very simple config file which adds a admin only auth functio;
-- not much to change here its more so it can be enabled and disabled from ./config/file_loader.lua;
-- either way you can change the requirements to be "admin" if you wanted to
-- @config Commands-Auth-Admin
local Commands = require 'expcore.commands' --- @dep expcore.commands
Commands.add_authenticator(function(player,command,tags,reject)

View File

@@ -1,4 +1,6 @@
--- This will make commands only work if the role has been allowed it in the role config
-- @config Commands-Auth-Roles
local Commands = require 'expcore.commands' --- @dep expcore.commands
local Roles = require 'expcore.roles' --- @dep expcore.roles

View File

@@ -1,5 +1,7 @@
--- This config for command auth allows commands to be globally enabled and disabled during runtime
--- This config for command auth allows commands to be globally enabled and disabled during runtime;
-- this config adds Commands.disable and Commands.enable to enable and disable commands for all users
-- @config Commands-Auth-Runtime-Disable
local Commands = require 'expcore.commands' --- @dep expcore.commands
local Global = require 'utils.global' --- @dep utils.global
@@ -8,10 +10,14 @@ Global.register(disabled_commands,function(tbl)
disabled_commands = tbl
end)
--- Stops a command from be used by any one
-- @tparam string command_name the name of the command to disable
function Commands.disable(command_name)
disabled_commands[command_name] = true
end
--- Allows a command to be used again after disable was used
-- @tparam string command_name the name of the command to enable
function Commands.enable(command_name)
disabled_commands[command_name] = nil
end

View File

@@ -1,13 +1,10 @@
--- This file contains some common command param parse functions
-- this file is less of a config and more of a requirement but you may wish to change how some behave
-- as such you need to be confident with lua but you edit this config file
-- use Commands.add_parse('name',function(input,player,reject) end) to add a parse
-- see ./expcore/commands.lua for more details
local Commands = require 'expcore.commands' --- @dep expcore.commands
local Game = require 'utils.game' --- @dep utils.game
--[[
>>>>Adds Parses:
--[[-- This file contains some common command param parse functions;
this file is less of a config and more of a requirement but you may wish to change how some behave;
as such you need to be confident with lua but you edit this config file;
use Commands.add_parse('name',function(input,player,reject) end) to add a parse;
see ./expcore/commands.lua for more details
@config Commands-Parse
@usage Adds Parses:
boolean
string-options - options: array
string-max-length - max_length: number
@@ -22,6 +19,11 @@ local Game = require 'utils.game' --- @dep utils.game
surface
]]
local Commands = require 'expcore.commands' --- @dep expcore.commands
local Game = require 'utils.game' --- @dep utils.game
Commands.add_parse('boolean',function(input,player,reject)
if not input then return end -- nil check
input = input:lower()

View File

@@ -1,4 +1,12 @@
--- Adds some parse functions that can be used with the role system
--[[-- Adds some parse functions that can be used with the role system
@config Commands-Parse-Roles
@usage Adds Parses:
role
player-role
player-role-online
player-role-alive
]]
local Commands = require 'expcore.commands' --- @dep expcore.commands
local Roles = require 'expcore.roles' --- @dep expcore.roles
local auto_complete = ext_require('expcore.common','auto_complete') --- @dep expcore.common