diff --git a/config/action_buttons.lua b/config/action_buttons.lua
index a98208f3..dadf057b 100644
--- a/config/action_buttons.lua
+++ b/config/action_buttons.lua
@@ -3,15 +3,15 @@
-- if a reason callback is used then Store.set(action_name_store,player.name,'BUTTON_NAME') should be called during on_click
-- buttons can be removed from the gui by commenting them out of the config at the bottom of this file
-- the key used for the name of the button is the permission name used by the role system
-local Gui = require 'expcore.gui'
-local Roles = require 'expcore.roles'
-local Store = require 'expcore.store'
-local Game = require 'utils.game'
-local Reports = require 'modules.control.reports'
-local Warnings = require 'modules.control.warnings'
-local Jail = require 'modules.control.jail'
-local Colors = require 'resources.color_presets'
-local format_chat_player_name = ext_require('expcore.common','format_chat_player_name')
+local Gui = require 'expcore.gui' --- @dep expcore.gui
+local Roles = require 'expcore.roles' --- @dep expcore.roles
+local Store = require 'expcore.store' --- @dep expcore.store
+local Game = require 'utils.game' --- @dep utils.game
+local Reports = require 'modules.control.reports' --- @dep modules.control.reports
+local Warnings = require 'modules.control.warnings' --- @dep modules.control.warnings
+local Jail = require 'modules.control.jail' --- @dep modules.control.jail
+local Colors = require 'resources.color_presets' --- @dep resources.color_presets
+local format_chat_player_name = ext_require('expcore.common','format_chat_player_name') --- @dep expcore.common
local action_player_store = 'gui.left.player-list.action-player'
local action_name_store = 'gui.left.player-list.action-name'
diff --git a/config/chat_reply.lua b/config/chat_reply.lua
index db6d38d8..536548cf 100644
--- a/config/chat_reply.lua
+++ b/config/chat_reply.lua
@@ -1,5 +1,5 @@
--- This file defines the different triggers for the chat bot
-local format_time = ext_require('expcore.common','format_time')
+local format_time = ext_require('expcore.common','format_time') --- @dep expcore.common
return {
allow_command_prefix_for_messages = true, -- when true any message trigger will print to all player when prefixed
messages = { -- will trigger when ever the word is said
diff --git a/config/expcore-commands/auth_admin.lua b/config/expcore-commands/auth_admin.lua
index 19ef9198..331a55d9 100644
--- a/config/expcore-commands/auth_admin.lua
+++ b/config/expcore-commands/auth_admin.lua
@@ -1,7 +1,7 @@
--- 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'
+local Commands = require 'expcore.commands' --- @dep expcore.commands
Commands.add_authenticator(function(player,command,tags,reject)
if tags.admin_only then
diff --git a/config/expcore-commands/auth_roles.lua b/config/expcore-commands/auth_roles.lua
index 3011166e..071d07a2 100644
--- a/config/expcore-commands/auth_roles.lua
+++ b/config/expcore-commands/auth_roles.lua
@@ -1,6 +1,6 @@
--- This will make commands only work if the role has been allowed it in the role config
-local Commands = require 'expcore.commands'
-local Roles = require 'expcore.roles'
+local Commands = require 'expcore.commands' --- @dep expcore.commands
+local Roles = require 'expcore.roles' --- @dep expcore.roles
Commands.add_authenticator(function(player,command,tags,reject)
if Roles.player_allowed(player,'command/'..command) then
diff --git a/config/expcore-commands/auth_runtime_disable.lua b/config/expcore-commands/auth_runtime_disable.lua
index 0f4861fb..016c115d 100644
--- a/config/expcore-commands/auth_runtime_disable.lua
+++ b/config/expcore-commands/auth_runtime_disable.lua
@@ -1,7 +1,7 @@
--- 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
-local Commands = require 'expcore.commands'
-local Global = require 'utils.global'
+local Commands = require 'expcore.commands' --- @dep expcore.commands
+local Global = require 'utils.global' --- @dep utils.global
local disabled_commands = {}
Global.register(disabled_commands,function(tbl)
diff --git a/config/expcore-commands/parse_general.lua b/config/expcore-commands/parse_general.lua
index 513aa845..8a9817ae 100644
--- a/config/expcore-commands/parse_general.lua
+++ b/config/expcore-commands/parse_general.lua
@@ -3,8 +3,8 @@
-- 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'
+local Commands = require 'expcore.commands' --- @dep expcore.commands
+local Game = require 'utils.game' --- @dep utils.game
--[[
>>>>Adds Parses:
diff --git a/config/expcore-commands/parse_roles.lua b/config/expcore-commands/parse_roles.lua
index 3d468aaf..9071a7db 100644
--- a/config/expcore-commands/parse_roles.lua
+++ b/config/expcore-commands/parse_roles.lua
@@ -1,7 +1,7 @@
--- Adds some parse functions that can be used with the role system
-local Commands = require 'expcore.commands'
-local Roles = require 'expcore.roles'
-local auto_complete = ext_require('expcore.common','auto_complete')
+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
require 'config.expcore-commands.parse_general'
Commands.add_parse('role',function(input,player,reject)
diff --git a/config/permission_groups.lua b/config/permission_groups.lua
index 9b2ac4f1..95c4c221 100644
--- a/config/permission_groups.lua
+++ b/config/permission_groups.lua
@@ -2,9 +2,9 @@
-- 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'
+local Event = require 'utils.event' --- @dep utils.event
+local Game = require 'utils.game' --- @dep utils.game
+local Permission_Groups = require 'expcore.permission_groups' --- @dep expcore.permission_groups
Permission_Groups.new_group('Admin')
:allow_all()
diff --git a/config/roles.lua b/config/roles.lua
index 93fe875e..551e2866 100644
--- a/config/roles.lua
+++ b/config/roles.lua
@@ -1,5 +1,5 @@
--- This is the main config file for the role system; file includes defines for roles and role flags and default values
-local Roles = require 'expcore.roles'
+local Roles = require 'expcore.roles' --- @dep expcore.roles
-- Use these to adjust for ticks ie game.tick < 5*minutes
local seconds, minutes, hours = 60, 3600, 216000
diff --git a/control.lua b/control.lua
index 29d79064..64636ae1 100644
--- a/control.lua
+++ b/control.lua
@@ -18,15 +18,15 @@ require 'utils.print_override'
require 'utils.math'
-- Global Debug and make sure our version file is registered
-Debug = require 'utils.debug'
+Debug = require 'utils.debug' --- @dep utils.debug
require 'resources.version'
-- Global require function used to extract parts of a module, because simply being in common is not good enough
-ext_require = require('expcore.common').ext_require
+ext_require = require 'expcore.common' --- @dep expcore.common.ext_require
-- Please go to config/file_loader.lua to edit the files that are loaded
log('[INFO] Getting file loader config')
-local files = require 'config._file_loader'
+local files = require 'config._file_loader' --- @dep config._file_loader
-- Loads all files from the config and logs that they are loaded
local total_file_count = string.format('%3d',#files)
diff --git a/doc/control/Jail.html b/doc/control/Jail.html
index d4e42066..1dfe56b7 100644
--- a/doc/control/Jail.html
+++ b/doc/control/Jail.html
@@ -96,7 +96,7 @@
-- import the module from the control modules
-local Jail = require'modules.control.jail'
-
+ local Jail = require'modules.control.jail'--- @dep modules.control.jail
+-- This will move 'MrBiter' to the jail role and remove all other roles from them
-- the player name and reason are only so they can be included in the event for user feedback
Jail.jail_player('MrBiter','Cooldude2606','Likes biters too much')
@@ -209,19 +210,15 @@
-- import the module from the control modules
-local Production = require'modules.control.production'
-
+ local Production = require'modules.control.production'--- @dep modules.control.production
+-- This will return the less precise index from the one given
-- this means that one_second will return one_minute or ten_hours will return fifty_hours
-- the other precision work like wise
@@ -220,11 +221,9 @@
-- import the module from the control modules
-local Reports = require'modules.control.reports'
-
+ local Reports = require'modules.control.reports'--- @dep modules.control.reports
+-- This will place a report on "MrBiter" (must be a valid player) the report will have been made
-- by "Cooldude2606" (must be the player name) with the reason 'Liking biters too much' this can be
-- seen by using Reports.get_report.
@@ -213,11 +214,9 @@
-- import the module from the control modules
-local Rockets = require'modules.control.rockets'
-
+
local Rockets = require'modules.control.rockets'--- @dep modules.control.rockets
+-- Some basic information is stored for each silo that has been built
-- the data includes: the tick it was built, the rockets launched from it and more
Rockets.get_silo_data(rocket_silo_entity)
@@ -211,15 +212,12 @@
-- import the module from the control modules
-local Tasks = require'modules.control.tasks'
-
+ local Tasks = require'modules.control.tasks'--- @dep modules.control.tasks
+-- To create a new task all you need is the name of the force you want to add the task to
-- you can give a place to add it but this is optional
Tasks.new_task('player')
@@ -211,15 +212,12 @@
-- import the module from the control modules
-local Warnings = require'modules.control.warnings'
-
+ local Warnings = require'modules.control.warnings'--- @dep modules.control.warnings
+-- This will add a warning to the player
Warnings.add_warning('MrBiter','Cooldude2606','Killed too many biters')
@@ -208,19 +209,15 @@
-- import the module from the control modules
-local Warps = require'modules.control.warps'
-
+ local Warps = require'modules.control.warps'--- @dep modules.control.warps
+-- Adding a warp require a force, surface and postion, and the option to set this as the spawn
-- this function will also create the warp area unless set other wise
Warps.new_warp('player',surface,{x=0,y=0})
@@ -213,23 +214,18 @@
diff --git a/doc/index.html b/doc/index.html
index a552d766..cffbbd68 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -95,7 +95,7 @@
each button has the button define(s) given along side an auth function, and optional reason callback
if a reason callback is used then Store.set(action_name_store,player.name,'BUTTON_NAME') should be called during on_click
buttons can be removed from the gui by commenting them out of the config at the bottom of this file
- the key used for the name of the button is the permision name used by the role system
+ the key used for the name of the button is the permission name used by the role system
This file is used to require all the different elements of the gui module
- each module has an outline here but for more details see their seperate files in ./gui
+ each module has an outline here but for more details see their separate files in ./gui
This file creates a teste gui that is used to test every input method
- note that this does not cover every permutation only features in indepentance
+
This file creates a test gui that is used to test every input method
+ note that this does not cover every permutation only features in independence
for example store in most cases is just by player name, but other store methods are tested with checkbox
@@ -153,7 +170,7 @@
each button has the button define(s) given along side an auth function, and optional reason callback
if a reason callback is used then Store.set(action_name_store,player.name,'BUTTON_NAME') should be called during on_click
buttons can be removed from the gui by commenting them out of the config at the bottom of this file
- the key used for the name of the button is the permision name used by the role system
+ the key used for the name of the button is the permission name used by the role system
@@ -166,11 +183,274 @@
+
- permision_name
+ permission_name :
(string)
- the name that can be used with the permision system
+ the name that can be used with the permission system
Toggles the visiblty of a left frame, or sets its visiblty state
+
Toggles the visibility of a left frame, or sets its visibility state
@@ -507,7 +717,7 @@
(boolean)
- when given will be the state that the visiblty is set to
+ when given will be the state that the visibility is set to
(optional)
@@ -522,7 +732,7 @@
(boolean)
- the new state of the visiblity
+ the new state of the visibility
- permision_name
+ permission_name :
(string)
- the name that can be used with the permision system
+ the name that can be used with the permission system
@@ -622,7 +832,7 @@
(boolean or function)
- the default state of the visiblty, can be a function
+ the default state of the visibility, can be a function
state param - player LuaPlayer - the player that has joined the game
state param - define_name string - the define name for the frame
state return - boolean - false will hide the frame
@@ -676,7 +886,7 @@
(string)
- the direction to have the elements be added to thef frame
+ the direction to have the elements be added to the frame
@@ -877,7 +1087,7 @@
-
Toggles the visiblty of the left frame
+
Toggles the visibility of the left frame
@@ -911,7 +1121,7 @@
(boolean)
- the new state of the visiblity
+ the new state of the visibility
@@ -934,7 +1144,7 @@
-
Updates the contents of the left frame, first tries update callback, oter wise will clear and redraw
+
Updates the contents of the left frame, first tries update callback, other wise will clear and redraw
Adds sprites to a button making it a spirte button
+
Adds sprites to a button making it a sprite button
@@ -479,7 +577,7 @@
(table)
- when filter is not a you can add the control keyss one after each other
+ when filter is not a you can add the control keys one after each other
(optional)
@@ -522,7 +620,7 @@
generated by LDoc
Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+ name
+
+ :
+
+ (string)
+
+ the name of the option set, must be unique
+
+
+
+
+
+
+
+
+
+ callback
+
+ :
+
+ (function)
+
+ the update callback when the value of the option set changes
+ callback param - value string - the new selected option for this option set
+ callback param - category string - the category that updated if categorize was used
+
+
+
+
+
+
+
+
+
+ categorize
+
+ :
+
+ (function)
+
+ the function used to convert an element into a string
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+ (string)
+ the name of this option set to be passed to add_as_option
+
Sets all radiobutton in a element to false (unless excluded) and can act recursively
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+ element
+
+ :
+
+ (LuaGuiElement)
+
+ the root gui element to start setting radio buttons from
+
+
+
+
+
+
+
+
+
+ exclude
+
+ :
+
+ (table)
+
+ ?string|table the name of the radiobutton to exclude or a of radiobuttons where true will set the state true
+
+ (optional)
+
+
+
+
+
+
+
+
+ recursive
+
+ :
+
+ (number or boolean)
+
+ if true will recur as much as possible, if a will recur that number of times
+
+ (default: false)
+
Increases the value of the progressbar, if a define is given all of its instances are incremented
+
Increases the value of the progressbar, if a define is given all of its instances have incremented
@@ -394,7 +520,7 @@
-
Decreases the value of the progressbar, if a define is given all of its instances are decresed
+
Decreases the value of the progressbar, if a define is given all of its instances have decremented
@@ -496,7 +622,7 @@
(table)
- the new progressbar elemente define
+ the new progressbar element define
@@ -1022,7 +1148,7 @@
-
Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented
+
Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented
@@ -1042,7 +1168,7 @@
(function)
- when given will use filtered incerement
+ when given will use filtered increment
(optional)
@@ -1080,7 +1206,7 @@
-
Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented
+
Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented
@@ -1100,7 +1226,7 @@
(function)
- when given will use filtered decerement
+ when given will use filtered decrement
(optional)
@@ -1143,7 +1269,7 @@
generated by LDoc
@@ -373,7 +499,7 @@
(LuaGuiElement)
- the parent element that the lable will be drawn to
+ the parent element that the label will be drawn to
@@ -473,7 +599,7 @@
generated by LDoc
This file is used to require all the different elements of the gui module
- each module has an outline here but for more details see their seperate files in ./gui
+ each module has an outline here but for more details see their separate files in ./gui
@@ -163,11 +180,389 @@
+
This file creates a teste gui that is used to test every input method
- note that this does not cover every permutation only features in indepentance
+
This file creates a test gui that is used to test every input method
+ note that this does not cover every permutation only features in independence
for example store in most cases is just by player name, but other store methods are tested with checkbox
Sets an auto promote condition that is checked every 5 seconds, if true is returned then the player will recive the role
+
Sets an auto promote condition that is checked every 5 seconds, if true is returned then the player will receive the role
nb: this is one way, failing false after already gaining the role will not revoke the role
@@ -668,7 +878,7 @@
(number)
- the place in the oder list of the role to get
+ the place in the order list of the role to get
@@ -2279,7 +2489,7 @@
-
Sets an auto promote condition that is checked every 5 seconds, if true is returned then the player will recive the role
+
Sets an auto promote condition that is checked every 5 seconds, if true is returned then the player will receive the role
nb: this is one way, failing false after already gaining the role will not revoke the role