Cleaned Config Files

This commit is contained in:
Cooldude2606
2019-03-22 21:56:34 +00:00
parent ad97fafa97
commit 5d163ceeeb
11 changed files with 57 additions and 25 deletions

View File

@@ -1,3 +1,6 @@
--- 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
-- either way you can change the requirements to be "admin" if you wanted to
local Commands = require 'expcore.commands'
Commands.add_authenticator(function(player,command,tags,reject)

View File

@@ -1,8 +1,13 @@
--- 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'
local Game = require 'utils.game'
--[[
>>>>Adds parses:
>>>>Adds Parses:
boolean
string-options - options: array
string-max-length - max_length: number

20
config/file_loader.lua Normal file
View File

@@ -0,0 +1,20 @@
--- This contains a list of all files that will be loaded and the order they are loaded in
-- to stop a file from loading add "--" in front of it, remove the "--" to have the file be loaded
-- config files should be loaded after all modules are loaded
-- core files should be required by modules and not be present in this list
return {
--'example.file_not_loaded',
'modules.factorio-control', -- base factorio free play scenario
-- Game Commands
'modules.commands.me',
'modules.commands.kill',
'modules.commands.admin-chat',
'modules.commands.tag',
'modules.commands.teleport',
'modules.commands.cheat-mode',
'modules.commands.interface',
'modules.commands.help',
-- Config Files
'config.command_auth_admin', -- commands tags with admin_only are blocked for non admins
'config.permission_groups', -- loads some predefined permission groups
}

View File

@@ -1,3 +1,7 @@
--- Use this file to add new permission groups to the game
-- start with Permission_Groups.new_group('name')
-- then use either :allow_all() or :disallow_all() to set the default for non specified actions
-- then use :allow{} and :disallow{} to specify certain actions to allow/disallow
local Event = require 'utils.event'
local Game = require 'utils.game'
local Permission_Groups = require 'expcore.permission_groups'