diff --git a/README.md b/README.md index c78e995b..2c9d02e7 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ All are welcome to make pull requests and issues for this scenario, if you are i | Scenario Version* | Version Name | Factorio Version** | |---|---|---| -| [v5.7][s5.8] | Home and Chat Bot | [v0.17.47][f0.17.49] | +| [v5.9][s5.9] | Control Modules and Documentation | [v0.17.63][f0.17.63] | +| [v5.8][s5.8] | Home and Chat Bot | [v0.17.47][f0.17.49] | | [v5.7][s5.7] | Warp System | [v0.17.47][f0.17.47] | | [v5.6][s5.6] | Information Guis | [v0.17.44][f0.17.44] | | [v5.5][s5.5] | Gui System | [v0.17.43][f0.17.43] | @@ -75,6 +76,7 @@ All are welcome to make pull requests and issues for this scenario, if you are i \*\* Factorio versions show the version they were made for, often the minimum requirement. +[s5.9]: https://github.com/explosivegaming/scenario/releases/tag/5.9.0 [s5.8]: https://github.com/explosivegaming/scenario/releases/tag/5.8.0 [s5.7]: https://github.com/explosivegaming/scenario/releases/tag/5.7.0 [s5.6]: https://github.com/explosivegaming/scenario/releases/tag/5.6.0 @@ -90,6 +92,7 @@ All are welcome to make pull requests and issues for this scenario, if you are i [s1.0]: https://github.com/explosivegaming/scenario/releases/tag/v1.0 [s0.1]: https://github.com/explosivegaming/scenario/releases/tag/v0.1 +[f0.17.63]: https://wiki.factorio.com/Version_history/0.17.0#0.17.63 [f0.17.49]: https://wiki.factorio.com/Version_history/0.17.0#0.17.49 [f0.17.47]: https://wiki.factorio.com/Version_history/0.17.0#0.17.47 [f0.17.44]: https://wiki.factorio.com/Version_history/0.17.0#0.17.44 diff --git a/config/_file_loader.lua b/config/_file_loader.lua index f6c11fcb..c4a5bba6 100644 --- a/config/_file_loader.lua +++ b/config/_file_loader.lua @@ -1,7 +1,8 @@ ---- 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 +--- 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; +-- @config File-Loader return { --'example.file_not_loaded', 'modules.factorio-control', -- base factorio free play scenario diff --git a/config/action_buttons.lua b/config/action_buttons.lua index d1f6846d..2e2fb9ae 100644 --- a/config/action_buttons.lua +++ b/config/action_buttons.lua @@ -1,17 +1,19 @@ ---- Config for the different action buttons that show on the player list --- 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 -local Gui = require 'expcore.gui' -local Roles = require 'expcore.roles' -local Store = require 'expcore.store' -local Game = require 'utils.game' -local Reports = require 'modules.addons.reports-control' -local Warnings = require 'modules.addons.warnings-control' -local Jail = require 'modules.addons.jail-control' -local Colors = require 'resources.color_presets' -local format_chat_player_name = ext_require('expcore.common','format_chat_player_name') +--- Config for the different action buttons that show on the player list; +-- 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 permission name used by the role system; +-- @config Player-List + +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' @@ -50,7 +52,8 @@ local function teleport(from_player,to_player) return true end --- teleports the user to the action player +--- Teleports the user to the action player +-- @element goto_player local goto_player = Gui.new_button() :set_sprites('utility/export') @@ -66,7 +69,8 @@ Gui.new_button() end end) --- teleports the action player to the user +--- Teleports the action player to the user +-- @element bring_player local bring_player = Gui.new_button() :set_sprites('utility/import') @@ -82,7 +86,8 @@ Gui.new_button() end end) --- kills the action player, if there are alive +--- Kills the action player, if there are alive +-- @element kill_player local kill_player = Gui.new_button() :set_sprites('utility/too_far') @@ -98,7 +103,8 @@ Gui.new_button() end end) --- reports the action player, requires a reason to be given +--- Reports the action player, requires a reason to be given +-- @element report_player local report_player = Gui.new_button() :set_sprites('utility/spawn_flag') @@ -106,7 +112,7 @@ Gui.new_button() :set_style('tool_button',tool_button_style) :on_click(function(player,element) local action_player_name = get_action_player_name(player) - if Reports.player_is_reported_by(action_player_name,player.name) then + if Reports.is_reported(action_player_name,player.name) then player.print({'expcom-report.already-reported'},Colors.orange_red) else Store.set(action_name_store,player.name,'command/report') @@ -118,10 +124,11 @@ local function report_player_callback(player,reason) local by_player_name_color = format_chat_player_name(player) game.print{'expcom-report.non-admin',action_player_name_color,reason} Roles.print_to_roles_higher('Trainee',{'expcom-report.admin',action_player_name_color,by_player_name_color,reason}) - Reports.report_player(action_player_name,reason,player.name) + Reports.report_player(action_player_name,player.name,reason) end --- gives the action player a warning, requires a reason +--- Gives the action player a warning, requires a reason +-- @element warn_player local warn_player = Gui.new_button() :set_sprites('utility/spawn_flag') @@ -135,10 +142,11 @@ local function warn_player_callback(player,reason) local action_player_name,action_player_name_color = get_action_player_name(player) local by_player_name_color = format_chat_player_name(player) game.print{'expcom-warnings.received',action_player_name_color,by_player_name_color,reason} - Warnings.add_warnings(action_player_name,player.name) + Warnings.add_warning(action_player_name,player.name,reason) end --- jails the action player, requires a reason +--- Jails the action player, requires a reason +-- @element jail_player local jail_player = Gui.new_button() :set_sprites('utility/item_editor_icon') @@ -146,7 +154,7 @@ Gui.new_button() :set_style('tool_button',tool_button_style) :on_click(function(player,element) local action_player_name,action_player_name_color = get_action_player_name(player) - if Roles.player_has_role(action_player_name,'Jail') then + if Jail.is_jailed(action_player_name) then player.print({'expcom-jail.already-jailed',action_player_name_color},Colors.orange_red) else Store.set(action_name_store,player.name,'command/jail') @@ -157,10 +165,11 @@ local function jail_player_callback(player,reason) local action_player_name,action_player_name_color = get_action_player_name(player) local by_player_name_color = format_chat_player_name(player) game.print{'expcom-jail.give',action_player_name_color,by_player_name_color,reason} - Jail.jail_player(action_player_name,player.name) + Jail.jail_player(action_player_name,player.name,reason) end --- temp bans the action player, requires a reason +--- Temp bans the action player, requires a reason +-- @element temp_ban_player local temp_ban_player = Gui.new_button() :set_sprites('utility/clock') @@ -168,7 +177,7 @@ Gui.new_button() :set_style('tool_button',tool_button_style) :on_click(function(player,element) local action_player_name,action_player_name_color = get_action_player_name(player) - if Roles.player_has_role(action_player_name,'Jail') then + if Jail.is_jailed(action_player_name) then player.print({'expcom-jail.already-banned',action_player_name_color},Colors.orange_red) else Store.set(action_name_store,player.name,'command/temp-ban') @@ -182,7 +191,8 @@ local function temp_ban_player_callback(player,reason) Jail.temp_ban_player(action_player,player.name,reason) end --- kicks the action player, requires a reason +--- Kicks the action player, requires a reason +-- @element kick_player local kick_player = Gui.new_button() :set_sprites('utility/warning_icon') @@ -197,7 +207,8 @@ local function kick_player_callback(player,reason) game.kick_player(action_player,reason) end --- bans the action player, requires a reason +--- Bans the action player, requires a reason +-- @element ban_player local ban_player = Gui.new_button() :set_sprites('utility/danger_icon') @@ -235,7 +246,7 @@ return { if not Roles.player_allowed(player,'command/give-warning') then return not Roles.player_has_flag(action_player,'report-immune') end - end, -- can report any player that isnt immune and you arnt able to give warnings + end, -- can report any player that isn't immune and you aren't able to give warnings reason_callback=report_player_callback, report_player }, diff --git a/config/advanced_start.lua b/config/advanced_start.lua index 586530ad..f490a9cb 100644 --- a/config/advanced_start.lua +++ b/config/advanced_start.lua @@ -1,4 +1,5 @@ --- This file is used to setup the map starting settings and the items players will start with +-- @config Advanced-Start --- These are called factories because they return another function -- use these as a simple methods of adding new items @@ -61,14 +62,14 @@ end ]] return { - skip_intro=true, -- skips the intro given in the default factorio free play scenario - skip_victory=true, -- will skip the victory screen when a rocket is launched - disable_base_game_silo_script=true, -- will not load the silo script at all - research_queue_from_start=true, -- when true the research queue is useible from the start - friendly_fire=false, -- weather players will be able to attack each other on the same force - enemy_expansion=false, -- a catch all for in case the map settings file fails to load - chart_radius=10*32, -- the number of tiles that will be charted when the map starts - items = { -- items and there condition for being given + skip_intro=true, --- @setting skip_intro skips the intro given in the default factorio free play scenario + skip_victory=true, --- @setting skip_victory will skip the victory screen when a rocket is launched + disable_base_game_silo_script=true, --- @setting disable_base_game_silo_script will not load the silo script at all + research_queue_from_start=true, --- @setting research_queue_from_start when true the research queue is useible from the start + friendly_fire=false, --- @setting friendly_fire weather players will be able to attack each other on the same force + enemy_expansion=false, --- @setting enemy_expansion a catch all for in case the map settings file fails to load + chart_radius=10*32, --- @setting chart_radius the number of tiles that will be charted when the map starts + items = { --- @setting items items and there condition for being given -- ['item-name'] = function(amount_made,production_stats,player) return end -- 0 means no items given -- Plates ['iron-plate']=scale_amount_made(100,10,10), diff --git a/config/bonuses.lua b/config/bonuses.lua index d74ddfbf..b96b48a2 100644 --- a/config/bonuses.lua +++ b/config/bonuses.lua @@ -1,4 +1,6 @@ --- Lists all bonuses which can be used, name followed by min max +-- @config Bonuses + return { character_mining_speed_modifier={0,3}, character_crafting_speed_modifier={0,3}, diff --git a/config/chat_reply.lua b/config/chat_reply.lua index aff00871..ca7d1700 100644 --- a/config/chat_reply.lua +++ b/config/chat_reply.lua @@ -1,8 +1,11 @@ --- This file defines the different triggers for the chat bot -local format_time = ext_require('expcore.common','format_time') +-- @config Chat-Reply + +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 + allow_command_prefix_for_messages = true, --- @setting allow_command_prefix_for_messages when true any message trigger will print to all player when prefixed + messages = { --- @setting messages will trigger when ever the word is said ['discord']={'info.discord'}, ['expgaming']={'info.website'}, ['website']={'info.website'}, @@ -39,13 +42,13 @@ return { return {'chat-bot.map-time',format_time(game.tick,{days=true,hours=true,minutes=true,seconds=true,long=true})} end, }, - command_admin_only = false, -- when true will only allow chat commands for admins - command_permission = 'command/chat-bot', -- the permision used to allow command prefixs - command_prefix = '!', -- prefix used for commands below and to print to all players (if enabled above) - commands = { -- will trigger only when command prefix is given + command_admin_only = false, --- @setting command_admin_only when true will only allow chat commands for admins + command_permission = 'command/chat-bot', --- @setting command_permission the permission used to allow command prefixes + command_prefix = '!', --- @setting command_prefix prefix used for commands below and to print to all players (if enabled above) + commands = { --- @setting commands will trigger only when command prefix is given ['dev']={'chat-bot.not-real-dev'}, ['blame']=function(player) - local names = {'Cooldude2606','arty714','badgamernl',player.name} + local names = {'Cooldude2606','arty714','badgamernl', 'mark9064', 'aldldl', 'Drahc_pro',player.name} for _,next_player in pairs(game.connected_players) do names[#names + 1] = next_player.name end diff --git a/config/compilatron.lua b/config/compilatron.lua index 116eb5b6..6b69601d 100644 --- a/config/compilatron.lua +++ b/config/compilatron.lua @@ -1,10 +1,12 @@ --- config file for the compliatrons including where they spawn and what messages they show +--- Config file for the compliatrons including where they spawn and what messages they show +-- @config Compilatron + return { - message_cycle=60*15, -- 15 seconds default, how often (in ticks) the messages will cycle - locations={ -- defines the spawn locations for all compilatrons + message_cycle=60*15, --- @setting message_cycle 15 seconds default, how often (in ticks) the messages will cycle + locations={ --- @setting locations defines the spawn locations for all compilatrons ['Spawn']={x=0,y=0} }, - messages={ -- the messages that each one will say, must be same name as its location + messages={ --- @setting messages the messages that each one will say, must be same name as its location ['Spawn']={ {'info.website'}, {'info.read-readme'}, diff --git a/config/death_logger.lua b/config/death_logger.lua index 7e03c2bb..1c5c578b 100644 --- a/config/death_logger.lua +++ b/config/death_logger.lua @@ -1,12 +1,14 @@ ---- This config controls what happens when a player dies mostly about map markers and item collection --- allow_teleport_to_body_command and allow_collect_bodies_command can be over ridden if command_auth_runtime_disable is present +--- This config controls what happens when a player dies mostly about map markers and item collection; +-- allow_teleport_to_body_command and allow_collect_bodies_command can be over ridden if command_auth_runtime_disable is present; -- if not present then the commands will not be loaded into the game +-- @config Death-Logger + return { - --allow_teleport_to_body_command=false, -- allows use of /return-to-body which teleports you to your last death - --allow_collect_bodies_command=false, -- allows use of /collect-body which returns all your items to you and removes the body - use_chests_as_bodies=false, -- weather items should be moved into a chest when a player dies - auto_collect_bodies=true, -- enables items being returned to the spawn point in chests upon corpse expiring - show_map_markers=true, -- shows markers on the map where bodies are - include_time_of_death=true, -- weather to include the time of death on the map marker - map_icon=nil -- the icon that the map marker shows; nil means no icon; format as a SingleID + --WIP_allow_teleport_to_body_command=false, -- allows use of /return-to-body which teleports you to your last death + --WIP_allow_collect_bodies_command=false, -- allows use of /collect-body which returns all your items to you and removes the body + use_chests_as_bodies=false, --- @setting use_chests_as_bodies weather items should be moved into a chest when a player dies + auto_collect_bodies=true, --- @setting auto_collect_bodies enables items being returned to the spawn point in chests upon corpse expiring + show_map_markers=true, --- @setting show_map_markers shows markers on the map where bodies are + include_time_of_death=true, --- @setting include_time_of_death weather to include the time of death on the map marker + map_icon=nil --- @setting map_icon the icon that the map marker shows; nil means no icon; format as a SingleID } \ No newline at end of file diff --git a/config/discord_alerts.lua b/config/discord_alerts.lua index 2eeb922f..1d2c58d0 100644 --- a/config/discord_alerts.lua +++ b/config/discord_alerts.lua @@ -1,4 +1,6 @@ --- Config file used to enable and disable different push messages for discord +-- @config Discord-Alerts + return { player_reports=true, player_warnings=true, diff --git a/config/expcore-commands/auth_admin.lua b/config/expcore-commands/auth_admin.lua index 19ef9198..5f2b8723 100644 --- a/config/expcore-commands/auth_admin.lua +++ b/config/expcore-commands/auth_admin.lua @@ -1,7 +1,9 @@ ---- 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 -local Commands = require 'expcore.commands' +-- @config Commands-Auth-Admin + +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..cb7e0db9 100644 --- a/config/expcore-commands/auth_roles.lua +++ b/config/expcore-commands/auth_roles.lua @@ -1,6 +1,8 @@ --- 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' +-- @config Commands-Auth-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..204869f5 100644 --- a/config/expcore-commands/auth_runtime_disable.lua +++ b/config/expcore-commands/auth_runtime_disable.lua @@ -1,17 +1,23 @@ ---- 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 -local Commands = require 'expcore.commands' -local Global = require 'utils.global' +-- @config Commands-Auth-Runtime-Disable + +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) 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 diff --git a/config/expcore-commands/parse_general.lua b/config/expcore-commands/parse_general.lua index 513aa845..7b9e282a 100644 --- a/config/expcore-commands/parse_general.lua +++ b/config/expcore-commands/parse_general.lua @@ -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' -local Game = require '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' 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() diff --git a/config/expcore-commands/parse_roles.lua b/config/expcore-commands/parse_roles.lua index 3d468aaf..20b0d51f 100644 --- a/config/expcore-commands/parse_roles.lua +++ b/config/expcore-commands/parse_roles.lua @@ -1,7 +1,15 @@ ---- 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') +--[[-- 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 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..5c9ca73c 100644 --- a/config/permission_groups.lua +++ b/config/permission_groups.lua @@ -1,10 +1,12 @@ ---- 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 +--- 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' +-- @config 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() @@ -59,7 +61,6 @@ Permission_Groups.new_group('Standard') 'admin_action', -- trusted 'change_programmable_speaker_alert_parameters', -- standard 'drop_item', - 'reset_assembling_machine', 'set_auto_launch_rocket' } @@ -81,7 +82,6 @@ Permission_Groups.new_group('Guest') 'admin_action', -- trusted 'change_programmable_speaker_alert_parameters', -- standard 'drop_item', - 'reset_assembling_machine', 'set_auto_launch_rocket', 'change_programmable_speaker_parameters', -- guest 'change_train_stop_station', @@ -136,4 +136,4 @@ Event.on_nth_tick(check_interval,function(event) for _,player in pairs(game.connected_players) do assign_group(player) end -end)]] \ No newline at end of file +end)]] diff --git a/config/pollution_grading.lua b/config/pollution_grading.lua index b19fd3ef..fdb73369 100644 --- a/config/pollution_grading.lua +++ b/config/pollution_grading.lua @@ -1,7 +1,9 @@ --- This controls how pollution is viewed on the map +--- This controls how pollution is viewed on the map +-- @config Pollution-Grading + return { - reference_point = {x=0,y=0}, -- where pollution is read from - max_scalar = 0.5, -- the scale between true max and max - min_scalar = 0.17, -- the scale between the lowest max and min - update_delay = 15 -- time in minutes between view updates + reference_point = {x=0,y=0}, --- @setting reference_point where pollution is read from + max_scalar = 0.5, --- @setting max_scalar the scale between true max and max + min_scalar = 0.17, --- @setting min_scalar the scale between the lowest max and min + update_delay = 15 --- @setting update_delay time in minutes between view updates } \ No newline at end of file diff --git a/config/popup_messages.lua b/config/popup_messages.lua index bee5b53c..75db9a47 100644 --- a/config/popup_messages.lua +++ b/config/popup_messages.lua @@ -1,8 +1,10 @@ --- A combination of config settings for different popup values like chat and damage +-- @config Popup-Messages + return { - show_player_messages=true, -- weather a message in chat will make a popup above them - show_player_mentions=true, -- weather a mentioned player will have a popup when mentioned in chat - show_player_damage=true, -- weather to show damage done by players - show_player_health=true, -- weather to show player health when attacked - damage_location_variance=0.8 -- how close to the eade of an entity the popups will appear + show_player_messages=true, --- @setting show_player_messages weather a message in chat will make a popup above them + show_player_mentions=true, --- @setting show_player_mentions weather a mentioned player will have a popup when mentioned in chat + show_player_damage=true, --- @setting show_player_damage weather to show damage done by players + show_player_health=true, --- @setting show_player_health weather to show player health when attacked + damage_location_variance=0.8 --- @setting damage_location_variance how close to the eade of an entity the popups will appear } \ No newline at end of file diff --git a/config/preset_player_colours.lua b/config/preset_player_colours.lua index d10fd64a..448a97e1 100644 --- a/config/preset_player_colours.lua +++ b/config/preset_player_colours.lua @@ -1,6 +1,8 @@ --- preset colours that players get when they join the server, if not in the list then will be given a random colour (which isnt disallowed) +--- Preset colours that players get when they join the server, if not in the list then will be given a random colour (which isnt disallowed) +-- @config Preset-Player-Colours + return { - players={ + players={ --- @setting players list of all players and the colour in rgb256 that they will recive upon joining BADgamerNL={r=255,g=20,b=147}, arty714={r=150,g=68,b=161}, Cooldude2606={r=57,g=192,b=207}, @@ -11,9 +13,11 @@ return { aldldl={r=0,g=131,b=255}, NAD4X4={r=135,g=206,b=250}, cydes={r=82,g=249,b=155}, - UUBlueFire={r=0,g=204,b=255} + UUBlueFire={r=0,g=204,b=255}, + CmonMate497={r=103,g=224,b=194} + }, - disallow = { -- the value does not matter it is only the key which is checked + disallow = { --- @setting disallow colours which will not given to players; the value does not matter it is only the key which is checked black = {r = 0, g = 0, b = 0}, white = {r = 255, g = 255, b = 255}, jailed = {r = 255, g = 255, b = 255}, diff --git a/config/repair.lua b/config/repair.lua index 5980c8c2..0dbb1224 100644 --- a/config/repair.lua +++ b/config/repair.lua @@ -1,14 +1,16 @@ --- config file for the repair command +--- Config file for the repair command +-- @config Repair + return { - disallow = { -- items in this list will never be repaired + disallow = { --- @setting disallow items in this list will never be repaired ['loader']=true, ['fast-loader']=true, ['express-loader']=true, ['electric-energy-interface']=true, ['infinity-chest']=true }, - max_range=50, -- the max range that can be used with the repair command - allow_blueprint_repair=false, -- when true will allow blueprints (things not destroied by biters) to be build instently using the repair command - allow_ghost_revive=true, -- when true will allow ghosts (things destoried by biters) to be build instently using the repair command - allow_heal_entities=true -- when true will heal entities to full health that are within range + max_range=50, --- @setting max_range the max range that can be used with the repair command + allow_blueprint_repair=false, --- @setting allow_blueprint_repair when true will allow blueprints (things not destroyed by biters) to be build instantly using the repair command + allow_ghost_revive=true, --- @setting allow_ghost_revive when true will allow ghosts (things destroyed by biters) to be build instantly using the repair command + allow_heal_entities=true --- @setting allow_heal_entities when true will heal entities to full health that are within range } \ No newline at end of file diff --git a/config/rockets.lua b/config/rockets.lua index 7025ae16..00432a9d 100644 --- a/config/rockets.lua +++ b/config/rockets.lua @@ -1,18 +1,20 @@ --- This file controls what will show in each section of the rocket info gui +-- @config Rockets + return { - stats = { --- The data that will show in the stats section - show_stats=true, -- false will hide this section all together - show_first_rocket = true, -- false will not show when the first rocket was launched - show_last_rocket = true, -- false will not show when the last rocket was launched - show_fastest_rocket = true, -- false will not show the time taken for the fastest rocket - show_total_rockets = true, -- false will not show the total number of rockets launched - show_game_avg = true, -- false will hide the avg across the entire map time - rolling_avg = { -- each number will be one stat; 5 means the avg time taken for the last 5 rockets + stats = { --- @setting stats The data that will show in the stats section + show_stats=true, --- @setting show_stats false will hide this section all together + show_first_rocket = true, --- @setting show_first_rocket false will not show when the first rocket was launched + show_last_rocket = true, --- @setting show_last_rocket false will not show when the last rocket was launched + show_fastest_rocket = true, --- @setting show_fastest_rocket false will not show the time taken for the fastest rocket + show_total_rockets = true, --- @setting show_total_rockets false will not show the total number of rockets launched + show_game_avg = true, --- @setting show_game_avg false will hide the avg across the entire map time + rolling_avg = { --- @setting rolling_avg each number will be one statistic; 5 means the avg time taken for the last 5 rockets 5,10,25 } }, - milestones = { -- each number will be one stat; 5 means the time that the 5th rocket was launched - show_milestones=true, -- false will hide this section all together + milestones = { --- @setting milestones each number will be one statistic; 5 means the time that the 5th rocket was launched + show_milestones=true, --- @setting show_milestones false will hide this section all together 1,2,5, 10,20,50, 100,200,500, @@ -20,14 +22,14 @@ return { 3000,3500,4000,4500, 5000 }, - progress = { --- The data and buttons in the build progress section - show_progress = true, -- false will hide this section altogether - allow_zoom_to_map = true, -- false will disable the zoom to map feature - allow_remote_launch = true, -- false removes the remote launch button for all players - remote_launch_admins_only = false, -- true will remove the remote launch button for all non (game) admins - remote_launch_role_permision = 'gui/rocket-info/remote_launch', -- value used by custom permission system to allow or disllow the button - allow_toggle_active = true, -- false removes the remote toggle auto launch button for all players - toggle_active_admins_only = false, -- true will remove the toggle auto launch button for all non (game) admins - toggle_active_role_permision = 'gui/rocket-info/toggle-active' -- value used by custom permission system to allow or disllow the button + progress = { --- @setting progress The data and buttons in the build progress section + show_progress = true, --- @setting show_progress false will hide this section altogether + allow_zoom_to_map = true, --- @setting allow_zoom_to_map false will disable the zoom to map feature + allow_remote_launch = true, --- @setting allow_remote_launch false removes the remote launch button for all players + remote_launch_admins_only = false, --- @setting remote_launch_admins_only true will remove the remote launch button for all non (game) admins + remote_launch_role_permission = 'gui/rocket-info/remote_launch', --- @setting remote_launch_role_permission value used by custom permission system to allow or disallow the button + allow_toggle_active = true, --- @setting allow_toggle_active false removes the remote toggle auto launch button for all players + toggle_active_admins_only = false, --- @setting toggle_active_admins_only true will remove the toggle auto launch button for all non (game) admins + toggle_active_role_permission = 'gui/rocket-info/toggle-active' --- @setting toggle_active_role_permission value used by custom permission system to allow or disallow the button } } \ No newline at end of file diff --git a/config/roles.lua b/config/roles.lua index a17c7966..d46d08fe 100644 --- a/config/roles.lua +++ b/config/roles.lua @@ -1,11 +1,13 @@ --- 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' +-- @config 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 --[[ - -- cant use a factory as it has upvalues ;-; + -- cant use a factory as it has up values ;-; local function playtime(time_required) return function(player) if player.online_time > time_required then diff --git a/config/science.lua b/config/science.lua index 3cd3ce5f..d9e77d5f 100644 --- a/config/science.lua +++ b/config/science.lua @@ -1,8 +1,10 @@ --- config file for the science info gui +--- Config file for the science info gui +-- @config Science + return { -- list of all science packs to be shown in the gui - show_eta=true, -- when true the eta for research completion will be shown - required_for_green=5, -- the amount required for the text to show as green - required_for_red=-5, -- the amount required for the text to show as red + show_eta=true, --- @setting show_eta when true the eta for research completion will be shown + color_clamp=5, --- @setting color_clamp the amount required for the text to show as green or red + color_flux=0.1, --- @setting color_flux the ammount of flucuation allowed in production before icon change 'automation-science-pack', 'logistic-science-pack', 'military-science-pack', diff --git a/config/scorched_earth.lua b/config/scorched_earth.lua index 1a46e20d..64ab9568 100644 --- a/config/scorched_earth.lua +++ b/config/scorched_earth.lua @@ -1,7 +1,9 @@ --- This file controls the placement/degrading of tiles as players build and walk +-- @config Scorched-Earth + return { - weakness_value=50, -- lower value will make tiles more likely to degrade - strengths={ -- this decides how "strong" a tile is, bigger number means less likely to degrade + weakness_value=50, --- @setting weakness_value lower value will make tiles more likely to degrade + strengths={ --- @setting strengths this decides how "strong" a tile is, bigger number means less likely to degrade -- debug: /interface require('modules.addons.worn-paths')(player.name,true) -- note: tiles are effected by the tiles around them, so player paths will not degrade as fast when made wider -- note: values are relative to the tile with the highest value, recommended to keep highest tile as a "nice" number @@ -42,7 +44,7 @@ return { --["water-shallow"]=90, --["water-mud"]=0, -- last tile, nothing to degrade to }, - degrade_order={ -- when a tile degrades it will turn into the next tile given here + degrade_order={ --- @setting degrade_order when a tile degrades it will turn into the next tile given here ["refined-concrete"]='concrete', ["refined-hazard-concrete-left"]='hazard-concrete-left', ["refined-hazard-concrete-right"]='hazard-concrete-right', @@ -79,7 +81,7 @@ return { --["water-shallow"]='water-mud', --["water-mud"]=0, -- last tile, nothing to degrade to }, - entities={ -- entities in this list will degrade the tiles under them when they are placed + entities={ --- @setting entities entities in this list will degrade the tiles under them when they are placed ['stone-furnace']=true, ['steel-furnace']=true, ['electric-furnace']=true, diff --git a/config/spawn_area.lua b/config/spawn_area.lua index 4d8f8eaf..889fc20e 100644 --- a/config/spawn_area.lua +++ b/config/spawn_area.lua @@ -1,33 +1,35 @@ --- Used to config the spawn generation settings yes there is alot here i know just ignore the long tables at the end (they were generated with a command) +-- @config Spawn-Area + return { - infinite_ammo_turrets = { -- These turrets will have they ammo refilled automatically and can not be looted - enabled=true, -- weather the turrets will be created and refilled - ammo_type='uranium-rounds-magazine', -- the ammo type that will be used - locations={ -- locations of all turrets, this is default it can be changed during runtime + infinite_ammo_turrets = { --- @setting infinite_ammo_turrets These turrets will have they ammo refilled automatically and can not be looted + enabled=true, --- @setting enabled weather the turrets will be created and refilled + ammo_type='uranium-rounds-magazine', --- @setting ammo_type the ammo type that will be used + locations={ --- @setting locations locations of all turrets, this is default it can be changed during runtime {surface=1,position={x=-3,y=-3}}, {surface=1,position={x=3 ,y=-3}}, {surface=1,position={x=-3,y=3 }}, {surface=1,position={x=3 ,y=3 }} } }, - afk_belts = { - enabled=true, -- weather afk belts will be generated - locations={ -- top left connors of any afk belt loops to be added + afk_belts = { --- @setting afk_belts setting relating to afk belts round the spawn point + enabled=true, --- @setting enabled weather afk belts will be generated + locations={ --- @setting locations top left connors of any afk belt loops to be added {x=-5,y=-5}, {x=5, y=-5}, {x=-5,y=5 }, {x=5, y=5 } } }, - corrections = { -- Some settings that have no where else to go - protect_entities=true, - offset = {x=0,y=-2}, -- a global offset value to correct the x and y values of the tables below - deconstruction_radius=20, -- when the spawn is made this area will have all entities removed first - deconstruction_tile='concrete', -- this is the tile that will spawn in the deconstruction radius - pattern_radius = 50, -- this is the radius of the pattern all water in this area will be filled - pattern_tile = 'stone-path' -- the tile that is used for the pattern + corrections = { --- @setting corrections Some settings that have no where else to go + protect_entities=true, --- @setting protect_entities if the spawn entites will be protected + offset = {x=0,y=-2}, --- @setting offset a global offset value to correct the x and y values of the tables below + deconstruction_radius=20, --- @setting deconstruction_radius when the spawn is made this area will have all entities removed first + deconstruction_tile='concrete', --- @setting deconstruction_tile this is the tile that will spawn in the deconstruction radius + pattern_radius = 50, --- @setting pattern_radius this is the radius of the pattern all water in this area will be filled + pattern_tile = 'stone-path' --- @setting pattern_tile the tile that is used for the pattern }, - entities = { -- All entities that will be created as part of spawn {entity-name,x-pos,y-pos} + entities = { --- @setting entities All entities that will be created as part of spawn {entity-name,x-pos,y-pos} {"stone-wall",-10,-6},{"stone-wall",-10,-5},{"stone-wall",-10,-4},{"stone-wall",-10,-3},{"stone-wall",-10,-2},{"stone-wall",-10,-1},{"stone-wall",-10,0},{"stone-wall",-10,3},{"stone-wall",-10,4},{"stone-wall",-10,5}, {"stone-wall",-10,6},{"stone-wall",-10,7},{"stone-wall",-10,8},{"stone-wall",-10,9},{"stone-wall",-8,-8},{"small-lamp",-8,-4},{"small-lamp",-8,-1},{"iron-chest",-8,0},{"iron-chest",-8,3},{"small-lamp",-8,4}, {"small-lamp",-8,7},{"stone-wall",-8,11},{"stone-wall",-7,-8},{"small-electric-pole",-7,-2},{"iron-chest",-7,0},{"iron-chest",-7,3},{"small-electric-pole",-7,5},{"stone-wall",-7,11},{"stone-wall",-6,-8},{"small-lamp",-6,-6}, @@ -43,7 +45,7 @@ return { {"stone-wall",9,-4},{"stone-wall",9,-3},{"stone-wall",9,-2},{"stone-wall",9,-1},{"stone-wall",9,0},{"stone-wall",9,3},{"stone-wall",9,4},{"stone-wall",9,5},{"stone-wall",9,6},{"stone-wall",9,7}, {"stone-wall",9,8},{"stone-wall",9,9} }, - tiles = { -- The location of the "pattern" tiles {x-pos,y-pos} + tiles = { --- @setting tiles The location of the "pattern" tiles {x-pos,y-pos} {-49,-3},{-49,-2},{-49,1},{-49,2},{-49,5},{-49,6},{-48,-4},{-48,-3},{-48,-2},{-48,1},{-48,2},{-48,5},{-48,6},{-48,7},{-47,-7},{-47,-6},{-47,-5},{-47,-4},{-47,-3},{-47,-2},{-47,5},{-47,6},{-47,7},{-47,8},{-47,9},{-47,10},{-46,-8},{-46,-7},{-46,-6},{-46,-5}, {-46,-4},{-46,-3},{-46,-2},{-46,-1},{-46,4},{-46,5},{-46,6},{-46,7},{-46,8},{-46,9},{-46,10},{-46,11},{-45,-17},{-45,-16},{-45,-15},{-45,-14},{-45,-13},{-45,-12},{-45,-9},{-45,-8},{-45,-7},{-45,-2},{-45,-1},{-45,0},{-45,1},{-45,2},{-45,3},{-45,4},{-45,5},{-45,10}, {-45,11},{-45,12},{-45,15},{-45,16},{-45,17},{-45,18},{-45,19},{-45,20},{-44,-18},{-44,-17},{-44,-16},{-44,-15},{-44,-14},{-44,-13},{-44,-12},{-44,-9},{-44,-8},{-44,-1},{-44,0},{-44,1},{-44,2},{-44,3},{-44,4},{-44,11},{-44,12},{-44,15},{-44,16},{-44,17},{-44,18},{-44,19}, diff --git a/config/tasks.lua b/config/tasks.lua index cc80d192..95165ee0 100644 --- a/config/tasks.lua +++ b/config/tasks.lua @@ -1,7 +1,9 @@ --- config file for the tasks gui +--- Config file for the tasks gui +-- @config Tasks + return { - any_user_can_add_new_task = true, -- when false only people with edit permission can make new reports - user_can_edit_own_tasks = true, -- when false only people with edit permission can edit reports - only_admins_can_edit = false, -- true will hide the edit and delete buttons from non (game) admins - edit_tasks_role_permision = 'gui/task-list/edit' -- value used with custom permision system + any_user_can_add_new_task = true, --- @setting any_user_can_add_new_task when false only people with edit permission can make new reports + user_can_edit_own_tasks = true, --- @setting user_can_edit_own_tasks when false only people with edit permission can edit reports + only_admins_can_edit = false, --- @setting only_admins_can_edit true will hide the edit and delete buttons from non (game) admins + edit_tasks_role_permission = 'gui/task-list/edit' --- @setting edit_tasks_role_permission value used with custom permission system } \ No newline at end of file diff --git a/config/warnings.lua b/config/warnings.lua index 7fd627a4..24f85867 100644 --- a/config/warnings.lua +++ b/config/warnings.lua @@ -1,6 +1,8 @@ --- Config file for the warning system, this is very similar to reports but is for the use of moderators rather than normal users. +-- @config Warnings + return { - actions = { -- what actions are taking at number of warnings + actions = { --- @setting actions what actions are taking at number of warnings -- if a localized string is used then __1__ will by_player_name and __2__ will be the current warning count (auto inserted) {'warnings.received',''}, {'warnings.received',''}, @@ -14,6 +16,6 @@ return { game.ban_player(player,{'warnings.received',by_player_name,number_of_warnings,{'warnings.ban',{'links.website'}}}) end }, - temp_warning_cool_down=30, -- time for a temp warning (given by script) to be removed (in minutes) - temp_warning_limit=5 -- the number of temp warnings (given by script) that are allowed before full warnings are given + script_warning_cool_down=30, --- @setting script_warning_cool_down time for a script warning (given by script) to be removed (in minutes) + script_warning_limit=5 --- @setting script_warning_limit the number of script warnings (given by script) that are allowed before full warnings are given } \ No newline at end of file diff --git a/config/warps.lua b/config/warps.lua index bd7fb4c8..fb620108 100644 --- a/config/warps.lua +++ b/config/warps.lua @@ -1,23 +1,25 @@ --- This file contains all the different settings for the warp system and gui +-- @config Warps + return { - recharge_time = 60, -- The amount of time in seconds that the player must wait between warps, acts as a balance - update_smothing = 10, -- Higher is better, the amount of smothing applied to recharge timer and other gui updates, max is 60 - minimum_distance = 100, -- The minimum distance that must be between warp points, creating new ones is blocked when too close - activation_range = 4, -- The distance the player must be to a warp in order to use the warp gui, gui can still be viewd but not used - spawn_activation_range = 20, -- A second activation range which is used for the forces spawn point - default_icon = 'discharge-defense-equipment', -- The deafult icon which is used by warps; must be an item name - user_can_edit_own_warps = false, -- When true the user can always edit warps which they created regaudless of other settings - any_user_can_add_new_warp = false, -- When true any user is able to create new warps, however editing may still be restricted - only_admins_can_edit = false, -- When true only admins can edit warps - edit_warps_role_permision = 'gui/warp-list/edit', -- Role permission used by the role system to allow editing warps - bypass_warp_limits_permision = 'gui/warp-list/no-limit', -- Role permission used by the role system to allow bypassing the time and distance restrctions - entities = { -- The entites which are created for warps + recharge_time = 60, --- @setting recharge_time The amount of time in seconds that the player must wait between warps, acts as a balance + update_smoothing = 10, --- @setting update_smoothing Higher is better, the amount of smoothing applied to recharge timer and other gui updates, max is 60 + minimum_distance = 100, --- @setting minimum_distance The minimum distance that must be between warp points, creating new ones is blocked when too close + activation_range = 4, --- @setting activation_range The distance the player must be to a warp in order to use the warp gui, gui can still be viewed but not used + spawn_activation_range = 20, --- @setting spawn_activation_range A second activation range which is used for the forces spawn point + default_icon = 'discharge-defense-equipment', --- @setting default_icon The default icon which is used by warps; must be an item name + user_can_edit_own_warps = false, --- @setting user_can_edit_own_warps When true the user can always edit warps which they created regardless of other settings + any_user_can_add_new_warp = false, --- @setting any_user_can_add_new_warp When true any user is able to create new warps, however editing may still be restricted + only_admins_can_edit = false, --- @setting only_admins_can_edit When true only admins can edit warps + edit_warps_role_permission = 'gui/warp-list/edit', --- @setting edit_warps_role_permission Role permission used by the role system to allow editing warps + bypass_warp_limits_permission = 'gui/warp-list/no-limit', --- @setting bypass_warp_limits_permission Role permission used by the role system to allow bypassing the time and distance restrictions + entities = { --- @setting entities The entities which are created for warps {'small-lamp',-3,-2},{'small-lamp',-3,2},{'small-lamp',3,-2},{'small-lamp',3,2}, {'small-lamp',-2,-3},{'small-lamp',2,-3},{'small-lamp',-2,3},{'small-lamp',2,3}, {'small-electric-pole',-3,-3},{'small-electric-pole',3,3},{'small-electric-pole',-3,3},{'small-electric-pole',3,-3} }, - base_tile = 'tutorial-grid', -- The tile which is used for the warps - tiles = { -- The tiles which are created for warps + base_tile = 'tutorial-grid', --- @setting base_tile The tile which is used for the warps + tiles = { --- @setting tiles The tiles which are created for warps {-3,-2},{-3,-1},{-3,0},{-3,1},{-3,2},{3,-2},{3,-1},{3,0},{3,1},{3,2}, {-2,-3},{-1,-3},{0,-3},{1,-3},{2,-3},{-2,3},{-1,3},{0,3},{1,3},{2,3} } diff --git a/control.lua b/control.lua index 29d79064..82237d76 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').ext_require --- @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) @@ -50,6 +50,10 @@ for index,path in pairs(files) do end +-- Override the default require; require can no longer load new scripts +log('[INFO] Require Overright! No more requires can be made!') +require 'utils.require_override' + -- Logs all errors again to make it make it easy to find log('[INFO] All files loaded with '..#errors..' errors:') for _,error in pairs(errors) do log(error) end diff --git a/doc/addons/Advanced-Start.html b/doc/addons/Advanced-Start.html new file mode 100644 index 00000000..0b56fc11 --- /dev/null +++ b/doc/addons/Advanced-Start.html @@ -0,0 +1,356 @@ + + + + + + + + Advanced-Start addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Advanced-Start addon

+

Adds a better method of player starting items based on production levels.

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
utils.event
utils.game
config.advanced_start
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.advanced_start +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Chat-Popups.html b/doc/addons/Chat-Popups.html new file mode 100644 index 00000000..75114dcc --- /dev/null +++ b/doc/addons/Chat-Popups.html @@ -0,0 +1,357 @@ + + + + + + + + Chat-Popups addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Chat-Popups addon

+

Creates flying text entities when a player sends a message in chat; + also displays a ping above users who are named in the message

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
utils.game
utils.event
config.popup_messages
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.popup_messages +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Chat-Reply.html b/doc/addons/Chat-Reply.html new file mode 100644 index 00000000..be18394a --- /dev/null +++ b/doc/addons/Chat-Reply.html @@ -0,0 +1,384 @@ + + + + + + + + Chat-Reply addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Chat-Reply addon

+

Adds auto replies to chat messages; aswell as chat commands

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
utils.event
utils.game
expcore.roles
config.chat_reply
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.chat_reply +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Compilatron.html b/doc/addons/Compilatron.html new file mode 100644 index 00000000..3ad91922 --- /dev/null +++ b/doc/addons/Compilatron.html @@ -0,0 +1,593 @@ + + + + + + + + Compilatron addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Compilatron addon

+

Adds a compilatron that walks around the spawn area; adapted from redmew code

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + +
utils.event
utils.global
utils.game
utils.task
utils.token
config.compilatron
+ + +

Functions

+ + + + + + + + + + + + +
Public.add_compilatron(entity, name)This will add a compilatron to the global and start his message cycle
Public.spawn_compilatron(surface, location)This spawns a new compilatron on a surface with the given location tag (not a position)
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.task +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.token +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.compilatron +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Public.add_compilatron(entity, name) +
+
+
+
+ +

This will add a compilatron to the global and start his message cycle

+

+ + + Parameters: + +
    + + + + + +
  • + + entity + + : + + (LuaEntity) + + the compilatron entity that moves around + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the location that the complitron is at + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Public.spawn_compilatron(surface, location) +
+
+
+
+ +

This spawns a new compilatron on a surface with the given location tag (not a position)

+

+ + + Parameters: + +
    + + + + + +
  • + + surface + + : + + (LuaSurface) + + the surface to spawn the compilatron on + +
  • + + + + + +
  • + + location + + : + + (string) + + the location tag that is in the config file + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Damage-Popups.html b/doc/addons/Damage-Popups.html new file mode 100644 index 00000000..42cd4094 --- /dev/null +++ b/doc/addons/Damage-Popups.html @@ -0,0 +1,357 @@ + + + + + + + + Damage-Popups addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Damage-Popups addon

+

Displays the amount of dmg that is done by players to entities; + also shows player health when a player is attacked

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
utils.game
utils.event
config.popup_messages
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.popup_messages +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Death-Logger.html b/doc/addons/Death-Logger.html new file mode 100644 index 00000000..01b1f797 --- /dev/null +++ b/doc/addons/Death-Logger.html @@ -0,0 +1,412 @@ + + + + + + + + Death-Logger addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Death-Logger addon

+

Makes markers on the map where places have died and reclaims items if not recovered

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + +
utils.event
utils.game
utils.global
config.death_logger
expcore.common
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.death_logger +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Discord-Alerts.html b/doc/addons/Discord-Alerts.html new file mode 100644 index 00000000..cce518e8 --- /dev/null +++ b/doc/addons/Discord-Alerts.html @@ -0,0 +1,468 @@ + + + + + + + + Discord-Alerts addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Discord-Alerts addon

+

Sends alert messages to our discord server when certain events are triggered

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + +
utils.event
utils.game
resources.color_presets
expcore.common
config.discord_alerts
modules.control.reports
modules.control.warnings
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.discord_alerts +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.reports +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.warnings +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Player-Colours.html b/doc/addons/Player-Colours.html new file mode 100644 index 00000000..d17bb676 --- /dev/null +++ b/doc/addons/Player-Colours.html @@ -0,0 +1,412 @@ + + + + + + + + Player-Colours addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Player-Colours addon

+

Gives players random colours when they join, also applies preset colours to those who have them

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + +
resources.color_presets
utils.game
utils.event
config.preset_player_colours
utils.global
+ + +
+ + +

Dependencies

+
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.preset_player_colours +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Pollution-Grading.html b/doc/addons/Pollution-Grading.html new file mode 100644 index 00000000..bfc08f0d --- /dev/null +++ b/doc/addons/Pollution-Grading.html @@ -0,0 +1,328 @@ + + + + + + + + Pollution-Grading addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Pollution-Grading addon

+

Makes polution look much nice of the map, ie not one big red mess

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
utils.event
config.pollution_grading
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.pollution_grading +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Scorched-Earth.html b/doc/addons/Scorched-Earth.html new file mode 100644 index 00000000..09d37fe9 --- /dev/null +++ b/doc/addons/Scorched-Earth.html @@ -0,0 +1,412 @@ + + + + + + + + Scorched-Earth addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Scorched-Earth addon

+

When a player walks around the tiles under them will degrade over time, the same is true when entites are built

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + +
utils.event
utils.game
utils.global
expcore.common
config.scorched_earth
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.scorched_earth +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/addons/Spawn-Area.html b/doc/addons/Spawn-Area.html new file mode 100644 index 00000000..3ba5ee0d --- /dev/null +++ b/doc/addons/Spawn-Area.html @@ -0,0 +1,384 @@ + + + + + + + + Spawn-Area addon + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Spawn-Area addon

+

Adds a custom spawn area with chests and afk turrets

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
utils.global
utils.event
utils.game
config.spawn_area
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.spawn_area +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Admin-Chat.html b/doc/commands/Admin-Chat.html new file mode 100644 index 00000000..e8b3303d --- /dev/null +++ b/doc/commands/Admin-Chat.html @@ -0,0 +1,396 @@ + + + + + + + + Admin-Chat commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Admin-Chat commands

+

Commands Module - Admin Chat + - Adds a command that allows admins to talk in a private chat

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.common
+ + +

Commands

+ + + + + + + + +
admin-chatSends a message in chat that only admins can see
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + admin-chat +
+
+
+
+ +

Sends a message in chat that only admins can see

+

+ + + Command Parameters: + +
    + + + + + +
  • + + message + + : + + (string) + + the message to send in the admin chat + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Bonus.html b/doc/commands/Bonus.html new file mode 100644 index 00000000..4b41076e --- /dev/null +++ b/doc/commands/Bonus.html @@ -0,0 +1,508 @@ + + + + + + + + Bonus commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Bonus commands

+

Commands Module - Bonus + - Adds a command that allows players to have increased stats

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + +
expcore.commands
expcore.roles
utils.event
utils.game
expcore.store
config.bonuses
+ + +

Commands

+ + + + + + + + +
bonusChanges the amount of bonus you receive
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.bonuses +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + bonus +
+
+
+
+ +

Changes the amount of bonus you receive

+

+ + + Command Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + range 0-50 the percent increase for your bonus + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Cheat-Mode.html b/doc/commands/Cheat-Mode.html new file mode 100644 index 00000000..cb0d0a09 --- /dev/null +++ b/doc/commands/Cheat-Mode.html @@ -0,0 +1,369 @@ + + + + + + + + Cheat-Mode commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Cheat-Mode commands

+

Commands Module - Cheat Mode + - Adds a command that allows players to enter cheat mode

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.commands
+ + +

Commands

+ + + + + + + + +
toggle-cheat-modeToggles cheat mode for your player, or another player.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + toggle-cheat-mode +
+
+
+
+ +

Toggles cheat mode for your player, or another player.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + player to toggle chest mode of, can be nil for self + + (default: self) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Clear-Inventory.html b/doc/commands/Clear-Inventory.html new file mode 100644 index 00000000..27f45940 --- /dev/null +++ b/doc/commands/Clear-Inventory.html @@ -0,0 +1,396 @@ + + + + + + + + Clear-Inventory commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Clear-Inventory commands

+

Commands Module - Clear Inventory + - Adds a command that allows admins to clear people's inventorys

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.common
+ + +

Commands

+ + + + + + + + +
clear-inventoryClears a players inventory
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + clear-inventory +
+
+
+
+ +

Clears a players inventory

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the inventory of + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Debug.html b/doc/commands/Debug.html new file mode 100644 index 00000000..e2f78d24 --- /dev/null +++ b/doc/commands/Debug.html @@ -0,0 +1,373 @@ + + + + + + + + Debug commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Debug commands

+

Commands Module - Debug + - Adds a command that opens the debug frame

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
modules.gui.debug.main_view
expcore.commands
+ + +

Commands

+ + + + + + + + +
debugOpens the debug pannel for viewing tables.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + modules.gui.debug.main_view +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + debug +
+
+
+
+ +

Opens the debug pannel for viewing tables.

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Find.html b/doc/commands/Find.html new file mode 100644 index 00000000..c727cd0e --- /dev/null +++ b/doc/commands/Find.html @@ -0,0 +1,368 @@ + + + + + + + + Find commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Find commands

+

Commands Module - Find + - Adds a command that zooms in on the given player

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.commands
+ + +

Commands

+ + + + + + + + +
find-on-mapFind a player on your map.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + find-on-map +
+
+
+
+ +

Find a player on your map.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + the + + : + + (LuaPlayer) + + player to find on the map + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Help.html b/doc/commands/Help.html new file mode 100644 index 00000000..d5178346 --- /dev/null +++ b/doc/commands/Help.html @@ -0,0 +1,412 @@ + + + + + + + + Help commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Help commands

+

Commands Module - Help + - Adds a better help command that allows searching of descriotions and names

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
utils.global
+ + +

Commands

+ + + + + + + + +
chelpSearches for a keyword in all commands you are allowed to use.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + chelp +
+
+
+
+ +

Searches for a keyword in all commands you are allowed to use.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + keyword + + : + + (string) + + the keyword that will be looked for + +
  • + + + + + +
  • + + page + + : + + (number) + + the page of help to view, must be in range of pages + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Home.html b/doc/commands/Home.html new file mode 100644 index 00000000..a1ba8bce --- /dev/null +++ b/doc/commands/Home.html @@ -0,0 +1,466 @@ + + + + + + + + Home commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Home commands

+

Commands Module - Home + - Adds a command that allows setting and teleporting to your home position

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
utils.global
+ + +

Commands

+ + + + + + + + + + + + + + + + + + + + +
homeTeleports you to your home location
home-setSets your home location to your current position
home-getReturns your current home location
returnTeleports you to previous location
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + home +
+
+
+
+ +

Teleports you to your home location

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + home-set +
+
+
+
+ +

Sets your home location to your current position

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + home-get +
+
+
+
+ +

Returns your current home location

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + return +
+
+
+
+ +

Teleports you to previous location

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Interface.html b/doc/commands/Interface.html new file mode 100644 index 00000000..c38850c0 --- /dev/null +++ b/doc/commands/Interface.html @@ -0,0 +1,424 @@ + + + + + + + + Interface commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Interface commands

+

Commands Module - Interface + - Adds a command that acts as a direct link to the the active softmod, for debug use

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.commands
utils.global
expcore.common
+ + +

Commands

+ + + + + + + + +
interfaceSends an innovation to be ran and returns the result.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + interface +
+
+
+
+ +

Sends an innovation to be ran and returns the result.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + innovation + + : + + (string) + + the command that will be run + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Jail.html b/doc/commands/Jail.html new file mode 100644 index 00000000..2f087f4c --- /dev/null +++ b/doc/commands/Jail.html @@ -0,0 +1,619 @@ + + + + + + + + Jail commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Jail commands

+

Commands Module - Jail + - Adds a commands that allow admins to jail, unjail, and temp ban players

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.commands
modules.control.jail
expcore.common
+ + +

Commands

+ + + + + + + + + + + + + + + + + + + + +
jailPuts a player into jail and removes all other roles.
unjailRemoves a player from jail.
temp-banTemp bans a player until the next reset; this requires a reason; this will clear the players inventory.
clear-temp-banRemoves temp ban from a player; this will not restore their items.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.jail +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + jail +
+
+
+
+ +

Puts a player into jail and removes all other roles.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be jailed + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason why the player is being jailed + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + unjail +
+
+
+
+ +

Removes a player from jail.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + the + + : + + (LuaPlayer) + + player that will be unjailed + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + temp-ban +
+
+
+
+ +

Temp bans a player until the next reset; this requires a reason; this will clear the players inventory.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be temp banned + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being temp banned + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + clear-temp-ban +
+
+
+
+ +

Removes temp ban from a player; this will not restore their items.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to revoke the temp ban from + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Kill.html b/doc/commands/Kill.html new file mode 100644 index 00000000..33cd787e --- /dev/null +++ b/doc/commands/Kill.html @@ -0,0 +1,397 @@ + + + + + + + + Kill commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Kill commands

+

Commands Module - Kill + - Adds a command that allows players to kill them selfs and others

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.roles
+ + +

Commands

+ + + + + + + + +
killKills yourself or another player.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + kill +
+
+
+
+ +

Kills yourself or another player.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to kill, must be alive to be valid + + (default: self) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Me.html b/doc/commands/Me.html new file mode 100644 index 00000000..ee42acca --- /dev/null +++ b/doc/commands/Me.html @@ -0,0 +1,368 @@ + + + + + + + + Me commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Me commands

+

Commands Module - Me + - Adds a command that adds * around your message in the chat

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.commands
+ + +

Commands

+ + + + + + + + +
meSends an action message in the chat
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + me +
+
+
+
+ +

Sends an action message in the chat

+

+ + + Command Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + the action that follows your name in chat + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Rainbow.html b/doc/commands/Rainbow.html new file mode 100644 index 00000000..b7f2a851 --- /dev/null +++ b/doc/commands/Rainbow.html @@ -0,0 +1,396 @@ + + + + + + + + Rainbow commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Rainbow commands

+

Commands Module - Rainbow + - Adds a command that prints your message in rainbow font

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.common
+ + +

Commands

+ + + + + + + + +
rainbowSends an rainbow message in the chat
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + rainbow +
+
+
+
+ +

Sends an rainbow message in the chat

+

+ + + Command Parameters: + +
    + + + + + +
  • + + message + + : + + (string) + + the message that will be printed in chat + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Repair.html b/doc/commands/Repair.html new file mode 100644 index 00000000..19e506ca --- /dev/null +++ b/doc/commands/Repair.html @@ -0,0 +1,329 @@ + + + + + + + + Repair commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Repair commands

+

Commands Module - Repair + - Adds a command that allows an admin to repair and revive a large area

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
config.repair
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.repair +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Reports.html b/doc/commands/Reports.html new file mode 100644 index 00000000..c0f17772 --- /dev/null +++ b/doc/commands/Reports.html @@ -0,0 +1,593 @@ + + + + + + + + Reports commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Reports commands

+

Commands Module - Reports + - Adds a commands that allow players to report other players

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.roles
expcore.commands
modules.control.reports
expcore.common
+ + +

Commands

+ + + + + + + + + + + + + + + + +
reportReports a player and notifies moderators
get-reportsGets a list of all reports that a player has on them.
clear-reportsClears all reports from a player or just the report from one player.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.reports +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + report +
+
+
+
+ +

Reports a player and notifies moderators

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to report, some players are immune + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason the player is being reported + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + get-reports +
+
+
+
+ +

Gets a list of all reports that a player has on them.

+

If no player then lists all players and the number of reports on them.

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + clear-reports +
+
+
+
+ +

Clears all reports from a player or just the report from one player.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the report(s) from + +
  • + + + + + +
  • + + from + + : + + (LuaPlayer) + + -player remove only the report made by this player + + (default: all) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Roles.html b/doc/commands/Roles.html new file mode 100644 index 00000000..d9a1f285 --- /dev/null +++ b/doc/commands/Roles.html @@ -0,0 +1,565 @@ + + + + + + + + Roles commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Roles commands

+

Commands Module - Roles + - Adds a commands that allow interaction with the role system

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.commands
expcore.roles
resources.color_presets
+ + +

Commands

+ + + + + + + + + + + + + + + + +
assign-roleAssigns a role to a player
unassign-roleUnassigns a role from a player
list-rolesLists all roles in they correct order
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + assign-role +
+
+
+
+ +

Assigns a role to a player

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to assign the role to + +
  • + + + + + +
  • + + role + + : + + (string) + + the name of the role to assign to the player, supports auto complete after enter + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + unassign-role +
+
+
+
+ +

Unassigns a role from a player

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to unassign the role from + +
  • + + + + + +
  • + + role + + : + + (string) + + the name of the role to unassign from the player, supports auto complete after enter + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + list-roles +
+
+
+
+ +

Lists all roles in they correct order

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + list only the roles which this player has + + (default: all) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Spawn.html b/doc/commands/Spawn.html new file mode 100644 index 00000000..bb58d8a9 --- /dev/null +++ b/doc/commands/Spawn.html @@ -0,0 +1,397 @@ + + + + + + + + Spawn commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Spawn commands

+

Commands Module - Spawn + - Adds a command that allows players to teleport to their spawn point

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.roles
+ + +

Commands

+ + + + + + + + +
go-to-spawnTeleport to spawn
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + go-to-spawn +
+
+
+
+ +

Teleport to spawn

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to teleport to their spawn point + + (default: self) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Tag.html b/doc/commands/Tag.html new file mode 100644 index 00000000..43fab495 --- /dev/null +++ b/doc/commands/Tag.html @@ -0,0 +1,451 @@ + + + + + + + + Tag commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Tag commands

+

Commands Module - Tag + - Adds a command that allows players to have a custom tag after their name

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.roles
+ + +

Commands

+ + + + + + + + + + + + +
tagSets your player tag.
tag-clearClears your tag.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + tag +
+
+
+
+ +

Sets your player tag.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + tag + + : + + (string) + + the tag that will be after the name, there is a max length + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + tag-clear +
+
+
+
+ +

Clears your tag.

+

Or another player if you are admin.

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove the tag from, nil will apply to self + + (default: self) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Teleport.html b/doc/commands/Teleport.html new file mode 100644 index 00000000..42089cc1 --- /dev/null +++ b/doc/commands/Teleport.html @@ -0,0 +1,492 @@ + + + + + + + + Teleport commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Teleport commands

+

Commands Module - Teleport + - Adds a command that allows players to teleport to other players

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.commands
+ + +

Commands

+ + + + + + + + + + + + + + + + +
teleportTeleports a player to another player.
bringTeleports a player to you.
gotoTeleports you to a player.
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + teleport +
+
+
+
+ +

Teleports a player to another player.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + from_player + + : + + (LuaPlayer) + + the player that will be teleported, must be alive + +
  • + + + + + +
  • + + to_player + + : + + (LuaPlayer) + + the player to teleport to, must be online (if dead goes to where they died) + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + bring +
+
+
+
+ +

Teleports a player to you.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be teleported, must be alive + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + goto +
+
+
+
+ +

Teleports you to a player.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to teleport to, must be online (if dead goes to where they died) + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/commands/Warnings.html b/doc/commands/Warnings.html new file mode 100644 index 00000000..0bb7d855 --- /dev/null +++ b/doc/commands/Warnings.html @@ -0,0 +1,577 @@ + + + + + + + + Warnings commands + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warnings commands

+

Commands Module - Warnings + - Adds a commands that allow admins to warn other players

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.commands
modules.control.warnings
expcore.common
config.warnings
+ + +

Commands

+ + + + + + + + + + + + + + + + +
give-warningGives a warning to a player; may lead to automatic script action.
get-warningsGets the number of warnings a player has.
clear-warningsClears all warnings (and script warnings) from a player
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.warnings +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.warnings +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + give-warning +
+
+
+
+ +

Gives a warning to a player; may lead to automatic script action.

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player the will recive a warning + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason the player is being given a warning + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + get-warnings +
+
+
+
+ +

Gets the number of warnings a player has.

+

If no player then lists all players and the number of warnings they have.

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the warning for, if nil all players are listed + + (default: list) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + clear-warnings +
+
+
+
+ +

Clears all warnings (and script warnings) from a player

+

+ + + Command Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the warnings from + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/config.ld b/doc/config.ld new file mode 100644 index 00000000..f5a7a308 --- /dev/null +++ b/doc/config.ld @@ -0,0 +1,101 @@ +file = '../' +dir = '../doc' +project = 'ExpGaming Scenario' +title = 'ExpGaming Scenario' +description = 'Explosive Gaming\'s server scenario for 0.17' + +convert_opt = true +sort = false +not_luadoc = true +no_lua_ref = true +template_escape = ">" +topics = {"../README.md", "../LICENSE"} +style = '../doc' +template = '../doc' +no_space_before_args = true +merge=true + +new_type("core", "Core", true) +new_type("addon", "Addons", true) +new_type("commands", "Commands", true) +new_type("control", "Control", true) +new_type("gui", "Guis", true) +new_type("config", "Configs", true, "Settings") + +new_type("dep", "Dependencies", false) +new_type("element", "Elements", false) +new_type("setting", "Settings", false) +new_type("event", "Events", false, "Event Parameters") +new_type("command", "Commands", false, "Command Parameters") + +local api_url = "http://lua-api.factorio.com/latest/%s.html%s" + +custom_see_handler("^Lua([%w_]*)%.?([%.?[%w_]*]*)$", + function(name, section) + local link_txt = "Lua" .. name .. (#section > 0 and "." .. section or "") + local link_url = api_url:format("Lua" .. name, #section > 0 and "#" .. link_txt or "") + return link_txt, link_url + end +) + +custom_see_handler("^Concepts%.([%.?[%w_]*]*)$", + function(section) + local link_txt = "Concepts." .. section + local link_url = api_url:format("Concepts", #section > 0 and "#" .. section or "") + return link_txt, link_url + end +) + +custom_see_handler("^defines%.?([%.?[%w_]*]*)$", + function(section) + local link_txt = "defines." .. section + local link_url + if section == "color" or section == "time" then + link_url = "../modules/"..link_txt..".html" + else + link_url = api_url:format("defines", #section > 0 and "#" .. link_txt or "") + end + return link_txt, link_url + end +) + +custom_see_handler("^Common%.([%.?[%w_]*]*)$", + function(section) + local link_txt = "Common." .. section + local link_url = api_url:format("Common", #section > 0 and "#" .. link_txt or "") + return link_txt, link_url + end +) + +local wikipat = "https://en.wikipedia.org/wiki/%s" +custom_see_handler("^wiki (.+)", + function(name) + local url = wikipat:format(name) + return name, url + end +) + +-- https://forums.factorio.com/viewtopic.php?t=32039#p202158 +custom_see_handler("^(http[s]?%:%/%/.-) (.+)$", + function(url, name) + return name, url + end +) + +local lua_url = "https://www.lua.org/pil/%s.html%s" + +custom_see_handler("^boolean$", function() return "boolean", api_url:format("Builtin-Types", "#boolean") end) +custom_see_handler("^int$", function() return "int", api_url:format("Builtin-Types", "#int") end) +custom_see_handler("^uint$", function() return "uint", api_url:format("Builtin-Types", "#uint") end) +custom_see_handler("^uint8$", function() return "uint8", api_url:format("Builtin-Types", "#uint8") end) +custom_see_handler("^uint64$", function() return "uint64", api_url:format("Builtin-Types", "#uint64") end) +custom_see_handler("^string$", function() return "string", api_url:format("Builtin-Types", "#string") end) +custom_see_handler("^float$", function() return "float", api_url:format("Builtin-Types", "#float") end) +custom_see_handler("^double$", function() return "double", api_url:format("Builtin-Types", "#double") end) +custom_see_handler("^nil$", function() return "nil", lua_url:format("2.1", "") end) +custom_see_handler("^number$", function() return "number", lua_url:format("2.3", "") end) +custom_see_handler("^table$", function() return "table", lua_url:format("2.5", "") end) +custom_see_handler("^function$", function() return "function", lua_url:format("2.6", "") end) +custom_see_handler("^userdata$", function() return "userdata", lua_url:format("2.7", "") end) +custom_see_handler("^thread$", function() return "thread", lua_url:format("9", "#CoroutineSec") end) +custom_see_handler("^array$", function() return "array", lua_url:format("11.1", "") end) \ No newline at end of file diff --git a/doc/configs/Advanced-Start.html b/doc/configs/Advanced-Start.html new file mode 100644 index 00000000..46ef69a1 --- /dev/null +++ b/doc/configs/Advanced-Start.html @@ -0,0 +1,514 @@ + + + + + + + + Advanced-Start config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Advanced-Start config

+

This file is used to setup the map starting settings and the items players will start with

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
skip_intro
skip_victory
disable_base_game_silo_script
research_queue_from_start
friendly_fire
enemy_expansion
chart_radius
items
+ + +
+ + +

Settings

+
+
+
+
+ # + skip_intro +
+
+
+
+ +

+

skips the intro given in the default factorio free play scenario

+ + + + + + + + + + + + + + +
+
+
+
+ # + skip_victory +
+
+
+
+ +

+

will skip the victory screen when a rocket is launched

+ + + + + + + + + + + + + + +
+
+
+
+ # + disable_base_game_silo_script +
+
+
+
+ +

+

will not load the silo script at all

+ + + + + + + + + + + + + + +
+
+
+
+ # + research_queue_from_start +
+
+
+
+ +

+

when true the research queue is useible from the start

+ + + + + + + + + + + + + + +
+
+
+
+ # + friendly_fire +
+
+
+
+ +

+

weather players will be able to attack each other on the same force

+ + + + + + + + + + + + + + +
+
+
+
+ # + enemy_expansion +
+
+
+
+ +

+

a catch all for in case the map settings file fails to load

+ + + + + + + + + + + + + + +
+
+
+
+ # + chart_radius +
+
+
+
+ +

+

the number of tiles that will be charted when the map starts

+ + + + + + + + + + + + + + +
+
+
+
+ # + items +
+
+
+
+ +

+

items and there condition for being given + ['item-name'] = function(amount_made,production_stats,player) return end -- 0 means no items given + Plates

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Bonuses.html b/doc/configs/Bonuses.html new file mode 100644 index 00000000..e1806bce --- /dev/null +++ b/doc/configs/Bonuses.html @@ -0,0 +1,245 @@ + + + + + + + + Bonuses config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Bonuses config

+

Lists all bonuses which can be used, name followed by min max

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/configs/Chat-Reply.html b/doc/configs/Chat-Reply.html new file mode 100644 index 00000000..c8ef6dfa --- /dev/null +++ b/doc/configs/Chat-Reply.html @@ -0,0 +1,493 @@ + + + + + + + + Chat-Reply config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Chat-Reply config

+

This file defines the different triggers for the chat bot

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.common
+ + +

Settings

+ + + + + + + + + + + + + + + + + + + + + + +
allow_command_prefix_for_messages
messages
command_admin_only
command_permission
command_prefix
commands
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Settings

+
+
+
+
+ # + allow_command_prefix_for_messages +
+
+
+
+ +

+

when true any message trigger will print to all player when prefixed

+ + + + + + + + + + + + + + +
+
+
+
+ # + messages +
+
+
+
+ +

+

will trigger when ever the word is said

+ + + + + + + + + + + + + + +
+
+
+
+ # + command_admin_only +
+
+
+
+ +

+

when true will only allow chat commands for admins

+ + + + + + + + + + + + + + +
+
+
+
+ # + command_permission +
+
+
+
+ +

+

the permission used to allow command prefixes

+ + + + + + + + + + + + + + +
+
+
+
+ # + command_prefix +
+
+
+
+ +

+

prefix used for commands below and to print to all players (if enabled above)

+ + + + + + + + + + + + + + +
+
+
+
+ # + commands +
+
+
+
+ +

+

will trigger only when command prefix is given

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands-Auth-Admin.html b/doc/configs/Commands-Auth-Admin.html new file mode 100644 index 00000000..ffc290aa --- /dev/null +++ b/doc/configs/Commands-Auth-Admin.html @@ -0,0 +1,302 @@ + + + + + + + + Commands-Auth-Admin config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands-Auth-Admin config

+

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

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.commands
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands-Auth-Roles.html b/doc/configs/Commands-Auth-Roles.html new file mode 100644 index 00000000..1f3c18d9 --- /dev/null +++ b/doc/configs/Commands-Auth-Roles.html @@ -0,0 +1,328 @@ + + + + + + + + Commands-Auth-Roles config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands-Auth-Roles config

+

This will make commands only work if the role has been allowed it in the role config

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.roles
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands-Auth-Runtime-Disable.html b/doc/configs/Commands-Auth-Runtime-Disable.html new file mode 100644 index 00000000..f68dc361 --- /dev/null +++ b/doc/configs/Commands-Auth-Runtime-Disable.html @@ -0,0 +1,450 @@ + + + + + + + + Commands-Auth-Runtime-Disable config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands-Auth-Runtime-Disable config

+

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

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
utils.global
+ + +

Functions

+ + + + + + + + + + + + +
Commands.disable(command_name)Stops a command from be used by any one
Commands.enable(command_name)Allows a command to be used again after disable was used
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Commands.disable(command_name) +
+
+
+
+ +

Stops a command from be used by any one

+

+ + + Parameters: + +
    + + + + + +
  • + + command_name + + : + + (string) + + the name of the command to disable + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Commands.enable(command_name) +
+
+
+
+ +

Allows a command to be used again after disable was used

+

+ + + Parameters: + +
    + + + + + +
  • + + command_name + + : + + (string) + + the name of the command to enable + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands-Parse-Roles.html b/doc/configs/Commands-Parse-Roles.html new file mode 100644 index 00000000..d18424fa --- /dev/null +++ b/doc/configs/Commands-Parse-Roles.html @@ -0,0 +1,362 @@ + + + + + + + + Commands-Parse-Roles config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands-Parse-Roles config

+

Adds some parse functions that can be used with the role system

+

+ + + + + + +

Usage

+
 Adds Parses:
+    role
+    player-role
+    player-role-online
+    player-role-alive
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.commands
expcore.roles
expcore.common
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands-Parse.html b/doc/configs/Commands-Parse.html new file mode 100644 index 00000000..2f413722 --- /dev/null +++ b/doc/configs/Commands-Parse.html @@ -0,0 +1,346 @@ + + + + + + + + Commands-Parse config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands-Parse config

+

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

+

+ + + + + + +

Usage

+
 Adds Parses:
+    boolean
+    string-options - options: array
+    string-max-length - max_length: number
+    number
+    integer
+    number-range - range_min: number, range_max: number
+    integer-range - range_min: number, range_max: number
+    player
+    player-online
+    player-alive
+    force
+    surface
+ + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
utils.game
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands.auth_admin.html b/doc/configs/Commands.auth_admin.html new file mode 100644 index 00000000..b63055ce --- /dev/null +++ b/doc/configs/Commands.auth_admin.html @@ -0,0 +1,289 @@ + + + + + + + + Commands.auth_admin config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands.auth_admin config

+

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

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.commands
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands.auth_roles.html b/doc/configs/Commands.auth_roles.html new file mode 100644 index 00000000..c25d1e43 --- /dev/null +++ b/doc/configs/Commands.auth_roles.html @@ -0,0 +1,315 @@ + + + + + + + + Commands.auth_roles config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands.auth_roles config

+

This will make commands only work if the role has been allowed it in the role config

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
expcore.roles
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands.auth_runtime_disable.html b/doc/configs/Commands.auth_runtime_disable.html new file mode 100644 index 00000000..e146ff0e --- /dev/null +++ b/doc/configs/Commands.auth_runtime_disable.html @@ -0,0 +1,437 @@ + + + + + + + + Commands.auth_runtime_disable config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands.auth_runtime_disable config

+

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

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
utils.global
+ + +

Functions

+ + + + + + + + + + + + +
Commands.disable(command_name)Stops a command from be used by any one
Commands.enable(command_name)Allows a command to be used again after disable was used
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Commands.disable(command_name) +
+
+
+
+ +

Stops a command from be used by any one

+

+ + + Parameters: + +
    + + + + + +
  • + + command_name + + : + + (string) + + the name of the command to disable + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Commands.enable(command_name) +
+
+
+
+ +

Allows a command to be used again after disable was used

+

+ + + Parameters: + +
    + + + + + +
  • + + command_name + + : + + (string) + + the name of the command to enable + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands.parse_general.html b/doc/configs/Commands.parse_general.html new file mode 100644 index 00000000..49dd695d --- /dev/null +++ b/doc/configs/Commands.parse_general.html @@ -0,0 +1,333 @@ + + + + + + + + Commands.parse_general config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands.parse_general config

+

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

+

+ + + + + + +

Usage

+
 Adds Parses:
+    boolean
+    string-options - options: array
+    string-max-length - max_length: number
+    number
+    integer
+    number-range - range_min: number, range_max: number
+    integer-range - range_min: number, range_max: number
+    player
+    player-online
+    player-alive
+    force
+    surface
+ + + + + + + +

Dependencies

+ + + + + + + + + + +
expcore.commands
utils.game
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Commands.parse_roles.html b/doc/configs/Commands.parse_roles.html new file mode 100644 index 00000000..76e5c918 --- /dev/null +++ b/doc/configs/Commands.parse_roles.html @@ -0,0 +1,349 @@ + + + + + + + + Commands.parse_roles config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands.parse_roles config

+

Adds some parse functions that can be used with the role system

+

+ + + + + + +

Usage

+
 Adds Parses:
+    role
+    player-role
+    player-role-online
+    player-role-alive
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.commands
expcore.roles
expcore.common
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Compilatron.html b/doc/configs/Compilatron.html new file mode 100644 index 00000000..5bf4b1ba --- /dev/null +++ b/doc/configs/Compilatron.html @@ -0,0 +1,362 @@ + + + + + + + + Compilatron config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Compilatron config

+

Config file for the compliatrons including where they spawn and what messages they show

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + +
message_cycle
locations
messages
+ + +
+ + +

Settings

+
+
+
+
+ # + message_cycle +
+
+
+
+ +

+

15 seconds default, how often (in ticks) the messages will cycle

+ + + + + + + + + + + + + + +
+
+
+
+ # + locations +
+
+
+
+ +

+

defines the spawn locations for all compilatrons

+ + + + + + + + + + + + + + +
+
+
+
+ # + messages +
+
+
+
+ +

+

the messages that each one will say, must be same name as its location

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Death-Logger.html b/doc/configs/Death-Logger.html new file mode 100644 index 00000000..76aec8f5 --- /dev/null +++ b/doc/configs/Death-Logger.html @@ -0,0 +1,424 @@ + + + + + + + + Death-Logger config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Death-Logger config

+

This config controls what happens when a player dies mostly about map markers and item collection; + allow_teleport_to_body_command and allow_collect_bodies_command can be over ridden if command_auth_runtime_disable is present; + if not present then the commands will not be loaded into the game

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + +
use_chests_as_bodies
auto_collect_bodies
show_map_markers
include_time_of_death
map_icon
+ + +
+ + +

Settings

+
+
+
+
+ # + use_chests_as_bodies +
+
+
+
+ +

+

weather items should be moved into a chest when a player dies

+ + + + + + + + + + + + + + +
+
+
+
+ # + auto_collect_bodies +
+
+
+
+ +

+

enables items being returned to the spawn point in chests upon corpse expiring

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_map_markers +
+
+
+
+ +

+

shows markers on the map where bodies are

+ + + + + + + + + + + + + + +
+
+
+
+ # + include_time_of_death +
+
+
+
+ +

+

weather to include the time of death on the map marker

+ + + + + + + + + + + + + + +
+
+
+
+ # + map_icon +
+
+
+
+ +

+

the icon that the map marker shows; nil means no icon; format as a SingleID

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Discord-Alerts.html b/doc/configs/Discord-Alerts.html new file mode 100644 index 00000000..03ca2c6d --- /dev/null +++ b/doc/configs/Discord-Alerts.html @@ -0,0 +1,245 @@ + + + + + + + + Discord-Alerts config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Discord-Alerts config

+

Config file used to enable and disable different push messages for discord

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/configs/File-Loader.html b/doc/configs/File-Loader.html new file mode 100644 index 00000000..58c755b1 --- /dev/null +++ b/doc/configs/File-Loader.html @@ -0,0 +1,248 @@ + + + + + + + + File-Loader config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

File-Loader config

+

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;

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/configs/Permission-Groups.html b/doc/configs/Permission-Groups.html new file mode 100644 index 00000000..7043ae72 --- /dev/null +++ b/doc/configs/Permission-Groups.html @@ -0,0 +1,303 @@ + + + + + + + + Permission-Groups config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Permission-Groups config

+

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

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.permission_groups
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.permission_groups +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Player-List.html b/doc/configs/Player-List.html new file mode 100644 index 00000000..c6e1c748 --- /dev/null +++ b/doc/configs/Player-List.html @@ -0,0 +1,820 @@ + + + + + + + + Player-List config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Player-List config

+

Config for the different action buttons that show on the player list; + 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 permission name used by the role system;

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui
expcore.roles
expcore.store
utils.game
modules.control.reports
modules.control.warnings
modules.control.jail
resources.color_presets
expcore.common
+ + +

Elements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
goto_playerTeleports the user to the action player
bring_playerTeleports the action player to the user
kill_playerKills the action player, if there are alive
report_playerReports the action player, requires a reason to be given
warn_playerGives the action player a warning, requires a reason
jail_playerJails the action player, requires a reason
temp_ban_playerTemp bans the action player, requires a reason
kick_playerKicks the action player, requires a reason
ban_playerBans the action player, requires a reason
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.reports +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.warnings +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.jail +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Elements

+
+
+
+
+ # + goto_player +
+
+
+
+ +

Teleports the user to the action player

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + bring_player +
+
+
+
+ +

Teleports the action player to the user

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + kill_player +
+
+
+
+ +

Kills the action player, if there are alive

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + report_player +
+
+
+
+ +

Reports the action player, requires a reason to be given

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + warn_player +
+
+
+
+ +

Gives the action player a warning, requires a reason

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + jail_player +
+
+
+
+ +

Jails the action player, requires a reason

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + temp_ban_player +
+
+
+
+ +

Temp bans the action player, requires a reason

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + kick_player +
+
+
+
+ +

Kicks the action player, requires a reason

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + ban_player +
+
+
+
+ +

Bans the action player, requires a reason

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Pollution-Grading.html b/doc/configs/Pollution-Grading.html new file mode 100644 index 00000000..9eb9892f --- /dev/null +++ b/doc/configs/Pollution-Grading.html @@ -0,0 +1,392 @@ + + + + + + + + Pollution-Grading config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Pollution-Grading config

+

This controls how pollution is viewed on the map

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + +
reference_point
max_scalar
min_scalar
update_delay
+ + +
+ + +

Settings

+
+
+
+
+ # + reference_point +
+
+
+
+ +

+

where pollution is read from

+ + + + + + + + + + + + + + +
+
+
+
+ # + max_scalar +
+
+
+
+ +

+

the scale between true max and max

+ + + + + + + + + + + + + + +
+
+
+
+ # + min_scalar +
+
+
+
+ +

+

the scale between the lowest max and min

+ + + + + + + + + + + + + + +
+
+
+
+ # + update_delay +
+
+
+
+ +

+

time in minutes between view updates

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Popup-Messages.html b/doc/configs/Popup-Messages.html new file mode 100644 index 00000000..39690dd2 --- /dev/null +++ b/doc/configs/Popup-Messages.html @@ -0,0 +1,422 @@ + + + + + + + + Popup-Messages config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Popup-Messages config

+

A combination of config settings for different popup values like chat and damage

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + +
show_player_messages
show_player_mentions
show_player_damage
show_player_health
damage_location_variance
+ + +
+ + +

Settings

+
+
+
+
+ # + show_player_messages +
+
+
+
+ +

+

weather a message in chat will make a popup above them

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_player_mentions +
+
+
+
+ +

+

weather a mentioned player will have a popup when mentioned in chat

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_player_damage +
+
+
+
+ +

+

weather to show damage done by players

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_player_health +
+
+
+
+ +

+

weather to show player health when attacked

+ + + + + + + + + + + + + + +
+
+
+
+ # + damage_location_variance +
+
+
+
+ +

+

how close to the eade of an entity the popups will appear

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Preset-Player-Colours.html b/doc/configs/Preset-Player-Colours.html new file mode 100644 index 00000000..9d37a9a8 --- /dev/null +++ b/doc/configs/Preset-Player-Colours.html @@ -0,0 +1,332 @@ + + + + + + + + Preset-Player-Colours config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Preset-Player-Colours config

+

Preset colours that players get when they join the server, if not in the list then will be given a random colour (which isnt disallowed)

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + +
players
disallow
+ + +
+ + +

Settings

+
+
+
+
+ # + players +
+
+
+
+ +

+

list of all players and the colour in rgb256 that they will recive upon joining

+ + + + + + + + + + + + + + +
+
+
+
+ # + disallow +
+
+
+
+ +

+

colours which will not given to players; the value does not matter it is only the key which is checked

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Repair.html b/doc/configs/Repair.html new file mode 100644 index 00000000..8625da88 --- /dev/null +++ b/doc/configs/Repair.html @@ -0,0 +1,422 @@ + + + + + + + + Repair config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Repair config

+

Config file for the repair command

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + +
disallow
max_range
allow_blueprint_repair
allow_ghost_revive
allow_heal_entities
+ + +
+ + +

Settings

+
+
+
+
+ # + disallow +
+
+
+
+ +

+

items in this list will never be repaired

+ + + + + + + + + + + + + + +
+
+
+
+ # + max_range +
+
+
+
+ +

+

the max range that can be used with the repair command

+ + + + + + + + + + + + + + +
+
+
+
+ # + allow_blueprint_repair +
+
+
+
+ +

+

when true will allow blueprints (things not destroyed by biters) to be build instantly using the repair command

+ + + + + + + + + + + + + + +
+
+
+
+ # + allow_ghost_revive +
+
+
+
+ +

+

when true will allow ghosts (things destroyed by biters) to be build instantly using the repair command

+ + + + + + + + + + + + + + +
+
+
+
+ # + allow_heal_entities +
+
+
+
+ +

+

when true will heal entities to full health that are within range

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Rockets.html b/doc/configs/Rockets.html new file mode 100644 index 00000000..9be2580d --- /dev/null +++ b/doc/configs/Rockets.html @@ -0,0 +1,842 @@ + + + + + + + + Rockets config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Rockets config

+

This file controls what will show in each section of the rocket info gui

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
stats
show_stats
show_first_rocket
show_last_rocket
show_fastest_rocket
show_total_rockets
show_game_avg
rolling_avg
milestones
show_milestones
progress
show_progress
allow_zoom_to_map
allow_remote_launch
remote_launch_admins_only
remote_launch_role_permission
allow_toggle_active
toggle_active_admins_only
toggle_active_role_permission
+ + +
+ + +

Settings

+
+
+
+
+ # + stats +
+
+
+
+ +

+

The data that will show in the stats section

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_stats +
+
+
+
+ +

+

false will hide this section all together

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_first_rocket +
+
+
+
+ +

+

false will not show when the first rocket was launched

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_last_rocket +
+
+
+
+ +

+

false will not show when the last rocket was launched

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_fastest_rocket +
+
+
+
+ +

+

false will not show the time taken for the fastest rocket

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_total_rockets +
+
+
+
+ +

+

false will not show the total number of rockets launched

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_game_avg +
+
+
+
+ +

+

false will hide the avg across the entire map time

+ + + + + + + + + + + + + + +
+
+
+
+ # + rolling_avg +
+
+
+
+ +

+

each number will be one statistic; 5 means the avg time taken for the last 5 rockets

+ + + + + + + + + + + + + + +
+
+
+
+ # + milestones +
+
+
+
+ +

+

each number will be one statistic; 5 means the time that the 5th rocket was launched

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_milestones +
+
+
+
+ +

+

false will hide this section all together

+ + + + + + + + + + + + + + +
+
+
+
+ # + progress +
+
+
+
+ +

+

The data and buttons in the build progress section

+ + + + + + + + + + + + + + +
+
+
+
+ # + show_progress +
+
+
+
+ +

+

false will hide this section altogether

+ + + + + + + + + + + + + + +
+
+
+
+ # + allow_zoom_to_map +
+
+
+
+ +

+

false will disable the zoom to map feature

+ + + + + + + + + + + + + + +
+
+
+
+ # + allow_remote_launch +
+
+
+
+ +

+

false removes the remote launch button for all players

+ + + + + + + + + + + + + + +
+
+
+
+ # + remote_launch_admins_only +
+
+
+
+ +

+

true will remove the remote launch button for all non (game) admins

+ + + + + + + + + + + + + + +
+
+
+
+ # + remote_launch_role_permission +
+
+
+
+ +

+

value used by custom permission system to allow or disallow the button

+ + + + + + + + + + + + + + +
+
+
+
+ # + allow_toggle_active +
+
+
+
+ +

+

false removes the remote toggle auto launch button for all players

+ + + + + + + + + + + + + + +
+
+
+
+ # + toggle_active_admins_only +
+
+
+
+ +

+

true will remove the toggle auto launch button for all non (game) admins

+ + + + + + + + + + + + + + +
+
+
+
+ # + toggle_active_role_permission +
+
+
+
+ +

+

value used by custom permission system to allow or disallow the button

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Roles.html b/doc/configs/Roles.html new file mode 100644 index 00000000..c1aebec6 --- /dev/null +++ b/doc/configs/Roles.html @@ -0,0 +1,300 @@ + + + + + + + + Roles config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Roles config

+

This is the main config file for the role system; file includes defines for roles and role flags and default values

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.roles
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Science.html b/doc/configs/Science.html new file mode 100644 index 00000000..d279267e --- /dev/null +++ b/doc/configs/Science.html @@ -0,0 +1,362 @@ + + + + + + + + Science config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Science config

+

Config file for the science info gui

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + +
show_eta
color_clamp
color_flux
+ + +
+ + +

Settings

+
+
+
+
+ # + show_eta +
+
+
+
+ +

+

when true the eta for research completion will be shown

+ + + + + + + + + + + + + + +
+
+
+
+ # + color_clamp +
+
+
+
+ +

+

the amount required for the text to show as green or red

+ + + + + + + + + + + + + + +
+
+
+
+ # + color_flux +
+
+
+
+ +

+

the ammount of flucuation allowed in production before icon change

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Scorched-Earth.html b/doc/configs/Scorched-Earth.html new file mode 100644 index 00000000..508bde53 --- /dev/null +++ b/doc/configs/Scorched-Earth.html @@ -0,0 +1,396 @@ + + + + + + + + Scorched-Earth config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Scorched-Earth config

+

This file controls the placement/degrading of tiles as players build and walk

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + +
weakness_value
strengths
degrade_order
entities
+ + +
+ + +

Settings

+
+
+
+
+ # + weakness_value +
+
+
+
+ +

+

lower value will make tiles more likely to degrade

+ + + + + + + + + + + + + + +
+
+
+
+ # + strengths +
+
+
+
+ +

+

this decides how "strong" a tile is, bigger number means less likely to degrade + debug: /interface require('modules.addons.worn-paths')(player.name,true) + note: tiles are effected by the tiles around them, so player paths will not degrade as fast when made wider + note: values are relative to the tile with the highest value, recommended to keep highest tile as a "nice" number + note: tiles not in list will never degrade under any conditions (which is why some are omitted such as water)

+ + + + + + + + + + + + + + +
+
+
+
+ # + degrade_order +
+
+
+
+ +

+

when a tile degrades it will turn into the next tile given here

+ + + + + + + + + + + + + + +
+
+
+
+ # + entities +
+
+
+
+ +

+

entities in this list will degrade the tiles under them when they are placed

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Spawn-Area.html b/doc/configs/Spawn-Area.html new file mode 100644 index 00000000..9b9a9a5a --- /dev/null +++ b/doc/configs/Spawn-Area.html @@ -0,0 +1,752 @@ + + + + + + + + Spawn-Area config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Spawn-Area config

+

Used to config the spawn generation settings yes there is alot here i know just ignore the long tables at the end (they were generated with a command)

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
infinite_ammo_turrets
enabled
ammo_type
locations
afk_belts
enabled
locations
corrections
protect_entities
offset
deconstruction_radius
deconstruction_tile
pattern_radius
pattern_tile
entities
tiles
+ + +
+ + +

Settings

+
+
+
+
+ # + infinite_ammo_turrets +
+
+
+
+ +

+

These turrets will have they ammo refilled automatically and can not be looted

+ + + + + + + + + + + + + + +
+
+
+
+ # + enabled +
+
+
+
+ +

+

weather the turrets will be created and refilled

+ + + + + + + + + + + + + + +
+
+
+
+ # + ammo_type +
+
+
+
+ +

+

the ammo type that will be used

+ + + + + + + + + + + + + + +
+
+
+
+ # + locations +
+
+
+
+ +

+

locations of all turrets, this is default it can be changed during runtime

+ + + + + + + + + + + + + + +
+
+
+
+ # + afk_belts +
+
+
+
+ +

+

setting relating to afk belts round the spawn point

+ + + + + + + + + + + + + + +
+
+
+
+ # + enabled +
+
+
+
+ +

+

weather afk belts will be generated

+ + + + + + + + + + + + + + +
+
+
+
+ # + locations +
+
+
+
+ +

+

top left connors of any afk belt loops to be added

+ + + + + + + + + + + + + + +
+
+
+
+ # + corrections +
+
+
+
+ +

+

Some settings that have no where else to go

+ + + + + + + + + + + + + + +
+
+
+
+ # + protect_entities +
+
+
+
+ +

+

if the spawn entites will be protected

+ + + + + + + + + + + + + + +
+
+
+
+ # + offset +
+
+
+
+ +

+

a global offset value to correct the x and y values of the tables below

+ + + + + + + + + + + + + + +
+
+
+
+ # + deconstruction_radius +
+
+
+
+ +

+

when the spawn is made this area will have all entities removed first

+ + + + + + + + + + + + + + +
+
+
+
+ # + deconstruction_tile +
+
+
+
+ +

+

this is the tile that will spawn in the deconstruction radius

+ + + + + + + + + + + + + + +
+
+
+
+ # + pattern_radius +
+
+
+
+ +

+

this is the radius of the pattern all water in this area will be filled

+ + + + + + + + + + + + + + +
+
+
+
+ # + pattern_tile +
+
+
+
+ +

+

the tile that is used for the pattern

+ + + + + + + + + + + + + + +
+
+
+
+ # + entities +
+
+
+
+ +

+

All entities that will be created as part of spawn {entity-name,x-pos,y-pos}

+ + + + + + + + + + + + + + +
+
+
+
+ # + tiles +
+
+
+
+ +

+

The location of the "pattern" tiles {x-pos,y-pos}

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Tasks.html b/doc/configs/Tasks.html new file mode 100644 index 00000000..6072ae03 --- /dev/null +++ b/doc/configs/Tasks.html @@ -0,0 +1,392 @@ + + + + + + + + Tasks config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Tasks config

+

Config file for the tasks gui

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + +
any_user_can_add_new_task
user_can_edit_own_tasks
only_admins_can_edit
edit_tasks_role_permission
+ + +
+ + +

Settings

+
+
+
+
+ # + any_user_can_add_new_task +
+
+
+
+ +

+

when false only people with edit permission can make new reports

+ + + + + + + + + + + + + + +
+
+
+
+ # + user_can_edit_own_tasks +
+
+
+
+ +

+

when false only people with edit permission can edit reports

+ + + + + + + + + + + + + + +
+
+
+
+ # + only_admins_can_edit +
+
+
+
+ +

+

true will hide the edit and delete buttons from non (game) admins

+ + + + + + + + + + + + + + +
+
+
+
+ # + edit_tasks_role_permission +
+
+
+
+ +

+

value used with custom permission system

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Warnings.html b/doc/configs/Warnings.html new file mode 100644 index 00000000..f3edf5aa --- /dev/null +++ b/doc/configs/Warnings.html @@ -0,0 +1,363 @@ + + + + + + + + Warnings config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warnings config

+

Config file for the warning system, this is very similar to reports but is for the use of moderators rather than normal users.

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + +
actions
script_warning_cool_down
script_warning_limit
+ + +
+ + +

Settings

+
+
+
+
+ # + actions +
+
+
+
+ +

+

what actions are taking at number of warnings + if a localized string is used then __1__ will by_player_name and __2__ will be the current warning count (auto inserted)

+ + + + + + + + + + + + + + +
+
+
+
+ # + script_warning_cool_down +
+
+
+
+ +

+

time for a script warning (given by script) to be removed (in minutes)

+ + + + + + + + + + + + + + +
+
+
+
+ # + script_warning_limit +
+
+
+
+ +

+

the number of script warnings (given by script) that are allowed before full warnings are given

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/configs/Warps.html b/doc/configs/Warps.html new file mode 100644 index 00000000..8800c822 --- /dev/null +++ b/doc/configs/Warps.html @@ -0,0 +1,692 @@ + + + + + + + + Warps config + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warps config

+

This file contains all the different settings for the warp system and gui

+

+ + + + + + + + + + + + + +

Settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
recharge_time
update_smoothing
minimum_distance
activation_range
spawn_activation_range
default_icon
user_can_edit_own_warps
any_user_can_add_new_warp
only_admins_can_edit
edit_warps_role_permission
bypass_warp_limits_permission
entities
base_tile
tiles
+ + +
+ + +

Settings

+
+
+
+
+ # + recharge_time +
+
+
+
+ +

+

The amount of time in seconds that the player must wait between warps, acts as a balance

+ + + + + + + + + + + + + + +
+
+
+
+ # + update_smoothing +
+
+
+
+ +

+

Higher is better, the amount of smoothing applied to recharge timer and other gui updates, max is 60

+ + + + + + + + + + + + + + +
+
+
+
+ # + minimum_distance +
+
+
+
+ +

+

The minimum distance that must be between warp points, creating new ones is blocked when too close

+ + + + + + + + + + + + + + +
+
+
+
+ # + activation_range +
+
+
+
+ +

+

The distance the player must be to a warp in order to use the warp gui, gui can still be viewed but not used

+ + + + + + + + + + + + + + +
+
+
+
+ # + spawn_activation_range +
+
+
+
+ +

+

A second activation range which is used for the forces spawn point

+ + + + + + + + + + + + + + +
+
+
+
+ # + default_icon +
+
+
+
+ +

+

The default icon which is used by warps; must be an item name

+ + + + + + + + + + + + + + +
+
+
+
+ # + user_can_edit_own_warps +
+
+
+
+ +

+

When true the user can always edit warps which they created regardless of other settings

+ + + + + + + + + + + + + + +
+
+
+
+ # + any_user_can_add_new_warp +
+
+
+
+ +

+

When true any user is able to create new warps, however editing may still be restricted

+ + + + + + + + + + + + + + +
+
+
+
+ # + only_admins_can_edit +
+
+
+
+ +

+

When true only admins can edit warps

+ + + + + + + + + + + + + + +
+
+
+
+ # + edit_warps_role_permission +
+
+
+
+ +

+

Role permission used by the role system to allow editing warps

+ + + + + + + + + + + + + + +
+
+
+
+ # + bypass_warp_limits_permission +
+
+
+
+ +

+

Role permission used by the role system to allow bypassing the time and distance restrictions

+ + + + + + + + + + + + + + +
+
+
+
+ # + entities +
+
+
+
+ +

+

The entities which are created for warps

+ + + + + + + + + + + + + + +
+
+
+
+ # + base_tile +
+
+
+
+ +

+

The tile which is used for the warps

+ + + + + + + + + + + + + + +
+
+
+
+ # + tiles +
+
+
+
+ +

+

The tiles which are created for warps

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Jail.html b/doc/control/Jail.html new file mode 100644 index 00000000..5f68c34b --- /dev/null +++ b/doc/control/Jail.html @@ -0,0 +1,1216 @@ + + + + + + + + Jail control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Jail control

+

Control Module - Jail + - Adds a way to jail players and temp ban players.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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')
+
+    -- This will give 'MrBiter' all his roles back and remove him from jail
+    -- again as above the player name is only used in the event for user feedback
+    Jail.unjail_player('MrBiter','Cooldude2606')
+
+    -- Temp ban works the same as jail but will store the reason and move the players items to spawn
+    -- this is meant to be used as a more permiment jail but not as strong as a ban
+    Jail.temp_ban_player('MrBiter','Cooldude2606','Likes biters too much')
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.roles
utils.game
utils.global
expcore.common
+ + +

Events

+ + + + + + + + + + + + + + + + + + + + +
on_player_jailedWhen a player is assigned to jail
on_player_unjailedWhen a player is unassigned from jail
on_player_temp_bannedWhen a player is temp banned
on_player_untemp_bannedWhen a temp ban is removed from a player
+ + +

Jail

+ + + + + + + + + + + + + + + + +
is_jailed(player)Checks if the player is currently in jail
jail_player(player, by_player_name[, reason='Non given.'])Moves a player to jail and removes all other roles
unjail_player(player, by_player_name)Moves a player out of jail and restores all roles previously removed
+ + +

Temp ban

+ + + + + + + + + + + + + + + + +
is_temp_banned(player)Checks if a player is temp banned
temp_ban_player(player, by_player_name[, reason='Non given.'])Temp bans a player by moving them to jail, clearing all other roles, storing the reason, and moving their items to spawn
untemp_ban_player(player, by_player_name)Rrmoves a player from temp ban by clearing the stored reason, removing them from jail, and restoring previous roles
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Events

+
+
+
+
+ # + on_player_jailed +
+
+
+
+ +

When a player is assigned to jail

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was jailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who jailed the other player + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was jailed + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_player_unjailed +
+
+
+
+ +

When a player is unassigned from jail

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was unjailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who unjailed the other player + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_player_temp_banned +
+
+
+
+ +

When a player is temp banned

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was temp banned + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who temp banned the other player + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was temp banned + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_player_untemp_banned +
+
+
+
+ +

When a temp ban is removed from a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was untemp banned + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who untemp banned the other player + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Jail

+
+
+
+
+ # + is_jailed(player) +
+
+
+
+ +

Checks if the player is currently in jail

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to check if they are in jail + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player is currently in jail +
  • +
+ + + + + + + + + +
+
+
+
+ # + jail_player(player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Moves a player to jail and removes all other roles

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player who will be jailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the jailing + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being jailed + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + wheather the user was jailed successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + unjail_player(player, by_player_name) +
+
+
+
+ +

Moves a player out of jail and restores all roles previously removed

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be unjailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player that is doing the unjail + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player was unjailed successfully +
  • +
+ + + + + + + + + +
+
+

Temp ban

+
+
+
+
+ # + is_temp_banned(player) +
+
+
+
+ +

Checks if a player is temp banned

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to check if they are temp banned + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player is temp banned +
  • +
+ + + + + + + + + +
+
+
+
+ # + temp_ban_player(player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Temp bans a player by moving them to jail, clearing all other roles, storing the reason, and moving their items to spawn

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be temp banned + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the temp ban + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being temp banned + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player was successfully temp banned +
  • +
+ + + + + + + + + +
+
+
+
+ # + untemp_ban_player(player, by_player_name) +
+
+
+
+ +

Rrmoves a player from temp ban by clearing the stored reason, removing them from jail, and restoring previous roles

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player who is being removed from temp ban + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the untemp ban + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player was successfully removed +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Production.html b/doc/control/Production.html new file mode 100644 index 00000000..ccfd8f5f --- /dev/null +++ b/doc/control/Production.html @@ -0,0 +1,1337 @@ + + + + + + + + Production control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Production control

+

Control Module - Production + - Common functions used to track production of items

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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
+    Production.precision_up(defines.flow_precision_index.one_second)
+
+    -- The get production function is used to get production, consumion and net
+    -- it may be used for any item and with any precision level, use total for total
+    Production.get_production(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute)
+
+    -- The fluctuations works by compearing recent production with the average over time
+    -- again any precision may be used, apart from one_thousand_hours as there would be no valid average
+    Production.get_fluctuations(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute)
+
+    -- ETA is calculated based on what function you use but all share a similar method
+    -- for production eta it will take current production average given by the precision
+    -- and work out how many ticks it will require to make the required amount (1000 by default)
+    Production.get_production_eta(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute,250000)
+
+    -- Both get_color and format_number are helper functions to help format production stats
+    -- get_color will return green,orange,red,or grey based on the active_value
+    -- the passive_value is used when active_value is 0 and can only return orange,red,or grey
+    Production.get_color(clamp,active_value,passive_value)
+ + + + + + + +

Dependencies

+ + + + + + + + + + +
resources.color_presets
util
+ + +

Precision

+ + + + + + + + + + + + + + + + +
precision_up(precision)Gets the next lesser precision index value, eg 1 second -> 1 minute
precision_down(precision)Gets the next greater precision index value, eg 1 minute -> 1 second
precision_ticks(precision)Gets the number of tick that precision is given over, eg 1 minute -> 60 ticks
+ + +

Statistics

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_production_total(force, item_name)Returns the production data for the whole game time
get_production(force, item_name, precision)Returns the production data for the given precision game time
get_fluctuations(force, item_name, precision)Returns the current fluctuation from the average
get_production_eta(force, item_name, precision[, required=1000])Returns the amount of ticks required to produce a certain amount
get_consumsion_eta(force, item_name, precision[, required=1000])Returns the amount of ticks required to consume a certain amount
get_net_eta(force, item_name, precision[, required=1000])Returns the amount of ticks required to produce but not consume a certain amount
+ + +

Formating

+ + + + + + + + + + + + +
get_color(clamp, active_value, passive_value)Returns a color value bassed on the value that was given
format_number(value)Returns three parts used to format a number
+ + +
+ + +

Dependencies

+
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + util +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Precision

+
+
+
+
+ # + precision_up(precision) +
+
+
+
+ +

Gets the next lesser precision index value, eg 1 second -> 1 minute

+

+ + + Parameters: + + + + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + precision_down(precision) +
+
+
+
+ +

Gets the next greater precision index value, eg 1 minute -> 1 second

+

+ + + Parameters: + + + + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + precision_ticks(precision) +
+
+
+
+ +

Gets the number of tick that precision is given over, eg 1 minute -> 60 ticks

+

+ + + Parameters: + + + + + + + Returns: +
    +
  • + (number) + the number of ticks in this time +
  • +
+ + + + + + + + + +
+
+

Statistics

+
+
+
+
+ # + get_production_total(force, item_name) +
+
+
+
+ +

Returns the production data for the whole game time

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains total made, used and net +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_production(force, item_name, precision) +
+
+
+
+ +

Returns the production data for the given precision game time

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains made, used and net +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_fluctuations(force, item_name, precision) +
+
+
+
+ +

Returns the current fluctuation from the average

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains made, used and net +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_production_eta(force, item_name, precision[, required=1000]) +
+
+
+
+ +

Returns the amount of ticks required to produce a certain amount

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + + + + +
  • + + required + + : + + (number) + + the number of items that are required to be made + + (default: 1000) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to produce this ammount of items +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_consumsion_eta(force, item_name, precision[, required=1000]) +
+
+
+
+ +

Returns the amount of ticks required to consume a certain amount

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + + + + +
  • + + required + + : + + (number) + + the number of items that are required to be consumed + + (default: 1000) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to consume this ammount of items +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_net_eta(force, item_name, precision[, required=1000]) +
+
+
+
+ +

Returns the amount of ticks required to produce but not consume a certain amount

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + + + + +
  • + + required + + : + + (number) + + the number of items that are required to be made but not used + + (default: 1000) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to produce, but not use, this ammount of items +
  • +
+ + + + + + + + + +
+
+

Formating

+
+
+
+
+ # + get_color(clamp, active_value, passive_value) +
+
+
+
+ +

Returns a color value bassed on the value that was given

+

+ + + Parameters: + +
    + + + + + +
  • + + clamp + + : + + (number) + + value which seperates the different colours + +
  • + + + + + +
  • + + active_value + + : + + (number) + + first value tested, tested against clamp + +
  • + + + + + +
  • + + passive_value + + : + + (number) + + second value tested, tested against 0 + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains r,g,b keys +
  • +
+ + + + + + + + + +
+
+
+
+ # + format_number(value) +
+
+
+
+ +

Returns three parts used to format a number

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (number) + + the value to format + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the sign for the number +
  • +
  • + (string) + the surfix for any unit used +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Reports.html b/doc/control/Reports.html new file mode 100644 index 00000000..ddcdfb3e --- /dev/null +++ b/doc/control/Reports.html @@ -0,0 +1,1118 @@ + + + + + + + + Reports control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Reports control

+

Control Module - Reports + - Adds a way to report players and store report messages.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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.
+    Reports.report_player('MrBiter','Cooldude2606','Liking biters too much') -- true
+
+    -- The other get methods can be used to get all the reports on a player or to test if a player is reported.
+    Reports.get_report('MrBiter','Cooldude2606') -- 'Liking biters too much'
+
+    -- This will remove the warning on 'MrBiter' (must be a valid player) which was made by 'Cooldude2606'.
+    Reports.remove_report('MrBiter','Cooldude2606') -- true
+
+    -- This will remove all the report that have been made against 'MrBiter'. Note that the remove event will
+    -- be triggered once per report issused.
+    Reports.remove_all('MrBiter') -- true
+
+ + + + + + + +

Dependencies

+ + + + + + + + + + +
utils.game
utils.global
+ + +

Events

+ + + + + + + + + + + + +
on_player_reportedWhen a player is reported
on_report_removedWhen a report is removed from a player
+ + +

Getters

+ + + + + + + + + + + + + + + + + + + + +
get_reports(player)Gets a list of all reports that a player has against them
get_report(player, by_player_name)Gets a single report against a player given the name of the player who made the report
is_reported(player[, by_player_name])Checks if a player is reported, option to get if reported by a certain player
count_reports(player[, custom_count])Counts the number of reports that a player has aganist them
+ + +

Setters

+ + + + + + + + + + + + + + + + +
report_player(player, by_player_name[, reason='Non given.'])Adds a report to a player, each player can only report another player once
remove_report(player, reported_by_name, removed_by_name)Removes a report from a player
remove_all(player, removed_by_name)Removes all reports from a player
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Events

+
+
+
+
+ # + on_player_reported +
+
+
+
+ +

When a player is reported

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the player index of the player who got reported + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who made the report + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason given for the report + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_report_removed +
+
+
+
+ +

When a report is removed from a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the player index of the player who has the report removed + +
  • + + + + + +
  • + + reported_by_name + + : + + (string) + + the name of the player who made the removed report + +
  • + + + + + +
  • + + removed_by_name + + : + + (string) + + the name of the player who removed the report + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Getters

+
+
+
+
+ # + get_reports(player) +
+
+
+
+ +

Gets a list of all reports that a player has against them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a list of all reports, key is by player name, value is reason +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_report(player, by_player_name) +
+
+
+
+ +

Gets a single report against a player given the name of the player who made the report

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who made the report + +
  • + + +
+ + + + + Returns: +
    +
  • + (string or nil) + string is the reason that the player was reported, if the player is not reported +
  • +
+ + + + + + + + + +
+
+
+
+ # + is_reported(player[, by_player_name]) +
+
+
+
+ +

Checks if a player is reported, option to get if reported by a certain player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to check if reported + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + when given will check if reported by this player + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + if the player has been reported +
  • +
+ + + + + + + + + +
+
+
+
+ # + count_reports(player[, custom_count]) +
+
+
+
+ +

Counts the number of reports that a player has aganist them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to count the reports for + +
  • + + + + + +
  • + + custom_count + + : + + (function) + + when given this function will be used to count the reports + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of reports that the user has +
  • +
+ + + + + + + + + +
+
+

Setters

+
+
+
+
+ # + report_player(player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Adds a report to a player, each player can only report another player once

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to add the report to + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player that is making the report + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being reported + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the report was added successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_report(player, reported_by_name, removed_by_name) +
+
+
+
+ +

Removes a report from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove the report from + +
  • + + + + + +
  • + + reported_by_name + + : + + (string) + + the name of the player that made the report + +
  • + + + + + +
  • + + removed_by_name + + : + + (string) + + the name of the player who removed the report + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the report was removed successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_all(player, removed_by_name) +
+
+
+
+ +

Removes all reports from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove the reports from + +
  • + + + + + +
  • + + removed_by_name + + : + + (string) + + the name of the player who removed the report + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the reports were removed successfully +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Rockets.html b/doc/control/Rockets.html new file mode 100644 index 00000000..431f9815 --- /dev/null +++ b/doc/control/Rockets.html @@ -0,0 +1,992 @@ + + + + + + + + Rockets control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Rockets control

+

Control Module - Rockets + - Stores rocket stats for each force.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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)
+
+    -- Some information is also stored for each force
+    Rockets.get_stats('player')
+
+    -- You can get the rocket data for all silos for a force by using get_silos
+    Rockets.get_silos('player')
+
+    -- You can get the launch time for a rocket, meaning what game tick the 50th rocket was launched
+    Rockets.get_rocket_time('player',50)
+
+    -- The rolling average will work out the time to launch one rocket based on the last X rockets
+    Rockets.get_rolling_average('player',10)
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
utils.event
utils.global
config.rockets
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_silo_data(silo)Gets the silo data for a given silo entity
get_silo_data_by_name(silo_name)Gets the silo data for a given silo entity
get_silo_entity(silo_name)Gets the silo entity from its silo name, reverse to get_silo_data
get_stats(force_name)Gets the rocket stats for a force
get_silos(force_name)Gets all the rocket silos that belong to a force
get_rocket_time(force_name, rocket_number)Gets the launch time of a given rocket, due to cleaning not all counts are valid
get_rocket_count(force_name)Gets the number of rockets that a force has launched
get_game_rocket_count()Gets the total number of rockets launched by all forces
get_rolling_average(force_name, count)Gets the rolling average time to launch a rocket
+ + +

Fields

+ + + + + + + + +
silo_data.launchedAdds this 1 to the launch count for this silo
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.rockets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + get_silo_data(silo) +
+
+
+
+ +

Gets the silo data for a given silo entity

+

+ + + Parameters: + +
    + + + + + +
  • + + silo + + : + + (LuaEntity) + + the rocket silo entity + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the data table for this silo, contains rockets launch, silo status, and its force +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_silo_data_by_name(silo_name) +
+
+
+
+ +

Gets the silo data for a given silo entity

+

+ + + Parameters: + +
    + + + + + +
  • + + silo_name + + : + + (string) + + the silo name that is stored in its data + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the data table for this silo, contains rockets launch, silo status, and its force +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_silo_entity(silo_name) +
+
+
+
+ +

Gets the silo entity from its silo name, reverse to get_silo_data

+

+ + + Parameters: + +
    + + + + + +
  • + + silo_name + + : + + (string) + + the silo name that is stored in its data + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaEntity) + the rocket silo entity +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_stats(force_name) +
+
+
+
+ +

Gets the rocket stats for a force

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to get the stats for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the table of stats for the force +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_silos(force_name) +
+
+
+
+ +

Gets all the rocket silos that belong to a force

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to get the silos for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + an array of silo data that all belong to this force +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_rocket_time(force_name, rocket_number) +
+
+
+
+ +

Gets the launch time of a given rocket, due to cleaning not all counts are valid

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to get the count for + +
  • + + + + + +
  • + + rocket_number + + : + + (number) + + the number of the rocket to get the launch time for + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the game tick that the rocket was lanuched on +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_rocket_count(force_name) +
+
+
+
+ +

Gets the number of rockets that a force has launched

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to get the count for + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of rockets that the force has launched +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_game_rocket_count() +
+
+
+
+ +

Gets the total number of rockets launched by all forces

+

+ + + + + + Returns: +
    +
  • + (number) + the total number of rockets launched this game +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_rolling_average(force_name, count) +
+
+
+
+ +

Gets the rolling average time to launch a rocket

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to get the average for + +
  • + + + + + +
  • + + count + + : + + (number) + + the distance to get the rolling average over + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to launch one rocket +
  • +
+ + + + + + + + + +
+
+

Fields

+
+
+
+
+ # + silo_data.launched +
+
+
+
+ +

Adds this 1 to the launch count for this silo

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Tasks.html b/doc/control/Tasks.html new file mode 100644 index 00000000..7fa706cc --- /dev/null +++ b/doc/control/Tasks.html @@ -0,0 +1,1047 @@ + + + + + + + + Tasks control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Tasks control

+

Control Module - Tasks + - Stores tasks for each force.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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')
+
+    -- You can then update this task to what ever value that you want
+    -- the task id is returned by new_task, or within an update handler
+    -- if a player name is not given that it will assume '<server>'
+    Tasks.update_task(task_id,'My number one task!','Cooldude2606')
+
+    -- You can then remove the task and all data linked with it
+    Tasks.remove_task(task_id)
+
+    -- set_editing and is_editing may be used to block other or provide warnings
+    -- none of this is enforced by this module and so you must do so in your own module
+    Tasks.set_editing(task_id,'Cooldude2606',true)
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.store
utils.global
utils.token
+ + +

Getters

+ + + + + + + + + + + + + + + + + + + + +
get_task(task_id)Gets the task stored at this id
get_details(task_id)Gets the task details stored at this id
get_force_tasks(force_name)Gets the task ids for a force
is_editing(task_id, player_name)Gets if a player is currently editing this task
+ + +

Setters

+ + + + + + + + + + + + + + + + + + + + + + + + +
add_handler(callback)Adds a new handler for when a task is updated
new_task(force_name[, task_number][, player_name])Adds a new task for a force, with option to place it in a certain order
remove_task(task_id)Removes a task and all data linked with it
update_task(task_id, task[, player_name='server'])Updates a task message
set_editing(task_id, player_name[, state])Sets a player to be editing this task, used with is_editing
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.token +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Getters

+
+
+
+
+ # + get_task(task_id) +
+
+
+
+ +

Gets the task stored at this id

+

+ + + Parameters: + +
    + + + + + +
  • + + task_id + + : + + (string) + + the uid of the task you want to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the task message that was stored here +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_details(task_id) +
+
+
+
+ +

Gets the task details stored at this id

+

+ + + Parameters: + +
    + + + + + +
  • + + task_id + + : + + (string) + + the uid of the task you want to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the task details that was stored here +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_force_tasks(force_name) +
+
+
+
+ +

Gets the task ids for a force

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force that you want the ids for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + an array of all the task ids +
  • +
+ + + + + + + + + +
+
+
+
+ # + is_editing(task_id, player_name) +
+
+
+
+ +

Gets if a player is currently editing this task

+

+ + + Parameters: + +
    + + + + + +
  • + + task_id + + : + + (string) + + the uid of the task you want to check + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player that you want to check + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + weather the player is currently editing this task +
  • +
+ + + + + + + + + +
+
+

Setters

+
+
+
+
+ # + add_handler(callback) +
+
+
+
+ +

Adds a new handler for when a task is updated

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + the callback which is ran when a task is updated + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the callback was added +
  • +
+ + + + + + + + + +
+
+
+
+ # + new_task(force_name[, task_number][, player_name]) +
+
+
+
+ +

Adds a new task for a force, with option to place it in a certain order

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to add the task for + +
  • + + + + + +
  • + + task_number + + : + + (number) + + the order place to add the task to, adds to end if omited + + (optional) +
  • + + + + + +
  • + + player_name + + : + + (string) + + when given this player will be added to the editing list + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the uid of the task which was created +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_task(task_id) +
+
+
+
+ +

Removes a task and all data linked with it

+

+ + + Parameters: + +
    + + + + + +
  • + + task_id + + : + + (string) + + the uid of the task which you want to remove + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + update_task(task_id, task[, player_name='server']) +
+
+
+
+ +

Updates a task message

+

+ + + Parameters: + +
    + + + + + +
  • + + task_id + + : + + (string) + + the uid of the task that you want to update + +
  • + + + + + +
  • + + task + + : + + (string) + + the message that you want to change the task to + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player who made the edit + + (default: 'server') +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + set_editing(task_id, player_name[, state]) +
+
+
+
+ +

Sets a player to be editing this task, used with is_editing

+

+ + + Parameters: + +
    + + + + + +
  • + + task_id + + : + + (string) + + the uid of the task that you want to editing for + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player you want to set editing for + +
  • + + + + + +
  • + + state + + : + + (boolean) + + the new state to set editing to + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Warnings.html b/doc/control/Warnings.html new file mode 100644 index 00000000..c1ac81e7 --- /dev/null +++ b/doc/control/Warnings.html @@ -0,0 +1,1473 @@ + + + + + + + + Warnings control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warnings control

+

Control Module - Warnings + - Adds a way to give and remove warnings to players.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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')
+
+    -- This will remove a warning from a player, second name is just who is doing the action
+    Warnings.remove_warning('MrBiter','Cooldude2606')
+
+    -- Script warning as similar to normal warning but are designed to have no effect for a short amount of time
+    -- this is so it can be used for greifer protection without being too agressive
+    Warnings.add_script_warning('MrBiter','Killed too many biters')
+
+    -- Both normal and script warnings can also be cleared, this will remove all warnings
+    Warnings.clear_warnings('MrBiter','Cooldude2606')
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
utils.event
utils.game
utils.global
config.warnings
+ + +

Events

+ + + + + + + + + + + + + + + + + + + + +
on_warning_addedWhen a warning is added to a player
on_warning_removedWhen a warning is removed from a player
on_script_warning_addedWhen a warning is added to a player, by the script
on_script_warning_removedWhen a warning is remnoved from a player, by the script
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_warnings(player)Gets an array of warnings that the player has, always returns a list even if emtpy
count_warnings(player)Gets the number of warnings that a player has on them
add_warning(player, by_player_name[, reason='Non given.'])Adds a warning to a player, when a warning is added a set action is done based on the number of warnings and the config file
remove_warning(player, by_player_name)Removes a warning from a player, always removes the earlyist warning, fifo
clear_warnings(player, by_player_name)Removes all warnings from a player, will trigger remove event for each warning
get_script_warnings(player)Gets an array of all the script warnings that a player has
count_script_warnings(player)Gets the number of script warnings that a player has on them
add_script_warning(player[, reason='Non given.'])Adds a script warning to a player, this may add a full warning if max script warnings is met
remove_script_warning(player)Removes a script warning from a player
clear_script_warnings(player)Removes all script warnings from a player, emits event for each warning removed
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.warnings +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Events

+
+
+
+
+ # + on_warning_added +
+
+
+
+ +

When a warning is added to a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who recived the warning + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who gave the warning + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was given a warning + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_warning_removed +
+
+
+
+ +

When a warning is removed from a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who is having the warning removed + +
  • + + + + + +
  • + + warning_by_name + + : + + (string) + + the name of the player who gave the warning + +
  • + + + + + +
  • + + removed_by_name + + : + + (string) + + the name of the player who is removing the warning + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_script_warning_added +
+
+
+
+ +

When a warning is added to a player, by the script

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who recived the warning + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was given a warning + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_script_warning_removed +
+
+
+
+ +

When a warning is remnoved from a player, by the script

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who is having the warning removed + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + get_warnings(player) +
+
+
+
+ +

Gets an array of warnings that the player has, always returns a list even if emtpy

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the warning for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + an array of all the warnings on this player, contains tick, by_player_name and reason +
  • +
+ + + + + + + + + +
+
+
+
+ # + count_warnings(player) +
+
+
+
+ +

Gets the number of warnings that a player has on them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to count the warnings for + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + add_warning(player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Adds a warning to a player, when a warning is added a set action is done based on the number of warnings and the config file

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to add a warning to + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being warned + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_warning(player, by_player_name) +
+
+
+
+ +

Removes a warning from a player, always removes the earlyist warning, fifo

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove a warning from + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + clear_warnings(player, by_player_name) +
+
+
+
+ +

Removes all warnings from a player, will trigger remove event for each warning

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the warnings from + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true when warnings were cleared succesfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_script_warnings(player) +
+
+
+
+ +

Gets an array of all the script warnings that a player has

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the script warnings of + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a table of all the script warnings a player has, contains tick and reason +
  • +
+ + + + + + + + + +
+
+
+
+ # + count_script_warnings(player) +
+
+
+
+ +

Gets the number of script warnings that a player has on them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to count the script warnings of + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of script warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + add_script_warning(player[, reason='Non given.']) +
+
+
+
+ +

Adds a script warning to a player, this may add a full warning if max script warnings is met

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to add a script warning to + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being warned + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of script warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_script_warning(player) +
+
+
+
+ +

Removes a script warning from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove a script warning from + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of script warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + clear_script_warnings(player) +
+
+
+
+ +

Removes all script warnings from a player, emits event for each warning removed

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the script warnings from + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/control/Warps.html b/doc/control/Warps.html new file mode 100644 index 00000000..5fa18a14 --- /dev/null +++ b/doc/control/Warps.html @@ -0,0 +1,1421 @@ + + + + + + + + Warps control + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warps control

+

Control Module - Warps + - Stores warps for each force.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    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})
+
+    -- You can then update the warp information, name and icon, with the update function
+    Warps.update_warp(warp_id,'Best Warp','iron-plate')
+
+    -- Removeing a warp will restore the land that as under it, and remove any data linked with it
+    Warps.remove_warp(warp_id)
+
+    -- You can get the deatils for a warp which include last edit and postion
+    Warps.get_details(warp_id)
+
+    -- You can teleport a player to a warp, note that there is no limit on this action
+    Warps.teleport_player(warp_id,player)
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + +
expcore.store
utils.global
utils.token
config.warps
expcore.common
+ + +

Getters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_warp_name(warp_id)Gets the name of a warp
get_warp_icon(warp_id)Gets the icon of a warp
get_details(warp_id)Gets the task details stored at this id
get_warps(force_name)Gets all warps for a force
get_all_warps()Gets all warps from all forces
is_editing(warp_id, player_name)Gets if a player is currently editing this warp
teleport_player(warp_id, player)Teleports a player to a warp point
+ + +

Setters

+ + + + + + + + + + + + + + + + +
add_handler(callback)Adds a new handler for when a warp is updated
set_editing(warp_id, player_name[, state])Sets a player to be editing this warp, used with is_editing
update_warp(warp_id, name, icon[, player_name='server'])Updates a warp to a differecnt name and icon, both must be given
+ + +

Generators

+ + + + + + + + + + + + + + + + +
make_chart_tag(warp_id)Adds or updates the chart tag for a warp
new_warp(force_name, surface, position[, player_name='server'][, warp_name='New warp'][, block_generation=false][, set_spawn=false])Adds a new warp to a force and makes the in game warp area
remove_warp(warp_id)Removes a warp and clears the area where it was added
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.token +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.warps +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Getters

+
+
+
+
+ # + get_warp_name(warp_id) +
+
+
+
+ +

Gets the name of a warp

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp you want to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the warp name that was stored here +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_warp_icon(warp_id) +
+
+
+
+ +

Gets the icon of a warp

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp you want to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the warp icon that was stored here +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_details(warp_id) +
+
+
+
+ +

Gets the task details stored at this id

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp you want to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the warp details that was stored here +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_warps(force_name) +
+
+
+
+ +

Gets all warps for a force

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to get the warps for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + an array of warp ids that belong to this force, spawn key is included +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_all_warps() +
+
+
+
+ +

Gets all warps from all forces

+

+ + + + + + Returns: +
    +
  • + (table) + array of all warp details +
  • +
+ + + + + + + + + +
+
+
+
+ # + is_editing(warp_id, player_name) +
+
+
+
+ +

Gets if a player is currently editing this warp

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp you want to check + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player that you want to check + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + weather the player is currently editing this warp +
  • +
+ + + + + + + + + +
+
+
+
+ # + teleport_player(warp_id, player) +
+
+
+
+ +

Teleports a player to a warp point

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp to send the player to + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to teleport to the warp + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Setters

+
+
+
+
+ # + add_handler(callback) +
+
+
+
+ +

Adds a new handler for when a warp is updated

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + the callback which is ran when a warp is updated + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the callback was added +
  • +
+ + + + + + + + + +
+
+
+
+ # + set_editing(warp_id, player_name[, state]) +
+
+
+
+ +

Sets a player to be editing this warp, used with is_editing

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp that you want to editing for + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player you want to set editing for + +
  • + + + + + +
  • + + state + + : + + (boolean) + + the new state to set editing to + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + update_warp(warp_id, name, icon[, player_name='server']) +
+
+
+
+ +

Updates a warp to a differecnt name and icon, both must be given

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp that you want to update + +
  • + + + + + +
  • + + name + + : + + (string) + + the name that you want the warp to have + +
  • + + + + + +
  • + + icon + + : + + (string) + + the new icon that you want the warp to have + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player that is updating the warp + + (default: 'server') +
  • + + +
+ + + + + + + + + + + + + +
+
+

Generators

+
+
+
+
+ # + make_chart_tag(warp_id) +
+
+
+
+ +

Adds or updates the chart tag for a warp

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp you want to make the chart tag for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if a new tag was made, false if it was updated +
  • +
+ + + + + + + + + +
+
+
+
+ # + new_warp(force_name, surface, position[, player_name='server'][, warp_name='New warp'][, block_generation=false][, set_spawn=false]) +
+
+
+
+ +

Adds a new warp to a force and makes the in game warp area

+

+ + + Parameters: + +
    + + + + + +
  • + + force_name + + : + + (string) + + the name of the force to add a new warp for + +
  • + + + + + +
  • + + surface + + : + + (LuaSurface) + + the surface to add the warp to + +
  • + + + + + +
  • + + position + + : + + (Position) + + the postion to have the warp go to + +
  • + + + + + +
  • + + player_name + + : + + (string) + + the name of the player who added this warp + + (default: 'server') +
  • + + + + + +
  • + + warp_name + + : + + (string) + + the name of the warp that will be made + + (default: 'New warp') +
  • + + + + + +
  • + + block_generation + + : + + (boolean) + + when true a in game area will not be made + + (default: false) +
  • + + + + + +
  • + + set_spawn + + : + + (boolean) + + when true this warp will become the spawn for the force + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + remove_warp(warp_id) +
+
+
+
+ +

Removes a warp and clears the area where it was added

+

+ + + Parameters: + +
    + + + + + +
  • + + warp_id + + : + + (string) + + the uid of the warp that you want to remove + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Commands.html b/doc/core/Commands.html new file mode 100644 index 00000000..683bf908 --- /dev/null +++ b/doc/core/Commands.html @@ -0,0 +1,1980 @@ + + + + + + + + Commands core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Commands core

+

Core Module - Commands + - Factorio command making module that makes commands with better parse and more modularity

+

+ + + + + + +

Usage

+

+---- Example Authenticator:
+    -- The command system is most useful when you can control who can use commands; to do this would would need to
+    -- define an authenticator which is ran every time a command is run; in this example I will show a simple one
+    -- that requires some commands to require the user to be a game admin:
+
+    -- When the authenticator is called be the command handler it will be passed 4 vales:
+    -- 1) the player who used the command
+    -- 2) the name of the command that is being used
+    -- 3) any flags which have been set for this command, this is a table of values set using :set_flag(name,value)
+    -- 4) the reject function which is the preferred method to prevent execution of the command
+
+    -- For our admin only example we will set a flag to true when we want it do be admin only so when we define the
+    -- command will will use :set_flag('admin_only',true) and then inside the authenticator we will test if the flag
+    -- is present using: if flags.admin_only then
+
+    -- Although no return is required to allow the command to execute it is best practice to return true; we do this in
+    -- two cases in our authenticator:
+    -- 1) when the "admin_only" flag is not set, which we take to mean any one can use it
+    -- 2) when the "admin_only" flag is set, and the player is admin
+
+    -- Now when the user is not an admin and the command requires you to be an admin then we must reject the request:
+    -- 1) return false -- this is the most basic block and should only be used while testing
+    -- 2) return reject -- returning the reject function is only an option as a fail safe, same as returning false
+    -- 3) reject() -- this will block execution without returning to allow further code to be ran in the authenticator
+    -- 4) reject('This command is for admins only!') -- Using reject as a function allows a error message to be returned
+    -- 5) return reject() -- using return on either case above is best practice as you should execute all code before rejecting
+
+    -- Example Code:
+    Commands.add_authenticator(function(player,command,flags,reject)
+        if flags.admin_only then -- our test for the "admin_only" flag
+            if player.admin then
+                return true -- true return 2
+            else
+                return reject('This command is for admins only!') -- reject return 5 with a custom error message
+            end
+        else
+            return true -- true return 1
+        end
+    end)
+

+---- Example Parse:
+    -- Before you go making commands it is important to understand the most powerful feature of this command handler,
+    -- when you define a command you are able to type the params and have then be parsed by an handler so before your
+    -- command is ever executed you can be sure that all the params are valid. This module should be paired with a general
+    -- command parse but you may want to create your own:
+
+    -- For our example we will create a parse to accept only integer numbers in a given range:
+    -- 1) we will give it the name "number-range-int" this is the "type" that the input is expected to be
+    -- 2) when we define the type we will also define the min and max of the range so we can use the function more than once
+    -- Example parse usage:
+    :add_param('repeat_count',false,'number-range-int',5,10) -- range 5 to 10 inclusive
+
+    -- The command parse will be passed 3 params and any other you define, in our case:
+    -- 1) the input that has been given by the user for this param, the role of this function is to transform this value
+    -- nb: the input is a string but can be nil if the param is marked as optional
+    -- 2) the player who is using the command, this is always present
+    -- 3) the reject function to throw an error to the user, this is always present
+    -- 4) the range min, this is user defined and has the value given when the param is defined
+    -- 5) the range max, this is user defined and has the value given when the param is defined
+
+    -- When returning from the param parse you again have a few options with how to do this:
+    -- 1) you return the new value for the param (any non nil value) this value is then passed to the command callback
+    -- 2) not returning will cause a generic invalid error and the command callback is blocked, not recommenced
+    -- 3) return reject -- this is just a failsafe in case the function is not called, same as no return
+    -- 4) return reject() -- will give a shorter error message as you pass a nil custom error
+    -- 5) return reject('Number entered is not in range: '..range_min..', '..range_max) -- returns a custom error the the user
+    -- nb: if you do not return reject after you call it then you are still returning nil so there will be a duplicate message
+
+    -- It should be noted that if you want to expand on an existing parse you can use Commands.parse(type,input,player,reject)
+    -- and this value will either return a new value for the input or nil, if it is nil you should return nil to prevent double
+    -- messages to the user:
+    input = Commands.parse('number-int',input,player,reject)
+    if not input then return end -- nil check
+
+    -- Example Code:
+    Commands.add_parse('number-range-int',function(input,player,reject,range_min,range_max)
+        local rtn = tonumber(input) and math.floor(tonumber(input)) or nil -- converts input to number
+        if not rtn or rtn < range_min or rtn > range_max then
+            -- the input is either not a number or is outside the range
+            return reject('Number entered is not in range: '..range_min..', '..range_max)
+        else
+            -- returns the input as a number value rather than a string, thus the param is now the correct type
+            return rtn
+        end
+    end)
+

+---- Example Command:
+    -- How for the fun part making the commands, the commands can be set up with any number of params and flags that you want,
+    -- you can add aliases for the commands and set default values for optional params and of course register your command callback
+    -- in our example we will just have a command that will repeat the users name in chat X amount of times and only allow admins to use it.
+
+    -- First we create the new command, nb this will not register the command to the game this is done at the end, we will call
+    -- the command "repeat-name" and set the help message as follows:
+    Commands.new_command('repeat-name','Will repeat you name a number of times in chat.')
+
+    -- Now for our first param we will call "repeat-count" and it will be a required value between 1 and 5 inclusive:
+    :add_param('repeat-count',false,'number-range-int',1,5)
+
+    -- Our second param we need a custom parse for but we have not defined it, this is an option for when it is unlikely for
+    -- any other command to use the same input type; however in our case it will just be a boolean which should be noted as being
+    -- included in the general command parse config. As for the param its self it will be called "smiley" and will be optional with
+    -- a default value of false:
+    :add_param('smiley',true,function(input,player,reject)
+        -- since it is optional the input can be nil, in which case we just return
+        if not input then return end
+        -- if it is not nil then we check for a truthy value
+        if input:lower() == 'true' or input:lower() == 'yes' then
+            return true
+        else
+            -- note that because we did not return nil or reject then false will be passed to command callback, see example parse
+            return false
+        end
+    end)
+
+    -- Once all params are defined you can now define some default values if you have optional params, the default value will be used only
+    -- when no value is given as input, if an invalid value is given then the command will still fail and this value will not be used, the
+    -- default can also be a function which is passed the player using the command and returns a value. Here we set the default for "smiley" to false:
+    :set_defaults{smiley=false}
+
+    -- Another example of defaults if we have: item, amount[opt], player[opt]
+    :set_defaults{
+        amount = 50, -- more than one value can be set at a time
+        player = function(player)
+            return player -- default is the player using the command
+        end
+    }
+
+    -- Now the params are set up we can alter how the command works, we can set auth flags, add aliases to this command or enable "auto concat"
+    -- which is when you want all extra words to be concatenated onto the end of the last param, useful for reason or messages:
+    :set_flag('admin_only',true) -- in our case we want "admin_only" to be set to true so only admins can use the command
+    :add_alias('name','rname') -- we also add two aliases here: "name" and "rname" which point to this command
+    -- :enable_auto_concat() we do not use this in our case but this can also be used to enable the "auto concat" feature
+
+    -- And finally we want to register a callback to this command, the callback is what defines what the command does, can be as complex as you
+    -- want it to be to as simple as our example; the command receives two params plus all that you have defines:
+    -- 1) the player who used the command
+    -- 2) in our case repeat_count which will be a number
+    -- 3) in our case smiley which will be a boolean
+    -- 4) the raw input; this param is always last as is always present as a catch all
+    :register(function(player,repeat_count,smiley,raw)
+        -- this is to show the value for raw as this is an example command, the log file will also show this
+        game.print(player.name..' used a command with input: '..raw)
+        local msg = ') '..player.name
+        if smiley then
+            -- this is where that smiley param is used
+            msg = ':'..msg
+        end
+        for 1 = 1,repeat_count do
+            -- this print function will return ANY value to the user in a desync safe manor, this includes if the command was used through rcon
+            Command.print(1..msg)
+        end
+        -- see below for what else can be used here
+    end)
+
+    -- Some other useful functions that can be used are:
+    Commands.print(any,colour[opt]) -- this will return any value value to the user including if it is ran through rcon console
+    Commands.error(message[opt]) -- this returns a warning to the user, aka an error that does not prevent execution of the command
+    return Commands.error(message[opt]) -- this returns an error to the user, and will halt the command execution, ie no success message is returned
+    Commands.success(message[opt]) -- used to return a success message however don't use this method see below
+    return Commands.success(message[opt]) -- will return the success message to the user and your given message, halts execution
+    return <any> if any value is returned then it will be returned to the player via a Commands.success call
+
+    -- Example Code:
+    Commands.new_command('repeat-name','Will repeat you name a number of times in chat.')
+    :add_param('repeat-count',false,'number-range-int',1,5) -- required int in range 1 to 5 inclusive
+    :add_param('smiley',true,function(input,player,reject) -- optional boolean default false
+        if not input then return end
+        if input:lower() == 'true' or input:lower() == 'yes' then
+            return true
+        else
+            return false
+        end
+    end)
+    :set_defaults{smiley=false}
+    :set_flag('admin_only',true) -- command is admin only
+    :add_alias('name','rname') -- allow alias: name and rname
+    :register(function(player,repeat_count,smiley,raw)
+        game.print(player.name..' used a command with input: '..raw)
+        local msg = ') '..player.name
+        if smiley then
+            msg = ':'..msg
+        end
+        for 1 = 1,repeat_count do
+            Command.print(1..msg)
+        end
+    end)
+ + + + + + + +

Dependencies

+ + + + + + + + + + +
utils.game
expcore.common
+ + +

Authenication

+ + + + + + + + + + + + + + + + +
add_authenticator(callback)Adds an authorization callback, function used to check if a player if allowed to use a command
remove_authenticator(callback)Removes an authorization callback
authorize(player, command_name)Mostly used internally, calls all authorization callbacks, returns if the player is authorized
+ + +

Getters

+ + + + + + + + + + + + +
get([player])Gets all commands that a player is allowed to use, game commands not included
search(keyword[, allowed_player])Searches command names and help messages to find possible commands, game commands included
+ + +

Parse

+ + + + + + + + + + + + + + + + +
add_parse(name, callback)Adds a parse function which can be called by name rather than callback (used in add_param) + nb: this is not needed as you can use the callback directly this just allows it to be called by name
remove_parse(name)Removes a parse function, see add_parse for adding them
parse(name, input, player, reject)Intended to be used within other parse functions, runs a parse and returns success and new value
+ + +

Creation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
new_command(name, help)Creates a new command object to added details to, note this does not register the command to the game
Commands._prototype:add_param(name[, optional=false][, parse=pass function through][, ...])Adds a new param to the command this will be displayed in the help and used to parse the input
Commands._prototype:set_defaults(defaults)Adds default values to params only matters if the param is optional, if default value is a function it is called with param player
Commands._prototype:set_flag(name, value)Adds a tag to the command which is passed via the flags param to the authenticators, can be used to assign command roles or type
Commands._prototype:add_alias(any)Adds an alias or multiple that will also be registered with the same callback, eg /teleport can be /tp with both working
Commands._prototype:enable_auto_concat()Enables auto concatenation of any params on the end so quotes are not needed for last param + nb: this will disable max param checking as they will be concatenated onto the end of that last param + this can be useful for reasons or longs text, can only have one per command
Commands._prototype:register(callback)Adds the callback to the command and registers all aliases, params and help message with the game + nb: this must be the last function ran on the command and must be done for the command to work
+ + +

Status

+ + + + + + + + + + + + + + + + + + + + +
error([error_message][, play_sound])Sends an error message to the player and returns a constant to return to command handler to exit execution + nb: this is for non fatal errors meaning there is no log of this event + nb: if reject is giving as a param to the callback use that instead
internal_error(success, command_name, error_message)Sends an error to the player and logs the error, used with pcall within command handler please avoid direct use + nb: use error(error_message) within your callback to trigger do not trigger directly as the handler may still continue
success([value])Sends a value to the player, followed by a command complete message + nb: either return a value from your callback to trigger or return the return of this to prevent two messages
run_command(command_event)Main event function that is ran for all commands, used internally please avoid direct use
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Authenication

+
+
+
+
+ # + add_authenticator(callback) +
+
+
+
+ +

Adds an authorization callback, function used to check if a player if allowed to use a command

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + the callback you want to register as an authenticator + callback param - player: LuaPlayer - the player who is trying to use the command + callback param - command: string - the name of the command which is being used + callback param - flags: table - any flags which have been set for the command + callback param - reject: function(error_message?: string) - call to fail authorize with optional error message + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the index it was inserted at use to remove the callback, if anon function used +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_authenticator(callback) +
+
+
+
+ +

Removes an authorization callback

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function or number) + + the callback to remove, an index returned by add_authenticator can be passed + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + was the callback found and removed +
  • +
+ + + + + + + + + +
+
+
+
+ # + authorize(player, command_name) +
+
+
+
+ +

Mostly used internally, calls all authorization callbacks, returns if the player is authorized

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that is using the command, passed to callbacks + +
  • + + + + + +
  • + + command_name + + : + + (string) + + the command that is being used, passed to callbacks + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true player is authorized +
  • +
  • + (string) + commands const for success +
  • +
+
Or
+
    +
  • + (boolean) + false player is unauthorized +
  • +
  • + (string or locale_string) + the reason given by the authenticator +
  • +
+ + + + + + + + + +
+
+

Getters

+
+
+
+
+ # + get([player]) +
+
+
+
+ +

Gets all commands that a player is allowed to use, game commands not included

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that you want to get commands of, nil will return all commands + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + all commands that that player is allowed to use, or all commands +
  • +
+ + + + + + + + + +
+
+
+
+ # + search(keyword[, allowed_player]) +
+
+
+
+ +

Searches command names and help messages to find possible commands, game commands included

+

+ + + Parameters: + +
    + + + + + +
  • + + keyword + + : + + (string) + + the word which you are trying to find + +
  • + + + + + +
  • + + allowed_player + + : + + (LuaPlayer) + + the player to get allowed commands of, if nil all commands are searched + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + all commands that contain the key word, and allowed by player if player given +
  • +
+ + + + + + + + + +
+
+

Parse

+
+
+
+
+ # + add_parse(name, callback) +
+
+
+
+ +

Adds a parse function which can be called by name rather than callback (used in add_param) + nb: this is not needed as you can use the callback directly this just allows it to be called by name

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the parse, should be the type like player or player_alive, must be unique + +
  • + + + + + +
  • + + callback + + : + + (function) + + the callback that is ran to parse the input + parse param - input: string - the input given by the user for this param + parse param - player: LuaPlayer - the player who is using the command + parse param - reject: function(error_message) - use this function to send a error to the user and fail running + parse return - the value that will be passed to the command callback, must not be nil and if reject then command is not run + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + was the parse added will be false if the name is already used +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_parse(name) +
+
+
+
+ +

Removes a parse function, see add_parse for adding them

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the parse to remove + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + parse(name, input, player, reject) +
+
+
+
+ +

Intended to be used within other parse functions, runs a parse and returns success and new value

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the parse to call, must be registered and cant be a function + +
  • + + + + + +
  • + + input + + : + + (string) + + string the input to pass to the parse, will always be a but might not be the original input + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that is calling using the command + +
  • + + + + + +
  • + + reject + + : + + (function) + + the reject function that was passed by the command hander + +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the new value for the input, may be nil, if nil then either there was an error or input was nil +
  • +
+ + + + + + + + + +
+
+

Creation

+
+
+
+
+ # + new_command(name, help) +
+
+
+
+ +

Creates a new command object to added details to, note this does not register the command to the game

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the command to be created + +
  • + + + + + +
  • + + help + + : + + (string) + + the help message for the command + +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands._prototype) + this will be used with other functions to generate the command functions +
  • +
+ + + + + + + + + +
+
+
+
+ # + Commands._prototype:add_param(name[, optional=false][, parse=pass function through][, ...]) +
+
+
+
+ +

Adds a new param to the command this will be displayed in the help and used to parse the input

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the new param that is being added to the command + +
  • + + + + + +
  • + + optional + + : + + (boolean) + + is this param required for this command, these must be after all required params + + (default: false) +
  • + + + + + +
  • + + parse + + : + + (string or function) + + this function will take the input and return a new (or same) value + + (default: pass function through) +
  • + + + + + +
  • + + ... + + : + + + extra args you want to pass to the parse function; for example if the parse is general use + parse param - input: string - the input given by the user for this param + parse param - player: LuaPlayer - the player who is using the command + parse param - reject: function(error_message) - use this function to send a error to the user and fail running + parse return - the value that will be passed to the command callback, must not be nil and if reject then command is not run + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands._prototype) + pass through to allow more functions to be called +
  • +
+ + + + + + + + + +
+
+
+
+ # + Commands._prototype:set_defaults(defaults) +
+
+
+
+ +

Adds default values to params only matters if the param is optional, if default value is a function it is called with param player

+

+ + + Parameters: + +
    + + + + + +
  • + + defaults + + : + + (table) + + table a keyed by the name of the param with the value as the default value {paramName=defaultValue} + callback param - player: LuaPlayer - the player using the command, default value does not need to be a function callback + +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands._prototype) + pass through to allow more functions to be called +
  • +
+ + + + + + + + + +
+
+
+
+ # + Commands._prototype:set_flag(name, value) +
+
+
+
+ +

Adds a tag to the command which is passed via the flags param to the authenticators, can be used to assign command roles or type

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the tag to be added; used to keep flags separate + +
  • + + + + + +
  • + + value + + : + + (any) + + the tag that you want can be anything that the authenticators are expecting + nb: if value is nil then name will be assumed as the value and added at a numbered index + +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands._prototype) + pass through to allow more functions to be called +
  • +
+ + + + + + + + + +
+
+
+
+ # + Commands._prototype:add_alias(any) +
+
+
+
+ +

Adds an alias or multiple that will also be registered with the same callback, eg /teleport can be /tp with both working

+

+ + + Parameters: + +
    + + + + + +
  • + + any + + : + + (string) + + ... amount of aliases that you want this command to be callable with + +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands._prototype) + pass through to allow more functions to be called +
  • +
+ + + + + + + + Usage: +
command:add_alias('aliasOne','aliasTwo','etc')
+ + +
+
+
+
+ # + Commands._prototype:enable_auto_concat() +
+
+
+
+ +

Enables auto concatenation of any params on the end so quotes are not needed for last param + nb: this will disable max param checking as they will be concatenated onto the end of that last param + this can be useful for reasons or longs text, can only have one per command

+

+ + + + + + Returns: +
    +
  • + (Commands._prototype) + pass through to allow more functions to be called +
  • +
+ + + + + + + + + +
+
+
+
+ # + Commands._prototype:register(callback) +
+
+
+
+ +

Adds the callback to the command and registers all aliases, params and help message with the game + nb: this must be the last function ran on the command and must be done for the command to work

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + the callback for the command, will receive the player running command, and params added with add_param + callback param - player: LuaPlayer - the player who used the command + callback param - ... - any params which were registered with add_param in the order they where registered + callback param - raw: string - the raw input from the user, comes after every param added with add_param + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Status

+
+
+
+
+ # + error([error_message][, play_sound]) +
+
+
+
+ +

Sends an error message to the player and returns a constant to return to command handler to exit execution + nb: this is for non fatal errors meaning there is no log of this event + nb: if reject is giving as a param to the callback use that instead

+

+ + + Parameters: + +
    + + + + + +
  • + + error_message + + : + + (string) + + an optional error message that can be sent to the user + + (optional) +
  • + + + + + +
  • + + play_sound + + : + + (string) + + the sound to play for the error + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands.defines.error) + return this to command handler to exit execution +
  • +
+ + + + + + + + Usage: +
return Commands.error()
+ + +
+
+
+
+ # + internal_error(success, command_name, error_message) +
+
+
+
+ +

Sends an error to the player and logs the error, used with pcall within command handler please avoid direct use + nb: use error(error_message) within your callback to trigger do not trigger directly as the handler may still continue

+

+ + + Parameters: + +
    + + + + + +
  • + + success + + : + + (boolean) + + the success value returned from pcall, or just false to trigger error + +
  • + + + + + +
  • + + command_name + + : + + (string) + + the name of the command this is used within the log + +
  • + + + + + +
  • + + error_message + + : + + (string) + + the error returned by pcall or some other error, this is logged and not returned to player + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the opposite of success so true means to cancel execution, used internally +
  • +
+ + + + + + + + + +
+
+
+
+ # + success([value]) +
+
+
+
+ +

Sends a value to the player, followed by a command complete message + nb: either return a value from your callback to trigger or return the return of this to prevent two messages

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (any) + + the value to return to the player, if nil then only success message returned + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (Commands.defines.success) + return this to the command handler to prevent two success messages +
  • +
+ + + + + + + + + +
+
+
+
+ # + run_command(command_event) +
+
+
+
+ +

Main event function that is ran for all commands, used internally please avoid direct use

+

+ + + Parameters: + +
    + + + + + +
  • + + command_event + + : + + (table) + + passed directly from command event from the add_command function + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Common-Library.html b/doc/core/Common-Library.html new file mode 100644 index 00000000..44c6136e --- /dev/null +++ b/doc/core/Common-Library.html @@ -0,0 +1,2426 @@ + + + + + + + + Common-Library core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Common-Library core

+

Core Module - Common Library + - Adds some commonly used functions used in many modules

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
resources.color_presets
utils.game
util
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
type_check(value[, test_type=nil])Compare types faster for faster validation of params
type_check_error(value, test_type, error_message, level)Raises an error if the value is of the wrong type
param_check(value, test_type, param_name, param_number)Raises an error when the value is the incorrect type, uses a consistent error message format
player_return(value[, colour=defines.colour.white][, player=game.player])Will return a value of any type to the player/server console, allows colour for in-game players
write_json(path, tbl)Writes a table object to a file in json format
opt_require(path)Calls a require that will not error if the file is not found
ext_require(path, ...)Calls a require and returns only the keys given, file must return a table
format_time(ticks, options)Formats tick into a clean format, denominations from highest to lowest + long will use words rather than letters + time will use : separates + string will return a string not a locale string + when a denomination is false it will overflow into the next one
move_items(items[, surface=navies][, position={0][, radius=32][, chest_type=iron-chest])Moves items to the position and stores them in the closest entity of the type given
print_grid_value(value, surface, position, scale, offset, immutable)https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4a2/map_gen/maps/diggy/debug.lua#L31 + Prints a colored value on a location.
print_colored_grid_value(value, surface, position, offset, immutable, color_value, base_color, delta_color, under_bound, over_bound)Prints a colored value on a location.
clear_flying_text(surface)Clears all flying text entities on a surface
string_contains(s, contains)Tests if a string contains a given substring.
extract_keys(tbl, ...)Extracts certain keys from a table
enum(tbl)Converts a table to an enum
auto_complete(options, input[, use_key=false][, rtn_key=false])Returns the closest match to the input
table_values(tbl[, sorted][, as_string])Returns a copy of all of the values in the table.
table_keys(tbl[, sorted][, as_string])Returns a copy of all of the keys in the table.
table_alphanumsort(tbl)Returns the list is a sorted way that would be expected by people (this is by key)
table_keysort(tbl)Returns the list is a sorted way that would be expected by people (this is by key) (faster alternative than above)
format_chat_colour(message, color)Returns a message with valid chat tags to change its colour
format_chat_colour_localized(message, color)Returns a message with valid chat tags to change its colour, using localization
format_chat_player_name(player[, raw_string=false])Returns the players name in the players color
+ + +
+ + +

Dependencies

+
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + util +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + type_check(value[, test_type=nil]) +
+
+
+
+ +

Compare types faster for faster validation of params

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (any) + + the value to be tested + +
  • + + + + + +
  • + + test_type + + : + + (string) + + the type to test for if not given then it tests for nil + + (default: nil) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + is v of type test_type +
  • +
+ + + + + + + + Usage: +
type_check('foo','string') -- return true
+
type_check('foo') -- return false
+ + +
+
+
+
+ # + type_check_error(value, test_type, error_message, level) +
+
+
+
+ +

Raises an error if the value is of the wrong type

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (any) + + the value that you want to test the type of + +
  • + + + + + +
  • + + test_type + + : + + (string) + + the type that the value should be + +
  • + + + + + +
  • + + error_message + + : + + (string) + + the error message that is returned + +
  • + + + + + +
  • + + level + + : + + (number) + + the level to call the error on (level = 1 means the caller) + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if no error was called +
  • +
+ + + + + + + + Usage: +
type_check_error('foo','number','Value must be a number') -- will raise error "Value must be a number"
+ + +
+
+
+
+ # + param_check(value, test_type, param_name, param_number) +
+
+
+
+ +

Raises an error when the value is the incorrect type, uses a consistent error message format

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (any) + + the value that you want to test the type of + +
  • + + + + + +
  • + + test_type + + : + + (string) + + the type that the value should be + +
  • + + + + + +
  • + + param_name + + : + + (string) + + the name of the param + +
  • + + + + + +
  • + + param_number + + : + + (number) + + the number param it is + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if no error was raised +
  • +
+ + + + + + + + Usage: +
param_check('foo','number','repeat_count',2) -- will raise error "Invalid param #02 given to <anon>; repeat_count is not of type number"
+ + +
+
+
+
+ # + player_return(value[, colour=defines.colour.white][, player=game.player]) +
+
+
+
+ +

Will return a value of any type to the player/server console, allows colour for in-game players

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + + any value of any type that will be returned to the player or console + +
  • + + + + + +
  • + + colour + + : + + (defines.color or string) + + the colour of the text for the player, ignored when printing to console + + (default: defines.colour.white) +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that return will go to, if no game.player then returns to server + + (default: game.player) +
  • + + +
+ + + + + + + + + + + + Usage: +
player_return('Hello, World!') -- returns 'Hello, World!' to game.player or server console
+
player_return('Hello, World!','green') -- returns 'Hello, World!' to game.player with colour green or server console
+
player_return('Hello, World!',nil,player) -- returns 'Hello, World!' to the given player
+ + +
+
+
+
+ # + write_json(path, tbl) +
+
+
+
+ +

Writes a table object to a file in json format

+

+ + + Parameters: + +
    + + + + + +
  • + + path + + : + + (string) + + the path of the file to write include / to use dir + +
  • + + + + + +
  • + + tbl + + : + + (table) + + the table that will be converted to a json string and wrote to file + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + opt_require(path) +
+
+
+
+ +

Calls a require that will not error if the file is not found

+

+ + + Parameters: + +
    + + + + + +
  • + + path + + : + + (string) + + the path that you want to require + +
  • + + +
+ + + + + Returns: +
    +
  • + the returns from that file or nil, error if not loaded +
  • +
+ + + + + + + + Usage: +
local file = opt_require('file.not.present') -- will not cause any error
+ + +
+
+
+
+ # + ext_require(path, ...) +
+
+
+
+ +

Calls a require and returns only the keys given, file must return a table

+

+ + + Parameters: + +
    + + + + + +
  • + + path + + : + + (string) + + the path that you want to require + +
  • + + + + + +
  • + + ... + + : + + (string) + + the name of the keys that you want returned + +
  • + + +
+ + + + + Returns: +
    +
  • + the keys in the order given +
  • +
+ + + + + + + + Usage: +
local extract, param_check = ext_require('expcore.common','extract','param_check') --- @dep expcore.common
+ + +
+
+
+
+ # + format_time(ticks, options) +
+
+
+
+ +

Formats tick into a clean format, denominations from highest to lowest + long will use words rather than letters + time will use : separates + string will return a string not a locale string + when a denomination is false it will overflow into the next one

+

+ + + Parameters: + +
    + + + + + +
  • + + ticks + + : + + (number) + + the number of ticks that represents a time + +
  • + + + + + +
  • + + options + + : + + (table) + + table a of options to use for the format + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + a locale string that can be used +
  • +
+ + + + + + + + + +
+
+
+
+ # + move_items(items[, surface=navies][, position={0][, radius=32][, chest_type=iron-chest]) +
+
+
+
+ +

Moves items to the position and stores them in the closest entity of the type given

+

+ + + Parameters: + +
    + + + + + +
  • + + items + + : + + (table) + + items which are to be added to the chests, ['name']=count + +
  • + + + + + +
  • + + surface + + : + + (LuaSurface) + + the surface that the items will be moved to + + (default: navies) +
  • + + + + + +
  • + + position + + : + + (table) + + the position that the items will be moved to {x=100,y=100} + + (default: {0) +
  • + + + + + +
  • + + radius + + : + + (number) + + the radius in which the items are allowed to be placed + + (default: 32) +
  • + + + + + +
  • + + chest_type + + : + + (string) + + the chest type that the items should be moved into + + (default: iron-chest) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + print_grid_value(value, surface, position, scale, offset, immutable) +
+
+
+
+ +

https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4a2/map_gen/maps/diggy/debug.lua#L31 + Prints a colored value on a location.

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + + between -1 and 1 + +
  • + + + + + +
  • + + surface + + : + + + LuaSurface + +
  • + + + + + +
  • + + position + + : + + + Position {x, y} + +
  • + + + + + +
  • + + scale + + : + + + float + +
  • + + + + + +
  • + + offset + + : + + + float + +
  • + + + + + +
  • + + immutable + + : + + + bool if immutable, only set, never do a surface lookup, values never change + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + print_colored_grid_value(value, surface, position, offset, immutable, color_value, base_color, delta_color, under_bound, over_bound) +
+
+
+
+ +

Prints a colored value on a location.

+

When given a color_value and a delta_color, + will change the color of the text from the base to base + value * delta. This will + make the color of the text range from 'base_color' to 'base_color + delta_color' + as the color_value ranges from 0 to 1

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + + of number to be displayed + +
  • + + + + + +
  • + + surface + + : + + + LuaSurface + +
  • + + + + + +
  • + + position + + : + + + Position {x, y} + +
  • + + + + + +
  • + + offset + + : + + + float position offset + +
  • + + + + + +
  • + + immutable + + : + + + bool if immutable, only set, never do a surface lookup, values never change + +
  • + + + + + +
  • + + color_value + + : + + + float How far along the range of values of colors the value is to be displayed + +
  • + + + + + +
  • + + base_color + + : + + + {r,g,b} The color for the text to be if color_value is 0 + +
  • + + + + + +
  • + + delta_color + + : + + + {r,g,b} The amount to correct the base_color if color_value is 1 + +
  • + + + + + +
  • + + under_bound + + : + + + {r,g,b} The color to be used if color_value < 0 + +
  • + + + + + +
  • + + over_bound + + : + + + {r,g,b} The color to be used if color_value > 1 + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + clear_flying_text(surface) +
+
+
+
+ +

Clears all flying text entities on a surface

+

+ + + Parameters: + +
    + + + + + +
  • + + surface + + : + + (LuaSurface) + + the surface to clear + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + string_contains(s, contains) +
+
+
+
+ +

Tests if a string contains a given substring.

+

+ + + Parameters: + +
    + + + + + +
  • + + s + + : + + (string) + + the string to check for the substring + +
  • + + + + + +
  • + + contains + + : + + (string) + + the substring to test for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the substring was found in the string +
  • +
+ + + + + + + + + +
+
+
+
+ # + extract_keys(tbl, ...) +
+
+
+
+ +

Extracts certain keys from a table

+

+ + + Parameters: + +
    + + + + + +
  • + + tbl + + : + + (table) + + table the which contains the keys + +
  • + + + + + +
  • + + ... + + : + + (string) + + the names of the keys you want extracted + +
  • + + +
+ + + + + Returns: +
    +
  • + the keys in the order given +
  • +
+ + + + + + + + Usage: +
local key_three, key_one = extract({key_one='foo',key_two='bar',key_three=true},'key_three','key_one')
+ + +
+
+
+
+ # + enum(tbl) +
+
+
+
+ +

Converts a table to an enum

+

+ + + Parameters: + +
    + + + + + +
  • + + tbl + + : + + (table) + + table the that will be converted + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new table that acts like an enum +
  • +
+ + + + + + + + + +
+
+
+
+ # + auto_complete(options, input[, use_key=false][, rtn_key=false]) +
+
+
+
+ +

Returns the closest match to the input

+

+ + + Parameters: + +
    + + + + + +
  • + + options + + : + + (table) + + table a of options for the auto complete + +
  • + + + + + +
  • + + input + + : + + (string) + + string the input that will be completed + +
  • + + + + + +
  • + + use_key + + : + + (boolean) + + when true the keys of options will be used as the options + + (default: false) +
  • + + + + + +
  • + + rtn_key + + : + + (boolean) + + when true the the key will be returned rather than the value + + (default: false) +
  • + + +
+ + + + + Returns: +
    +
  • + the list item found that matches the input +
  • +
+ + + + + + + + + +
+
+
+
+ # + table_values(tbl[, sorted][, as_string]) +
+
+
+
+ +

Returns a copy of all of the values in the table.

+

+ + + Parameters: + +
    + + + + + +
  • + + tbl + + : + + (table) + + the to copy the keys from, or an empty table if tbl is nil + +
  • + + + + + +
  • + + sorted + + : + + (boolean) + + whether to sort the keys (slower) or keep the random order from pairs() + + (optional) +
  • + + + + + +
  • + + as_string + + : + + (boolean) + + whether to try and parse the values as strings, or leave them as their existing type + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (array) + an array with a copy of all the values in the table +
  • +
+ + + + + + + + + +
+
+
+
+ # + table_keys(tbl[, sorted][, as_string]) +
+
+
+
+ +

Returns a copy of all of the keys in the table.

+

+ + + Parameters: + +
    + + + + + +
  • + + tbl + + : + + (table) + + the to copy the keys from, or an empty table if tbl is nil + +
  • + + + + + +
  • + + sorted + + : + + (boolean) + + whether to sort the keys (slower) or keep the random order from pairs() + + (optional) +
  • + + + + + +
  • + + as_string + + : + + (boolean) + + whether to try and parse the keys as strings, or leave them as their existing type + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (array) + an array with a copy of all the keys in the table +
  • +
+ + + + + + + + + +
+
+
+
+ # + table_alphanumsort(tbl) +
+
+
+
+ +

Returns the list is a sorted way that would be expected by people (this is by key)

+

+ + + Parameters: + +
    + + + + + +
  • + + tbl + + : + + (table) + + the table to be sorted + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the sorted table +
  • +
+ + + + + + + + + +
+
+
+
+ # + table_keysort(tbl) +
+
+
+
+ +

Returns the list is a sorted way that would be expected by people (this is by key) (faster alternative than above)

+

+ + + Parameters: + +
    + + + + + +
  • + + tbl + + : + + (table) + + the table to be sorted + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the sorted table +
  • +
+ + + + + + + + + +
+
+
+
+ # + format_chat_colour(message, color) +
+
+
+
+ +

Returns a message with valid chat tags to change its colour

+

+ + + Parameters: + +
    + + + + + +
  • + + message + + : + + (string) + + the message that will be in the output + +
  • + + + + + +
  • + + color + + : + + (table) + + a color which contains r,g,b as its keys + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the message with the color tags included +
  • +
+ + + + + + + + + +
+
+
+
+ # + format_chat_colour_localized(message, color) +
+
+
+
+ +

Returns a message with valid chat tags to change its colour, using localization

+

+ + + Parameters: + +
    + + + + + +
  • + + message + + : + + (string or table) + + the message that will be in the output + +
  • + + + + + +
  • + + color + + : + + (table) + + a color which contains r,g,b as its keys + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the message with the color tags included +
  • +
+ + + + + + + + + +
+
+
+
+ # + format_chat_player_name(player[, raw_string=false]) +
+
+
+
+ +

Returns the players name in the players color

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to use the name and color of + +
  • + + + + + +
  • + + raw_string + + : + + (boolean) + + when true a is returned rather than a localized string + + (default: false) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the players name with tags for the players color +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Gui.html b/doc/core/Gui.html new file mode 100644 index 00000000..cc61f4e7 --- /dev/null +++ b/doc/core/Gui.html @@ -0,0 +1,10995 @@ + + + + + + + + Gui core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Gui core

+

Core Module - Gui + - 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 separate files in ./gui + - please read the files for more documentation that cant be shown here + - please note there is a rework planned but not started

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.instances
expcore.gui.elements.buttons
expcore.gui.elements.checkbox
expcore.gui.elements.dropdown
expcore.gui.elements.slider
expcore.gui.elements.text
expcore.gui.elements.elem-button
expcore.gui.elements.progress-bar
expcore.gui.concepts.toolbar
expcore.gui.concepts.left
expcore.gui.concepts.center
expcore.gui.concepts.popups
+ + +

Center Guis

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.gui.concepts.toolbar
utils.game
CenterFrames.get_flow(player)Gets the center flow for a player
CenterFrames.clear_flow(player)Clears the center flow for a player
CenterFrames.draw_frame(player, name)Draws the center frame for a player, if already open then will do nothing
CenterFrames.redraw_frame(player, name)Draws the center frame for a player, if already open then will destroy it and redraw
CenterFrames.toggle_frame(player, name[, state])Toggles if the frame is currently open or not, will open if closed and close if open
CenterFrames.new_frame(permission_name)Creates a new center frame define
CenterFrames._prototype:set_auto_focus([state=true])Sets the frame to be the current active gui when opened and closes all other frames
CenterFrames._prototype:draw_frame(player)Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)
CenterFrames._prototype:redraw_frame(player)Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)
CenterFrames._prototype:toggle_frame(player)Toggles if the frame is open, if open it will close it and if closed it will open it
CenterFrames._prototype:event_handler([action=update])Creates an event handler that will trigger one of its functions, use with Event.add
+ + +

Left Guis

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.gui.concepts.toolbar
expcore.gui.elements.buttons
mod-gui
utils.game
utils.event
LeftFrames.get_flow(player)Gets the left frame flow for a player
LeftFrames.get_frame(name, player)Gets one frame from the left flow by its name
LeftFrames.get_open(player)Gets all open frames for a player, if non are open it will remove the close all button
LeftFrames.toggle_frame(name, player[, state])Toggles the visibility of a left frame, or sets its visibility state
LeftFrames.new_frame(permission_name)Creates a new left frame define
LeftFrames._prototype:set_open_by_default([state=true])Sets if the frame is visible when a player joins, can also be a function to return a boolean
LeftFrames._prototype:set_direction(direction)Sets the direction of the frame, either vertical or horizontal
LeftFrames._prototype:_internal_draw(player)Creates the gui for the first time, used internally
LeftFrames._prototype:get_frame(player)Gets the frame for this define from the left frame flow
LeftFrames._prototype:is_open(player)Returns if the player currently has this define visible
LeftFrames._prototype:toggle(player)Toggles the visibility of the left frame
LeftFrames._prototype:update(player)Updates the contents of the left frame, first tries update callback, other wise will clear and redraw
LeftFrames._prototype:update_all([update_offline=false])Updates the frame for all players, see update
LeftFrames._prototype:redraw(player)Redraws the frame by calling on_draw, will always clear the frame
LeftFrames._prototype:redraw_all([update_offline=false])Redraws the frame for all players, see redraw
LeftFrames._prototype:event_handler([action=update])Creates an event handler that will trigger one of its functions, use with Event.add
+ + +

Popups

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
utils.event
expcore.gui.elements.progress-bar
expcore.gui.elements.buttons
mod-gui
resources.color_presets
utils.global
PopupFrames.get_flow(player)Gets the left flow that contains the popup frames
PopupFrames.open(define_name, player[, open_time], ...)Opens a popup for the player, can give the amount of time it is open as well as params for the draw function
PopupFrames.close_progressProgress bar which when depleted will close the popup frame
PopupFrames.close_buttonA button which can be used to close the gui before the timer runs out
PopupFrames.new_popup([name])Creates a new popup frame define
PopupFrames._prototype:set_default_open_time(amount)Sets the default open time for the popup, will be used if non is provided with open
PopupFrames._prototype:open(player[, open_time], ...)Opens this define for a player, can be given open time and any other params for the draw function
+ + +

Toolbar

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.elements.buttons
expcore.roles
utils.event
utils.game
mod-gui
Toolbar.new_button([name])Adds a new button to the toolbar
Toolbar.add_button(button)Adds an existing buttton to the toolbar
Toolbar.update(player)Updates the player's toolbar with an new buttons or expected change in auth return
+ + +

Core

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
utils.gui
utils.game
new_define(prototype[, debug_name])Used to create new element defines from a class prototype, please use the own given by the class
get_define(name[, internal])Gets an element define give the uid, debug name or a copy of the element define
categorize_by_player(element)A categorize function to be used with add_store, each player has their own value
categorize_by_force(element)A categorize function to be used with add_store, each force has its own value
categorize_by_surface(element)A categorize function to be used with add_store, each surface has its own value
draw(name, element)Draws a copy of the element define to the parent element, see draw_to
toggle_enabled(element)Will toggle the enabled state of an element
toggle_visible(element)Will toggle the visiblity of an element
set_padding(element[, up=0][, down=0][, left=0][, right=0])Sets the padding for a gui element
set_padding_style(style[, up=0][, down=0][, left=0][, right=0])Sets the padding for a gui style
create_alignment(element[, name][, horizontal_align='right'][, vertical_align='center'])Allows the creation of an alignment flow to place elements into
destroy_if_valid(element)Destroies an element but tests for it being present and valid first
create_scroll_table(element, table_size, maximal_height[, name='scroll'])Creates a scroll area with a table inside, table can be any size
create_header(element, caption[, tooltip][, right_align][, name='header'])Creates a header section with a label and button area
+ + +

Buttons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mod-gui
expcore.gui.core
expcore.gui.prototype
Button.new_button([name])Creates a new button element define
Button._prototype:set_sprites(sprite[, hovered_sprite][, clicked_sprite])Adds sprites to a button making it a sprite button
Button._prototype:set_click_filter(filter[, ...])Adds a click / mouse button filter to the button
Button._prototype:set_key_filter(filter[, ...])Adds a control key filter to the button
+ + +

Checkboxs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.store
utils.game
Checkbox.new_checkbox([name])Creates a new checkbox element define
Checkbox.new_radiobutton([name])Creates a new radiobutton element define, has all functions checkbox has
Checkbox._prototype_radiobutton:add_as_option(option_set, option_name)Adds this radiobutton to be an option in the given option set (only one can be true at a time)
Checkbox._prototype_radiobutton:get_store(category, internal)Gets the stored value of the radiobutton or the option set if present
Checkbox._prototype_radiobutton:set_store(category, value, internal)Sets the stored value of the radiobutton or the option set if present
Checkbox.new_option_set(name, callback, categorize)Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
Checkbox.draw_option_set(name, element)Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)
Checkbox.reset_radiobuttons(element[, exclude][, recursive=false])Sets all radiobutton in a element to false (unless excluded) and can act recursively
+ + +

Dropdowns

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
Dropdown.new_dropdown([name])Creates a new dropdown element define
Dropdown.new_list_box([name])Creates a new list box element define
Dropdown._prototype:new_static_options(options[, ...], the)Adds new static options to the dropdown which will trigger the general callback
Dropdown._prototype:new_dynamic_options(callback)Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options)
Dropdown._prototype:add_option_callback(option, callback)Adds a case specific callback which will only run when that option is selected (general case still triggered)
Dropdown.select_value(element, value)Selects the option from a dropdown or list box given the value rather than key
Dropdown.get_selected_value(element)Returns the currently selected value rather than index
+ + +

Elem Buttons

+ + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
ElemButton.new_elem_button([name])Creates a new elem button element define
ElemButton._prototype.set_typeSets the type of the elem button, the type is required so this must be called at least once
ElemButton._prototype:set_default(value)Sets the default value for the elem button, this may be a function or a string
+ + +

Progress Bars

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.global
utils.game
ProgressBar.set_maximum(element, amount)Sets the maximum value that represents the end value of the progress bar
ProgressBar.increment(element[, amount=1])Increases the value of the progressbar, if a define is given all of its instances have incremented
ProgressBar.decrement(element[, amount=1])Decreases the value of the progressbar, if a define is given all of its instances have decremented
ProgressBar.new_progressbar([name])Creates a new progressbar element define
ProgressBar._prototype:set_default_maximum(amount)Sets the maximum value that represents the end value of the progress bar
ProgressBar._prototype:use_count_down([state=true])Will set the progress bar to start at 1 and trigger when it hits 0
ProgressBar._prototype:increment([amount=1][, category])Increases the value of the progressbar
ProgressBar._prototype:increment_filtered([amount=1], filter)Increases the value of the progressbar, if the filter condition is met, does not work with store
ProgressBar._prototype:decrement([amount=1][, category])Decreases the value of the progressbar
ProgressBar._prototype:decrement_filtered([amount=1], filter)Decreases the value of the progressbar, if the filter condition is met, does not work with store
ProgressBar._prototype:add_element(element[, maximum])Adds an element into the list of instances that will are waiting to complete, does not work with store + note use store if you want persistent data, this only stores the elements not the values which they have
ProgressBar._prototype:reset_element(element)Resets an element, or its store, to be back at the start, either 1 or 0
ProgressBar._prototype:event_counter([filter])Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented
ProgressBar._prototype:event_countdown([filter])Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented
+ + +

Sliders

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.gui.instances
utils.game
Slider.new_slider([name])Creates a new slider element define
Slider._prototype:set_range([min][, max])Sets the range of a slider, if not used will use default values for a slider
Slider._prototype:draw_label(element)Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player
Slider._prototype:enable_auto_draw_label([state=true])Enables auto draw of the label, the label will share the same parent element as the slider
+ + +

Text

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
Text.new_text_field([name])Creates a new text field element define
Text.new_text_box([name])Creates a new text box element define
Text._prototype_box:set_selectable([state=true])Sets the text box to be selectable
Text._prototype_box:set_word_wrap([state=true])Sets the text box to have word wrap
Text._prototype_box:set_read_only([state=true])Sets the text box to be read only
+ + +

Instances

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
utils.global
Instances.has_categories(name)Returns if a instance group has a categorise function; must be registered
Instances.is_registered(name)Returns if the given name is a registered instance group
Instances.register(name[, categorise])Registers the name of an instance group to allow for storing element instances
Instances.add_element(name, element)Adds an element to the instance group under the correct category; must be registered
Instances.get_elements_raw(name[, category])Gets all element instances without first removing any invalid ones; used internally and must be registered
Instances.get_valid_elements(name[, category][, callback])Gets all valid element instances and has the option of running a callback on those that are valid
Instances.unregistered_add_element(name, category, element)A version of add_element that does not require the group to be registered
Instances.unregistered_get_elements(name, category[, callback])A version of get_elements that does not require the group to be registered
+ + +

Prototype

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
utils.game
expcore.store
expcore.gui.instances
Constructor.event(event_name)Creates a new function to add functions to an event handler
Constructor.extend(new_prototype)Extents a prototype with the base functions of all gui prototypes, no metatables
Constructor.store(sync, callback)Creates a new function which adds a store to a gui define
Constructor.setter(value_type, key[, second_key])Creates a setter function that checks the type when a value is set
Prototype:uid()Gets the uid for the element define
Prototype.debug_nameSets a debug alias for the define
Prototype.set_captionSets the caption for the element define
Prototype.set_tooltipSets the tooltip for the element define
Prototype.set_pre_authenticatorSets an authenticator that blocks the draw function if check fails
Prototype.set_post_authenticatorSets an authenticator that disables the element if check fails
Prototype.on_drawRegisters a callback to the on_draw event
Prototype.on_style_updateRegisters a callback to the on_style_update event
Prototype:set_style(style[, callback])Sets the style for the element define
Prototype:set_embedded_flow(state)Sets the element to be drawn inside a nameless flow, can be given a name using a function
Prototype:raise_event(event_name, ...)Raises a custom event for this define, any number of params can be given
Prototype:draw_to(element)The main function for defines, when called will draw an instance of this define to the given element + what is drawn is based on the data in draw_data which is set using other functions
Prototype:get_store(category)Gets the value in this elements store, category needed if categorize function used
Prototype:set_store(category, value)Sets the value in this elements store, category needed if categorize function used
Prototype:clear_store([category])Sets the value in this elements store to nil, category needed if categorize function used
+ + +

Test

+ + + + + + + + + + + + + + + + + + + +
expcore.gui
expcore.common
resources.color_presets
utils.event
expcore.store
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.instances +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.checkbox +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.dropdown +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.slider +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.text +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.elem-button +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.progress-bar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.toolbar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.left +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.center +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.popups +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Center Guis

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.toolbar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + CenterFrames.get_flow(player) +
+
+
+
+ +

Gets the center flow for a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow for + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames.clear_flow(player) +
+
+
+
+ +

Clears the center flow for a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the flow for + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + CenterFrames.draw_frame(player, name) +
+
+
+
+ +

Draws the center frame for a player, if already open then will do nothing

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the frame drawn + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the hui that will drawn + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames.redraw_frame(player, name) +
+
+
+
+ +

Draws the center frame for a player, if already open then will destroy it and redraw

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the frame drawn + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the hui that will drawn + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames.toggle_frame(player, name[, state]) +
+
+
+
+ +

Toggles if the frame is currently open or not, will open if closed and close if open

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the frame toggled + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the hui that will be toggled + +
  • + + + + + +
  • + + state + + : + + (boolean) + + when set will force a state for the frame + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + if the frame if no open or closed +
  • +
+ + + + + + + + + +
+
+
+
+ # + CenterFrames.new_frame(permission_name) +
+
+
+
+ +

Creates a new center frame define

+

+ + + Parameters: + +
    + + + + + +
  • + + permission_name + + : + + (string) + + the name that can be used with the permission system + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new center frame define +
  • +
+ + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:set_auto_focus([state=true]) +
+
+
+
+ +

Sets the frame to be the current active gui when opened and closes all other frames

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when true will auto close other frames and set this frame as player.opened + + (default: true) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:draw_frame(player) +
+
+
+
+ +

Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame for + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:redraw_frame(player) +
+
+
+
+ +

Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame for + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:toggle_frame(player) +
+
+
+
+ +

Toggles if the frame is open, if open it will close it and if closed it will open it

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + with the gui frame is now open +
  • +
+ + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:event_handler([action=update]) +
+
+
+
+ +

Creates an event handler that will trigger one of its functions, use with Event.add

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + the action to take on this event + + (default: update) +
  • + + +
+ + + + + + + + + + + + + +
+
+

Left Guis

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.toolbar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames.get_flow(player) +
+
+
+
+ +

Gets the left frame flow for a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow of + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + LeftFrames.get_frame(name, player) +
+
+
+
+ +

Gets one frame from the left flow by its name

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the gui frame to get + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame in the left frame flow with that name +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames.get_open(player) +
+
+
+
+ +

Gets all open frames for a player, if non are open it will remove the close all button

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow of + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains all the open (and registered) frames for the player +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames.toggle_frame(name, player[, state]) +
+
+
+
+ +

Toggles the visibility of a left frame, or sets its visibility state

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the gui frame to toggle + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + + + + +
  • + + state + + : + + (boolean) + + when given will be the state that the visibility is set to + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the new state of the visibility +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames.new_frame(permission_name) +
+
+
+
+ +

Creates a new left frame define

+

+ + + Parameters: + +
    + + + + + +
  • + + permission_name + + : + + (string) + + the name that can be used with the permission system + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new left frame define +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:set_open_by_default([state=true]) +
+
+
+
+ +

Sets if the frame is visible when a player joins, can also be a function to return a boolean

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean or 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 + + (default: true) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:set_direction(direction) +
+
+
+
+ +

Sets the direction of the frame, either vertical or horizontal

+

+ + + Parameters: + +
    + + + + + +
  • + + direction + + : + + (string) + + the direction to have the elements be added to the frame + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:_internal_draw(player) +
+
+
+
+ +

Creates the gui for the first time, used internally

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame to + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:get_frame(player) +
+
+
+
+ +

Gets the frame for this define from the left frame flow

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame in the left frame flow for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:is_open(player) +
+
+
+
+ +

Returns if the player currently has this define visible

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if it is open/visible +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:toggle(player) +
+
+
+
+ +

Toggles the visibility of the left frame

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to toggle the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the new state of the visibility +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:update(player) +
+
+
+
+ +

Updates the contents of the left frame, first tries update callback, other wise will clear and redraw

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to update the frame of + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:update_all([update_offline=false]) +
+
+
+
+ +

Updates the frame for all players, see update

+

+ + + Parameters: + +
    + + + + + +
  • + + update_offline + + : + + (boolean) + + when true will update the frame for offline players + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:redraw(player) +
+
+
+
+ +

Redraws the frame by calling on_draw, will always clear the frame

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to update the frame of + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:redraw_all([update_offline=false]) +
+
+
+
+ +

Redraws the frame for all players, see redraw

+

+ + + Parameters: + +
    + + + + + +
  • + + update_offline + + : + + (boolean) + + when true will update the frame for offline players + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:event_handler([action=update]) +
+
+
+
+ +

Creates an event handler that will trigger one of its functions, use with Event.add

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + the action to take on this event + + (default: update) +
  • + + +
+ + + + + + + + + + + + + +
+
+

Popups

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.progress-bar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + PopupFrames.get_flow(player) +
+
+
+
+ +

Gets the left flow that contains the popup frames

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow for + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the left flow that contains the popup frames +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames.open(define_name, player[, open_time], ...) +
+
+
+
+ +

Opens a popup for the player, can give the amount of time it is open as well as params for the draw function

+

+ + + Parameters: + +
    + + + + + +
  • + + define_name + + : + + (string) + + the name of the define that you want to open for the player + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to open the popup for + +
  • + + + + + +
  • + + open_time + + : + + (number) + + the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default + + (optional) +
  • + + + + + +
  • + + ... + + : + + (any) + + the other params that you want to pass to your on_draw event + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame that was drawn, the inner gui flow which contains the content +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames.close_progress +
+
+
+
+ +

Progress bar which when depleted will close the popup frame

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + PopupFrames.close_button +
+
+
+
+ +

A button which can be used to close the gui before the timer runs out

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + PopupFrames.new_popup([name]) +
+
+
+
+ +

Creates a new popup frame define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new popup frame define +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames._prototype:set_default_open_time(amount) +
+
+
+
+ +

Sets the default open time for the popup, will be used if non is provided with open

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the number of ticks, by default, the popup will be open for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames._prototype:open(player[, open_time], ...) +
+
+
+
+ +

Opens this define for a player, can be given open time and any other params for the draw function

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to open the popup for + +
  • + + + + + +
  • + + open_time + + : + + (number) + + the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default + + (optional) +
  • + + + + + +
  • + + ... + + : + + (any) + + the other params that you want to pass to your on_draw event + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame that was drawn, the inner gui flow which contains the content +
  • +
+ + + + + + + + + +
+
+

Toolbar

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Toolbar.new_button([name]) +
+
+
+
+ +

Adds a new button to the toolbar

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + when given allows an alias to the button for the permission system + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the button define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Toolbar.add_button(button) +
+
+
+
+ +

Adds an existing buttton to the toolbar

+

+ + + Parameters: + +
    + + + + + +
  • + + button + + : + + (table) + + the button define for the button to be added + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Toolbar.update(player) +
+
+
+
+ +

Updates the player's toolbar with an new buttons or expected change in auth return

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to update the toolbar for + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Core

+
+
+
+
+ # + utils.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + new_define(prototype[, debug_name]) +
+
+
+
+ +

Used to create new element defines from a class prototype, please use the own given by the class

+

+ + + Parameters: + +
    + + + + + +
  • + + prototype + + : + + (table) + + the class prototype that will be used for the element define + +
  • + + + + + +
  • + + debug_name + + : + + (string) + + the name that you want to see while debuging + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new element define with all functions accessed via __index metamethod +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_define(name[, internal]) +
+
+
+
+ +

Gets an element define give the uid, debug name or a copy of the element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string or table) + + the uid, debug name or define for the element define to get + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + when true the error trace is one level higher (used internally) + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the element define that was found or an error +
  • +
+ + + + + + + + + +
+
+
+
+ # + categorize_by_player(element) +
+
+
+
+ +

A categorize function to be used with add_store, each player has their own value

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that will be converted to a string + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the player's name who owns this element +
  • +
+ + + + + + + + + +
+
+
+
+ # + categorize_by_force(element) +
+
+
+
+ +

A categorize function to be used with add_store, each force has its own value

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that will be converted to a string + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the player's force name who owns this element +
  • +
+ + + + + + + + + +
+
+
+
+ # + categorize_by_surface(element) +
+
+
+
+ +

A categorize function to be used with add_store, each surface has its own value

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that will be converted to a string + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the player's surface name who owns this element +
  • +
+ + + + + + + + + +
+
+
+
+ # + draw(name, element) +
+
+
+
+ +

Draws a copy of the element define to the parent element, see draw_to

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string or table) + + the uid, debug name or define for the element define to draw + +
  • + + + + + +
  • + + element + + : + + (LuaGuiEelement) + + the parent element that it the define will be drawn to + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + toggle_enabled(element) +
+
+
+
+ +

Will toggle the enabled state of an element

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the gui element to toggle + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the new state that the element has +
  • +
+ + + + + + + + + +
+
+
+
+ # + toggle_visible(element) +
+
+
+
+ +

Will toggle the visiblity of an element

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the gui element to toggle + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the new state that the element has +
  • +
+ + + + + + + + + +
+
+
+
+ # + set_padding(element[, up=0][, down=0][, left=0][, right=0]) +
+
+
+
+ +

Sets the padding for a gui element

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to set the padding for + +
  • + + + + + +
  • + + up + + : + + (number) + + the amount of padding on the top + + (default: 0) +
  • + + + + + +
  • + + down + + : + + (number) + + the amount of padding on the bottom + + (default: 0) +
  • + + + + + +
  • + + left + + : + + (number) + + the amount of padding on the left + + (default: 0) +
  • + + + + + +
  • + + right + + : + + (number) + + the amount of padding on the right + + (default: 0) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + set_padding_style(style[, up=0][, down=0][, left=0][, right=0]) +
+
+
+
+ +

Sets the padding for a gui style

+

+ + + Parameters: + +
    + + + + + +
  • + + style + + : + + (LuaStyle) + + the element to set the padding for + +
  • + + + + + +
  • + + up + + : + + (number) + + the amount of padding on the top + + (default: 0) +
  • + + + + + +
  • + + down + + : + + (number) + + the amount of padding on the bottom + + (default: 0) +
  • + + + + + +
  • + + left + + : + + (number) + + the amount of padding on the left + + (default: 0) +
  • + + + + + +
  • + + right + + : + + (number) + + the amount of padding on the right + + (default: 0) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + create_alignment(element[, name][, horizontal_align='right'][, vertical_align='center']) +
+
+
+
+ +

Allows the creation of an alignment flow to place elements into

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to add this alignment into + +
  • + + + + + +
  • + + name + + : + + (string) + + the name to use for the alignment + + (optional) +
  • + + + + + +
  • + + horizontal_align + + : + + (string) + + the horizontal alignment of the elements in this flow + + (default: 'right') +
  • + + + + + +
  • + + vertical_align + + : + + (string) + + the vertical alignment of the elements in this flow + + (default: 'center') +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + destroy_if_valid(element) +
+
+
+
+ +

Destroies an element but tests for it being present and valid first

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to be destroied + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if it was destoried +
  • +
+ + + + + + + + + +
+
+
+
+ # + create_scroll_table(element, table_size, maximal_height[, name='scroll']) +
+
+
+
+ +

Creates a scroll area with a table inside, table can be any size

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to add this scroll into + +
  • + + + + + +
  • + + table_size + + : + + (number) + + the number of columns in the table + +
  • + + + + + +
  • + + maximal_height + + : + + (number) + + the max hieght of the scroll + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the scoll element + + (default: 'scroll') +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + create_header(element, caption[, tooltip][, right_align][, name='header']) +
+
+
+
+ +

Creates a header section with a label and button area

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to add this header into + +
  • + + + + + +
  • + + caption + + : + + (localeString) + + the caption that is used as the title + +
  • + + + + + +
  • + + tooltip + + : + + (localeString) + + the tooltip that is shown on the caption + + (optional) +
  • + + + + + +
  • + + right_align + + : + + (boolean) + + when true will include the right align area + + (optional) +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the header area + + (default: 'header') +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the header that was made, or the align area if that was created +
  • +
+ + + + + + + + + +
+
+

Buttons

+
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Button.new_button([name]) +
+
+
+
+ +

Creates a new button element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Button._prototype:set_sprites(sprite[, hovered_sprite][, clicked_sprite]) +
+
+
+
+ +

Adds sprites to a button making it a sprite button

+

+ + + Parameters: + +
    + + + + + +
  • + + sprite + + : + + (SpritePath) + + the sprite path for the default sprite for the button + +
  • + + + + + +
  • + + hovered_sprite + + : + + (SpritePath) + + the sprite path for the sprite when the player hovers over the button + + (optional) +
  • + + + + + +
  • + + clicked_sprite + + : + + (SpritePath) + + the sprite path for the sprite when the player clicks the button + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + returns the button define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Button._prototype:set_click_filter(filter[, ...]) +
+
+
+
+ +

Adds a click / mouse button filter to the button

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (table) + + ?string|table either a of mouse buttons or the first mouse button to filter, with a table true means allowed + +
  • + + + + + +
  • + + ... + + : + + (table) + + when filter is not a you can add the mouse buttons one after each other + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + returns the button define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Button._prototype:set_key_filter(filter[, ...]) +
+
+
+
+ +

Adds a control key filter to the button

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (table) + + ?string|table either a of control keys or the first control keys to filter, with a table true means allowed + +
  • + + + + + +
  • + + ... + + : + + (table) + + when filter is not a you can add the control keys one after each other + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + returns the button define to allow chaining +
  • +
+ + + + + + + + + +
+
+

Checkboxs

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Checkbox.new_checkbox([name]) +
+
+
+
+ +

Creates a new checkbox element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new checkbox element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.new_radiobutton([name]) +
+
+
+
+ +

Creates a new radiobutton element define, has all functions checkbox has

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:add_as_option(option_set, option_name) +
+
+
+
+ +

Adds this radiobutton to be an option in the given option set (only one can be true at a time)

+

+ + + Parameters: + +
    + + + + + +
  • + + option_set + + : + + (string) + + the name of the option set to add this element to + +
  • + + + + + +
  • + + option_name + + : + + (string) + + the name of this option that will be used to identify it + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:get_store(category, internal) +
+
+
+
+ +

Gets the stored value of the radiobutton or the option set if present

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + used to prevent stackover flow + +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the value that is stored for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:set_store(category, value, internal) +
+
+
+
+ +

Sets the stored value of the radiobutton or the option set if present

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + value + + : + + (boolean) + + the value to set for this define, must be valid for its type ie for checkbox etc + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + used to prevent stackover flow + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.new_option_set(name, callback, categorize) +
+
+
+
+ +

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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.draw_option_set(name, element) +
+
+
+
+ +

Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the option set to draw the radiobuttons of + +
  • + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the parent element that the radiobuttons will be drawn to + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Checkbox.reset_radiobuttons(element[, exclude][, recursive=false]) +
+
+
+
+ +

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) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if successful +
  • +
+ + + + + + + + + +
+
+

Dropdowns

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Dropdown.new_dropdown([name]) +
+
+
+
+ +

Creates a new dropdown element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new dropdown element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown.new_list_box([name]) +
+
+
+
+ +

Creates a new list box element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new list box element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown._prototype:new_static_options(options[, ...], the) +
+
+
+
+ +

Adds new static options to the dropdown which will trigger the general callback

+

+ + + Parameters: + +
    + + + + + +
  • + + options + + : + + (table) + + ?string|table either a of option strings or the first option string, with a table values are the options + +
  • + + + + + +
  • + + ... + + : + + (table) + + when options is not a you can add the options one after each other + + (optional) +
  • + + + + + +
  • + + the + + : + + (self) + + define to allow chaining + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Dropdown._prototype:new_dynamic_options(callback) +
+
+
+
+ +

Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options)

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + the function that will run to get the options for the dropdown + callback param - player LuaPlayer - the player that the element is being drawn to + callback param - element LuaGuiElement - the element that is being drawn + callback return - table - the values of this table will be appended to the static options of the dropdown + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown._prototype:add_option_callback(option, callback) +
+
+
+
+ +

Adds a case specific callback which will only run when that option is selected (general case still triggered)

+

+ + + Parameters: + +
    + + + + + +
  • + + option + + : + + (string) + + the name of the option to trigger the callback on; if not already added then will be added as an option + +
  • + + + + + +
  • + + callback + + : + + (function) + + the function that will be called when that option is selected + callback param - player LuaPlayer - the player who owns the gui element + callback param - element LuaGuiElement - the element which is being effected + callback param - value string - the new option that has been selected + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown.select_value(element, value) +
+
+
+
+ +

Selects the option from a dropdown or list box given the value rather than key

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that contains the option + +
  • + + + + + +
  • + + value + + : + + (string) + + the option to select from the dropdown + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the key where the value was +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown.get_selected_value(element) +
+
+
+
+ +

Returns the currently selected value rather than index

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the gui element that you want to get the value of + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the value that is currently selected +
  • +
+ + + + + + + + + +
+
+

Elem Buttons

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + ElemButton.new_elem_button([name]) +
+
+
+
+ +

Creates a new elem button element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new elem button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + ElemButton._prototype.set_type +
+
+
+
+ +

Sets the type of the elem button, the type is required so this must be called at least once

+

+ + + +
    + + + + + +
  • + + type + + : + + (string) + + the type that this elem button is see factorio api + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ElemButton._prototype:set_default(value) +
+
+
+
+ +

Sets the default value for the elem button, this may be a function or a string

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (string or function) + + string a will be a static default and a function will be called when drawn to get the default + +
  • + + +
+ + + + + Returns: +
    +
  • + (the) + element define to allow for chaining +
  • +
+ + + + + + + + + +
+
+

Progress Bars

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.set_maximum(element, amount) +
+
+
+
+ +

Sets the maximum value that represents the end value of the progress bar

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement or string) + + either a gui element or a registered define + +
  • + + + + + +
  • + + amount + + : + + (number) + + the amount to have set as the maximum + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.increment(element[, amount=1]) +
+
+
+
+ +

Increases the value of the progressbar, if a define is given all of its instances have incremented

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement or string) + + either a gui element or a registered define + +
  • + + + + + +
  • + + amount + + : + + (number) + + the amount to increase the progressbar by + + (default: 1) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.decrement(element[, amount=1]) +
+
+
+
+ +

Decreases the value of the progressbar, if a define is given all of its instances have decremented

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement or string) + + either a gui element or a registered define + +
  • + + + + + +
  • + + amount + + : + + (number) + + the amount to decrease the progressbar by + + (default: 1) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.new_progressbar([name]) +
+
+
+
+ +

Creates a new progressbar element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new progressbar element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:set_default_maximum(amount) +
+
+
+
+ +

Sets the maximum value that represents the end value of the progress bar

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to have set as the maximum + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:use_count_down([state=true]) +
+
+
+
+ +

Will set the progress bar to start at 1 and trigger when it hits 0

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when true the bar will start filled, to be used with decrease + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:increment([amount=1][, category]) +
+
+
+
+ +

Increases the value of the progressbar

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to increase the progressbar by + + (default: 1) +
  • + + + + + +
  • + + category + + : + + (string) + + the category that is used with a store + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:increment_filtered([amount=1], filter) +
+
+
+
+ +

Increases the value of the progressbar, if the filter condition is met, does not work with store

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to increase the progressbar by + + (default: 1) +
  • + + + + + +
  • + + filter + + : + + (function) + + the filter to be used + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:decrement([amount=1][, category]) +
+
+
+
+ +

Decreases the value of the progressbar

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to decrease the progressbar by + + (default: 1) +
  • + + + + + +
  • + + category + + : + + (string) + + the category that is used with a store + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:decrement_filtered([amount=1], filter) +
+
+
+
+ +

Decreases the value of the progressbar, if the filter condition is met, does not work with store

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to decrease the progressbar by + + (default: 1) +
  • + + + + + +
  • + + filter + + : + + (function) + + the filter to be used + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:add_element(element[, maximum]) +
+
+
+
+ +

Adds an element into the list of instances that will are waiting to complete, does not work with store + note use store if you want persistent data, this only stores the elements not the values which they have

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that you want to add into the waiting to complete list + +
  • + + + + + +
  • + + maximum + + : + + (number) + + the maximum for this element if not given the default for this define is used + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:reset_element(element) +
+
+
+
+ +

Resets an element, or its store, to be back at the start, either 1 or 0

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that you want to reset the progress of + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:event_counter([filter]) +
+
+
+
+ +

Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (function) + + when given will use filtered increment + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the event handler +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:event_countdown([filter]) +
+
+
+
+ +

Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (function) + + when given will use filtered decrement + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the event handler +
  • +
+ + + + + + + + + +
+
+

Sliders

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.instances +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Slider.new_slider([name]) +
+
+
+
+ +

Creates a new slider element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new slider element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Slider._prototype:set_range([min][, max]) +
+
+
+
+ +

Sets the range of a slider, if not used will use default values for a slider

+

+ + + Parameters: + +
    + + + + + +
  • + + min + + : + + (number) + + the minimum value that the slider can take + + (optional) +
  • + + + + + +
  • + + max + + : + + (number) + + the maximum value that the slider can take + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Slider._prototype:draw_label(element) +
+
+
+
+ +

Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the parent element that the label will be drawn to + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the new label element so that styles can be applied +
  • +
+ + + + + + + + + +
+
+
+
+ # + Slider._prototype:enable_auto_draw_label([state=true]) +
+
+
+
+ +

Enables auto draw of the label, the label will share the same parent element as the slider

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will disable the auto draw of the label + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+

Text

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Text.new_text_field([name]) +
+
+
+
+ +

Creates a new text field element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new text field element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text.new_text_box([name]) +
+
+
+
+ +

Creates a new text box element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new text box element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text._prototype_box:set_selectable([state=true]) +
+
+
+
+ +

Sets the text box to be selectable

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will set the state to false + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + table the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text._prototype_box:set_word_wrap([state=true]) +
+
+
+
+ +

Sets the text box to have word wrap

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will set the state to false + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + table the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text._prototype_box:set_read_only([state=true]) +
+
+
+
+ +

Sets the text box to be read only

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will set the state to false + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + table the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+

Instances

+
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Instances.has_categories(name) +
+
+
+
+ +

Returns if a instance group has a categorise function; must be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if there is a categorise function +
  • +
+ + + + + + + + + +
+
+
+
+ # + Instances.is_registered(name) +
+
+
+
+ +

Returns if the given name is a registered instance group

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group you are testing + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the name is registered +
  • +
+ + + + + + + + + +
+
+
+
+ # + Instances.register(name[, categorise]) +
+
+
+
+ +

Registers the name of an instance group to allow for storing element instances

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group; must to unique + +
  • + + + + + +
  • + + categorise + + : + + (function) + + function used to turn the element into a string + categorise param - element LuaGuiElement - the gui element to be turned into a string + categorise return - string - the category that the element will be added to like the player's name or force's name + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the name that was added so it can be used as a variable +
  • +
+ + + + + + + + + +
+
+
+
+ # + Instances.add_element(name, element) +
+
+
+
+ +

Adds an element to the instance group under the correct category; must be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group to add the element to + +
  • + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to add the the instance group + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Instances.get_elements_raw(name[, category]) +
+
+
+
+ +

Gets all element instances without first removing any invalid ones; used internally and must be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group to get the instances of + +
  • + + + + + +
  • + + category + + : + + (string) + + the category to get the instance from, not needed when no categorise function + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the table of element instances of which some may be invalid +
  • +
+ + + + + + + + + +
+
+
+
+ # + Instances.get_valid_elements(name[, category][, callback]) +
+
+
+
+ +

Gets all valid element instances and has the option of running a callback on those that are valid

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group to get the instances of + +
  • + + + + + +
  • + + category + + : + + (string) + + the category to get the instances of, not needed when no categorise function + + (optional) +
  • + + + + + +
  • + + callback + + : + + (function) + + when given the callback will be ran on all valid elements + callback param - element LuaGuiElement - the current valid element + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the table of element instances with all invalid ones removed +
  • +
+ + + + + + + + + +
+
+
+
+ # + Instances.unregistered_add_element(name, category, element) +
+
+
+
+ +

A version of add_element that does not require the group to be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group to add the element to + +
  • + + + + + +
  • + + category + + : + + (string or nil) + + the category to add the element to, can be nil but must still be given + +
  • + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element to add to the instance group + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Instances.unregistered_get_elements(name, category[, callback]) +
+
+
+
+ +

A version of get_elements that does not require the group to be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the instance group to get the instances of + +
  • + + + + + +
  • + + category + + : + + (string or nil) + + the category to get the instances of, can be nil but must still be given + +
  • + + + + + +
  • + + callback + + : + + (function) + + when given will be called on all valid instances + callback param - element LuaGuiElement - the current valid element + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the table of element instances with all invalid ones removed +
  • +
+ + + + + + + + + +
+
+

Prototype

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.instances +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + Constructor.event(event_name) +
+
+
+
+ +

Creates a new function to add functions to an event handler

+

+ + + Parameters: + +
    + + + + + +
  • + + event_name + + : + + (string) + + the name of the event that callbacks will be added to + +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the function used to register handlers +
  • +
+ + + + + + + + + +
+
+
+
+ # + Constructor.extend(new_prototype) +
+
+
+
+ +

Extents a prototype with the base functions of all gui prototypes, no metatables

+

+ + + Parameters: + +
    + + + + + +
  • + + new_prototype + + : + + (table) + + the prototype that you want to add the functions to + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the same prototype but with the new functions added +
  • +
+ + + + + + + + + +
+
+
+
+ # + Constructor.store(sync, callback) +
+
+
+
+ +

Creates a new function which adds a store to a gui define

+

+ + + Parameters: + +
    + + + + + +
  • + + sync + + : + + (boolean) + + if the function should create a synced store + +
  • + + + + + +
  • + + callback + + : + + (function) + + the function called when needing to update the value of an element + +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the function that will add a store for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Constructor.setter(value_type, key[, second_key]) +
+
+
+
+ +

Creates a setter function that checks the type when a value is set

+

+ + + Parameters: + +
    + + + + + +
  • + + value_type + + : + + (string) + + the type that the value should be when it is set + +
  • + + + + + +
  • + + key + + : + + (string) + + the key of the define that will be set + +
  • + + + + + +
  • + + second_key + + : + + (string) + + allows for setting of a key in a sub table + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the function that will check the type and set the value +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:uid() +
+
+
+
+ +

Gets the uid for the element define

+

+ + + + + + Returns: +
    +
  • + (string) + the uid of this element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype.debug_name +
+
+
+
+ +

Sets a debug alias for the define

+

+ + + +
    + + + + + +
  • + + name + + : + + (string) + + the debug name for the element define that can be used to get this element define + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_caption +
+
+
+
+ +

Sets the caption for the element define

+

+ + + +
    + + + + + +
  • + + caption + + : + + (string) + + the caption that will be drawn with the element + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_tooltip +
+
+
+
+ +

Sets the tooltip for the element define

+

+ + + +
    + + + + + +
  • + + tooltip + + : + + (string) + + the tooltip that will be displayed for this element when drawn + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_pre_authenticator +
+
+
+
+ +

Sets an authenticator that blocks the draw function if check fails

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + the function that will be ran to test if the element should be drawn or not + callback param - LuaPlayer player - the player that the element is being drawn to + callback param - string define_name - the name of the define that is being drawn + callback return - boolean - false will stop the element from being drawn + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_post_authenticator +
+
+
+
+ +

Sets an authenticator that disables the element if check fails

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + the function that will be ran to test if the element should be enabled or not + callback param - LuaPlayer player - the player that the element is being drawn to + callback param - string define_name - the name of the define that is being drawn + callback return - boolean - false will disable the element + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.on_draw +
+
+
+
+ +

Registers a callback to the on_draw event

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + + callback param - LuaPlayer player - the player that the element was drawn to + callback param - LuaGuiElement element - the element that was drawn + callback param - any ... - any other params passed by the draw_to function + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.on_style_update +
+
+
+
+ +

Registers a callback to the on_style_update event

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + + callback param - LuaStyle style - the style that was changed and/or needs changing + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype:set_style(style[, callback]) +
+
+
+
+ +

Sets the style for the element define

+

+ + + Parameters: + +
    + + + + + +
  • + + style + + : + + (string) + + the style that will be used for this element when drawn + +
  • + + + + + +
  • + + callback + + : + + (function) + + function is called when element is drawn to alter its style + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the element define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:set_embedded_flow(state) +
+
+
+
+ +

Sets the element to be drawn inside a nameless flow, can be given a name using a function

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean or function) + + when true a padless flow is created to contain the element + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the element define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:raise_event(event_name, ...) +
+
+
+
+ +

Raises a custom event for this define, any number of params can be given

+

+ + + Parameters: + +
    + + + + + +
  • + + event_name + + : + + (string) + + the name of the event that you want to raise + +
  • + + + + + +
  • + + ... + + : + + (any) + + any params that you want to pass to the event + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of handlers that were registered +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:draw_to(element) +
+
+
+
+ +

The main function for defines, when called will draw an instance of this define to the given element + what is drawn is based on the data in draw_data which is set using other functions

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that the define will draw a instance of its self onto + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + Prototype:get_store(category) +
+
+
+
+ +

Gets the value in this elements store, category needed if categorize function used

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the value that is stored for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:set_store(category, value) +
+
+
+
+ +

Sets the value in this elements store, category needed if categorize function used

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + value + + : + + (any) + + the value to set for this define, must be valid for its type ie for checkbox etc + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:clear_store([category]) +
+
+
+
+ +

Sets the value in this elements store to nil, category needed if categorize function used

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + the category to get such as player name or force name + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+

Test

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Permissions-Groups.html b/doc/core/Permissions-Groups.html new file mode 100644 index 00000000..f2878f57 --- /dev/null +++ b/doc/core/Permissions-Groups.html @@ -0,0 +1,1440 @@ + + + + + + + + Permissions-Groups core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Permissions-Groups core

+

Core Module - Permission Groups + - Permission group making for factorio so you never have to make one by hand again

+

+ + + + + + +

Usage

+

+---- Example Group (Allow All)
+
+    -- here we will create an admin group however we do not want them to use the map editor or mess with the permission groups
+    Permission_Groups.new_group('Admin') -- this defines a new group called "Admin"
+    :allow_all() -- this makes the default to allow any input action unless set other wise
+    :disallow{ -- here we disallow the input action we don't want them to use
+        'add_permission_group',
+        'delete_permission_group',
+        'import_permissions_string',
+        'map_editor_action',
+        'toggle_map_editor'
+    }
+

+---- Example Group (Disallow All)
+
+    -- here we will create a group that cant do anything but talk in chat
+    Permission_Groups.new_group('Restricted') -- this defines a new group called "Restricted"
+    :disallow_all() -- this makes the default to disallow any input action unless set other wise
+    :allow('write_to_console') -- here we allow them to chat, {} can be used here if we had more than one action
+
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
utils.game
utils.event
expcore.sudo
+ + +

Getters

+ + + + + + + + + + + + + + + + +
new_group(name)Defines a new permission group that can have it actions set in the config
get_group_by_name(name)Returns the group with the given name, case sensitive
get_group_from_player(player)Returns the group that a player is in
+ + +

Setters

+ + + + + + + + + + + + + + + + +
reload_permissions()Reloads/creates all permission groups and sets them to they configured state
lockdown_permissions(exempt)Removes all permissions from every permission group except for "Default" and any passed as exempt
set_player_group(player, group)Sets a player's group to the one given, a player can only have one group at a time
+ + +

Actions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Permissions_Groups._prototype:set_action(action, state)Sets the allow state of an action for this group, used internally but is safe to use else where
Permissions_Groups._prototype:allow(actions)Sets an action or actions to be allowed for this group even with disallow_all triggered, Do not use in runtime
Permissions_Groups._prototype:disallow(actions)Sets an action or actions to be disallowed for this group even with allow_all triggered, Do not use in runtime
Permissions_Groups._prototype:allow_all()Sets the default state for any actions not given to be allowed, useful with :disallow
Permissions_Groups._prototype:disallow_all()Sets the default state for any action not given to be disallowed, useful with :allow
Permissions_Groups._prototype:is_allowed(action)Returns if an input action is allowed for this group
+ + +

Players

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Permissions_Groups._prototype:get_raw()Returns the LuaPermissionGroup that was created with this group object, used internally
Permissions_Groups._prototype:create()Creates or updates the permission group with the configured actions, used internally
Permissions_Groups._prototype:add_player(player)Adds a player to this group
Permissions_Groups._prototype:remove_player(player)Removes a player from this group
Permissions_Groups._prototype:get_players([online])Returns all player that are in this group with the option to filter to online/offline only
Permissions_Groups._prototype:print(message)Prints a message to every player in this group
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.sudo +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Getters

+
+
+
+
+ # + new_group(name) +
+
+
+
+ +

Defines a new permission group that can have it actions set in the config

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the new group + +
  • + + +
+ + + + + Returns: +
    +
  • + (Permissions_Groups._prototype) + the new group made with function to allow and disallow actions +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_group_by_name(name) +
+
+
+
+ +

Returns the group with the given name, case sensitive

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the group to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (Permissions_Groups._prototype or nil) + the group with that name or nil if non found +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_group_from_player(player) +
+
+
+
+ +

Returns the group that a player is in

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the group of can be name index etc + +
  • + + +
+ + + + + Returns: +
    +
  • + (Permissions_Groups._prototype or nil) + the group with that player or nil if non found +
  • +
+ + + + + + + + + +
+
+

Setters

+
+
+
+
+ # + reload_permissions() +
+
+
+
+ +

Reloads/creates all permission groups and sets them to they configured state

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + lockdown_permissions(exempt) +
+
+
+
+ +

Removes all permissions from every permission group except for "Default" and any passed as exempt

+

+ + + Parameters: + +
    + + + + + +
  • + + exempt + + : + + (string or Array) + + groups that you want to be except, "Default" is always exempt + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of groups that had they permissions removed +
  • +
+ + + + + + + + + +
+
+
+
+ # + set_player_group(player, group) +
+
+
+
+ +

Sets a player's group to the one given, a player can only have one group at a time

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to effect can be name index etc + +
  • + + + + + +
  • + + group + + : + + (string) + + the name of the group to give to the player + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player was added successfully, false other wise +
  • +
+ + + + + + + + + +
+
+

Actions

+
+
+
+
+ # + Permissions_Groups._prototype:set_action(action, state) +
+
+
+
+ +

Sets the allow state of an action for this group, used internally but is safe to use else where

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string or defines.input_action) + + the action that you want to set the state of + +
  • + + + + + +
  • + + state + + : + + (boolean) + + the state that you want to set it to, true = allow, false = disallow + +
  • + + +
+ + + + + Returns: +
    +
  • + (Permissions_Groups._prototype) + returns self so function can be chained +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:allow(actions) +
+
+
+
+ +

Sets an action or actions to be allowed for this group even with disallow_all triggered, Do not use in runtime

+

+ + + Parameters: + +
    + + + + + +
  • + + actions + + : + + (string or Array) + + the action or actions that you want to allow for this group + +
  • + + +
+ + + + + Returns: +
    +
  • + (Permissions_Groups._prototype) + returns self so function can be chained +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:disallow(actions) +
+
+
+
+ +

Sets an action or actions to be disallowed for this group even with allow_all triggered, Do not use in runtime

+

+ + + Parameters: + +
    + + + + + +
  • + + actions + + : + + (string or Array) + + the action or actions that you want to disallow for this group + +
  • + + +
+ + + + + Returns: +
    +
  • + (Permissions_Groups._prototype) + returns self so function can be chained +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:allow_all() +
+
+
+
+ +

Sets the default state for any actions not given to be allowed, useful with :disallow

+

+ + + + + + Returns: +
    +
  • + (Permissions_Groups._prototype) + returns self so function can be chained +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:disallow_all() +
+
+
+
+ +

Sets the default state for any action not given to be disallowed, useful with :allow

+

+ + + + + + Returns: +
    +
  • + (Permissions_Groups._prototype) + returns self so function can be chained +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:is_allowed(action) +
+
+
+
+ +

Returns if an input action is allowed for this group

+

+ + + Parameters: + + + + + + + Returns: +
    +
  • + (boolean) + true if the group is allowed the action, false other wise +
  • +
+ + + + + + + + + +
+
+

Players

+
+
+
+
+ # + Permissions_Groups._prototype:get_raw() +
+
+
+
+ +

Returns the LuaPermissionGroup that was created with this group object, used internally

+

+ + + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:create() +
+
+
+
+ +

Creates or updates the permission group with the configured actions, used internally

+

+ + + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:add_player(player) +
+
+
+
+ +

Adds a player to this group

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + LuaPlayer the player you want to add to this group can be name or index etc + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player was added successfully, false other wise +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:remove_player(player) +
+
+
+
+ +

Removes a player from this group

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + LuaPlayer the player you want to remove from this group can be name or index etc + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player was removed successfully, false other wise +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:get_players([online]) +
+
+
+
+ +

Returns all player that are in this group with the option to filter to online/offline only

+

+ + + Parameters: + +
    + + + + + +
  • + + online + + : + + (boolean) + + if nil returns all players, if true online players only, if false returns online players only + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a table of players that are in this group; filtered if online param is given +
  • +
+ + + + + + + + + +
+
+
+
+ # + Permissions_Groups._prototype:print(message) +
+
+
+
+ +

Prints a message to every player in this group

+

+ + + Parameters: + +
    + + + + + +
  • + + message + + : + + (string) + + the message that you want to send to the players + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of players that received the message +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Roles.html b/doc/core/Roles.html new file mode 100644 index 00000000..a6a994fb --- /dev/null +++ b/doc/core/Roles.html @@ -0,0 +1,3160 @@ + + + + + + + + Roles core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Roles core

+

Core Module - Roles + - Factorio role system to manage custom permissions.

+

+ + + + + + +

Usage

+

+---- Using Role System (Frontend):
+    When a map first starts you will want to define on mass all the players you expect to join and the roles to give them:
+    Roles.override_player_roles{
+        Cooldude2606 = {'Owner','Admin','Member'},
+        NotCooldude2606 = {'Member'}
+    }
+
+    Once the game is running you still want to be able to give role and remove them which is when you would use:
+    Roles.assign_player(player,'Admin',by_player_name) -- this will give the "Admin" role to the player
+    Roles.unassign_player(player,{'Admin','Moderator'},by_player_name) -- this will remove "Admin" and "Moderator" role in one go
+
+

+---- Using Role System (Backend):
+    To comparer two players you can comparer the index of they highest roles, can be used when you want to allow a "write" down type system:
+    Roles.get_player_highest_role(playerOne).index < Roles.get_player_highest_role(playerTwo).index -- remember that less means a higher role
+
+    Listing all of a players roles can also be useful which is when you would want to use:
+    Roles.get_player_roles(player) -- the return is an array that can be looped over however this is not in particular order
+
+    Finally you may want to test if a player has a certain role, flag or action allowed which is when you would use:
+    Roles.player_has_role(player,'Admin') -- you can provide a role name if you only want a name based system
+    Roles.player_has_flag(player,'is_donator') -- your roles can be grouped together with flags such as is_donator
+    Roles.player_allowed(player,'game modifiers') -- or you can have an action based system where each action is something the player can do
+
+

+---- Example Flag Define:
+    Flags can be used to group multiple roles and actions under one catch all, for example if you want a piece of code to only
+    be active for your donators then you would add a "is_donator" flag to all your donator roles and then in the code test if
+    a player has that tag present:
+
+    -- give you donators a speed boost when they join; these functions aren't required but can be useful
+    Roles.define_flag_trigger('is_donator',function(player,state)
+        if state then
+            player.character_running_speed_modifier = 1.5
+        else
+            player.character_running_speed_modifier = 1
+        end
+    end)
+
+    -- then on all your donator roles you would add
+    Roles.new_role('Donator')
+    :set_flag('is_donator')
+
+    -- and in your code you would test for
+    if Roles.player_has_flag(player,'is_donator') then
+        -- some donator only code
+    end
+

+---- Example Role Define:
+    You can't use a role system without any roles so first you must define your roles; each role has a minimum of a name with
+    the option for a shorthand:
+    Roles.new_role('Administrator','Admin')
+
+    Next you will want to add any extras you want to have, such as a tag, colour, permission group or any custom flags:
+    Roles.new_role('Administrator','Admin')
+    :set_custom_tag('[Admin]')
+    :set_custom_color('red') -- this can be {r=0,g=0,b=0} or a predefined value
+    :set_permission_group('Staff') -- a second argument can be added if you have not used the custom permission group config
+    :set_flag('is_admin')
+
+    You will then want to decide if you want to allow all actions, this should of course be used sparely:
+    Roles.new_role('Administrator','Admin')
+    ...extras...
+    :set_allow_all()
+
+    If you don't do this want this as i would advise you do then you will want to define what the role can do; this comes with
+    an optional inheritance system if you like those sort of things in which case disallow may also be of some use to you:
+    Roles.new_role('Administrator','Admin')
+    ...extras...
+    :set_parent('Moderator') -- the admin can do anything that a moderator can do
+    :allow{ -- these actions can be anything just try to keep them without conflicts
+        'command/kill',
+        'gui/game settings'
+    }
+
+    Here is what the finished admin role would look like:
+    Roles.new_role('Administrator','Admin')
+    :set_custom_tag('[Admin]')
+    :set_custom_color('red')
+    :set_permission_group('Staff')
+    :set_flag('is_admin')
+    :set_parent('Moderator')
+    :allow{
+        'command/kill',
+        'gui/game settings'
+    }
+

+---- Example System Define:
+    Once all roles are defined these steps must be done to ensure the system is ready to use, this includes setting a default
+    role, assigning a root (all permission) role that the server/system will use and the linear order that the roles fall into:
+
+    Roles.set_default('Guest')
+    Roles.set_root('System')
+
+    Roles.define_role_order{
+        'System',
+        'Administrator',
+        'Moderator',
+        'Donator',
+        'Guest'
+    }
+
+    Just remember that in this example all these roles have not been defined; so make sure all your roles that are used are defined
+    before hand; a config file on load is useful for this to ensure that its loaded before the first player even joins.
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + +
utils.game
utils.global
utils.event
expcore.permission_groups
expcore.sudo
resources.color_presets
expcore.common
+ + +

Getter

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
debug()Returns a string which contains all roles in index order displaying all data for them
print_to_roles(roles, message)Prints a message to all players in the given roles, may send duplicate message however factorio blocks spam
print_to_roles_higher(role, message)Prints a message to all players who have the given role or one which is higher (excluding default)
print_to_roles_lower(role, message)Prints a message to all players who have the given role or one which is lower (excluding default)
get_role_by_name(name)Get a role for the given name
get_role_by_order(index)Get a role with the given order index
get_role_from_any(any)Gets a role from a name,index or role object (where it is just returned) + nb: this function is used for the input for most outward facing functions
get_player_roles(player)Gets all the roles of the given player, this will always contain the default role
get_player_highest_role(player)Gets the highest role which the player has, can be used to compeer one player to another
+ + +

Assinment

+ + + + + + + + + + + + + + + + +
assign_player(player, roles[, by_player_name=][, silent=false])Gives a player the given role(s) with an option to pass a by player name used in the log
unassign_player(player, roles[, by_player_name=][, silent=false])Removes a player from the given role(s) with an option to pass a by player name used in the log
override_player_roles(roles)Overrides all player roles with the given table of roles, useful to mass set roles on game start
+ + +

Checks

+ + + + + + + + + + + + + + + + +
player_has_role(player, search_role)A test for weather a player has the given role
player_has_flag(player, flag_name)A test for weather a player has the given flag true for at least one of they roles
player_allowed(player, action)A test for weather a player has at least one role which is allowed the given action
+ + +

Definations

+ + + + + + + + + + + + + + + + + + + + + + + + +
define_role_order(order)Used to set the role order, higher in the list is better, must be called at least once in config + nb: function also re links parents due to expected position in the config file
define_flag_trigger(name, callback)Defines a new trigger for when a tag is added or removed from a player
set_default(name)Sets the default role which every player will have, this needs to be called at least once
set_root(name)Sets the root role which will always have all permissions, any server actions act from this role
new_role(name[, short_hand=name])Defines a new role and returns the prototype to allow configuration
+ + +

Role Actions

+ + + + + + + + + + + + + + + + + + + + +
Roles._prototype:set_allow_all([state=true])Sets the default allow state of the role, true will allow all actions
Roles._prototype:allow(actions)Sets the allow actions for this role, actions in this list will be allowed for this role
Roles._prototype:disallow(actions)Sets the disallow actions for this role, will prevent actions from being allowed regardless of inheritance
Roles._prototype:is_allowed(action)Test for if a role is allowed the given action, mostly internal see Roles.player_allowed
+ + +

Role Flags

+ + + + + + + + + + + + + + + + +
Roles._prototype:set_flag(name[, value=true])Sets the state of a flag for a role, flags can be used to apply effects to players
Roles._prototype:clear_flags()Clears all flags from this role, individual flags can be removed with set_flag(name,false)
Roles._prototype:has_flag(name)A test for if the role has a flag set
+ + +

Role Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Roles._prototype:set_custom_tag(tag)Sets a custom player tag for the role, can be accessed by other code
Roles._prototype:set_custom_color(color)Sets a custom colour for the role, can be accessed by other code
Roles._prototype:set_permission_group(name[, use_factorio_api=false])Sets the permission group for this role, players will be moved to the group of they highest role
Roles._prototype:set_parent(role)Sets the parent for a role, any action not in allow or disallow will be looked for in its parents + nb: this is a recursive action, and changing the allows and disallows will effect all children roles
Roles._prototype:set_auto_promote_condition(callback)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
Roles._prototype:set_block_auto_promote([state=true])Sets the role to not allow players to have auto promote effect them, useful to keep people locked to a punishment
+ + +

Role Players

+ + + + + + + + + + + + + + + + + + + + +
Roles._prototype:add_player(player, skip_check, skip_event)Adds a player to this role, players can have more than one role at a time, used internally see Roles.assign
Roles._prototype:remove_player(player, skip_check, skip_event)Removes a player from this role, players can have more than one role at a time, used internally see Roles.unassign
Roles._prototype:get_players([online=nil])Returns an array of all the players who have this role, can be filtered by online status
Roles._prototype:print(message)Will print a message to all players with this role
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.permission_groups +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.sudo +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Getter

+
+
+
+
+ # + debug() +
+
+
+
+ +

Returns a string which contains all roles in index order displaying all data for them

+

+ + + + + + Returns: +
    +
  • + (string) + the debug output string +
  • +
+ + + + + + + + + +
+
+
+
+ # + print_to_roles(roles, message) +
+
+
+
+ +

Prints a message to all players in the given roles, may send duplicate message however factorio blocks spam

+

+ + + Parameters: + +
    + + + + + +
  • + + roles + + : + + (table) + + table a of roles which to send the message to + +
  • + + + + + +
  • + + message + + : + + (string) + + the message to send to the players + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + print_to_roles_higher(role, message) +
+
+
+
+ +

Prints a message to all players who have the given role or one which is higher (excluding default)

+

+ + + Parameters: + +
    + + + + + +
  • + + role + + : + + (string) + + the name of the role to send the message to + +
  • + + + + + +
  • + + message + + : + + (string) + + the message to send to the players + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + print_to_roles_lower(role, message) +
+
+
+
+ +

Prints a message to all players who have the given role or one which is lower (excluding default)

+

+ + + Parameters: + +
    + + + + + +
  • + + role + + : + + (string) + + the name of the role to send the message to + +
  • + + + + + +
  • + + message + + : + + (string) + + the message to send to the players + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + get_role_by_name(name) +
+
+
+
+ +

Get a role for the given name

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the role to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + the role with that name or nil +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_role_by_order(index) +
+
+
+
+ +

Get a role with the given order index

+

+ + + Parameters: + +
    + + + + + +
  • + + index + + : + + (number) + + the place in the order list of the role to get + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + the role with that index in the order list or nil +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_role_from_any(any) +
+
+
+
+ +

Gets a role from a name,index or role object (where it is just returned) + nb: this function is used for the input for most outward facing functions

+

+ + + Parameters: + +
    + + + + + +
  • + + any + + : + + (number, string or table) + + the value used to find the role + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + the role that was found or nil see above +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_player_roles(player) +
+
+
+
+ +

Gets all the roles of the given player, this will always contain the default role

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the roles of + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a table where the values are the roles which the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_player_highest_role(player) +
+
+
+
+ +

Gets the highest role which the player has, can be used to compeer one player to another

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the highest role of + +
  • + + +
+ + + + + Returns: +
    +
  • + (the) + role with the highest order index which this player has +
  • +
+ + + + + + + + + +
+
+

Assinment

+
+
+
+
+ # + assign_player(player, roles[, by_player_name=][, silent=false]) +
+
+
+
+ +

Gives a player the given role(s) with an option to pass a by player name used in the log

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be assigned the roles + +
  • + + + + + +
  • + + roles + + : + + (table) + + table a of roles that the player will be given, can be one role and can be role names + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player that will be shown in the log + + (default: ) +
  • + + + + + +
  • + + silent + + : + + (boolean) + + when true there will be no game message printed + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + unassign_player(player, roles[, by_player_name=][, silent=false]) +
+
+
+
+ +

Removes a player from the given role(s) with an option to pass a by player name used in the log

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the roles removed + +
  • + + + + + +
  • + + roles + + : + + (table) + + table a of roles to be removed from the player, can be one role and can be role names + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player that will be shown in the logs + + (default: ) +
  • + + + + + +
  • + + silent + + : + + (boolean) + + when true there will be no game message printed + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + override_player_roles(roles) +
+
+
+
+ +

Overrides all player roles with the given table of roles, useful to mass set roles on game start

+

+ + + Parameters: + +
    + + + + + +
  • + + roles + + : + + (table) + + table a which is indexed by case sensitive player names and has the value of a table of role names + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Checks

+
+
+
+
+ # + player_has_role(player, search_role) +
+
+
+
+ +

A test for weather a player has the given role

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to test the roles of + +
  • + + + + + +
  • + + search_role + + : + + (string, number or table) + + a pointer to the role that is being searched for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player has the role, false otherwise, nil for errors +
  • +
+ + + + + + + + + +
+
+
+
+ # + player_has_flag(player, flag_name) +
+
+
+
+ +

A test for weather a player has the given flag true for at least one of they roles

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to test the roles of + +
  • + + + + + +
  • + + flag_name + + : + + (string) + + the name of the flag that is being looked for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player has at least one role which has the flag set to true, false otherwise, nil for errors +
  • +
+ + + + + + + + + +
+
+
+
+ # + player_allowed(player, action) +
+
+
+
+ +

A test for weather a player has at least one role which is allowed the given action

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to test the roles of + +
  • + + + + + +
  • + + action + + : + + (string) + + the name of the action that is being tested for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player has at least one role which is allowed this action, false otherwise, nil for errors +
  • +
+ + + + + + + + + +
+
+

Definations

+
+
+
+
+ # + define_role_order(order) +
+
+
+
+ +

Used to set the role order, higher in the list is better, must be called at least once in config + nb: function also re links parents due to expected position in the config file

+

+ + + Parameters: + +
    + + + + + +
  • + + order + + : + + (table) + + table a which is keyed only by numbers (start 1) and values are roles in order with highest first + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + define_flag_trigger(name, callback) +
+
+
+
+ +

Defines a new trigger for when a tag is added or removed from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the flag which the roles will have + +
  • + + + + + +
  • + + callback + + : + + (function) + + the function that is called when roles are assigned + flag param - player - the player that has had they roles changed + flag param - state - the state of the flag, aka if the flag is present + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + set_default(name) +
+
+
+
+ +

Sets the default role which every player will have, this needs to be called at least once

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the default role + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + set_root(name) +
+
+
+
+ +

Sets the root role which will always have all permissions, any server actions act from this role

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the root role + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + new_role(name[, short_hand=name]) +
+
+
+
+ +

Defines a new role and returns the prototype to allow configuration

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the new role, must be unique + +
  • + + + + + +
  • + + short_hand + + : + + (string) + + the shortened version of the name + + (default: name) +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + the start of the config chain for this role +
  • +
+ + + + + + + + + +
+
+

Role Actions

+
+
+
+
+ # + Roles._prototype:set_allow_all([state=true]) +
+
+
+
+ +

Sets the default allow state of the role, true will allow all actions

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + true will allow all actions + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:allow(actions) +
+
+
+
+ +

Sets the allow actions for this role, actions in this list will be allowed for this role

+

+ + + Parameters: + +
    + + + + + +
  • + + actions + + : + + (table) + + indexed with numbers and is an array of action names, order has no effect + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:disallow(actions) +
+
+
+
+ +

Sets the disallow actions for this role, will prevent actions from being allowed regardless of inheritance

+

+ + + Parameters: + +
    + + + + + +
  • + + actions + + : + + (table) + + indexed with numbers and is an array of action names, order has no effect + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:is_allowed(action) +
+
+
+
+ +

Test for if a role is allowed the given action, mostly internal see Roles.player_allowed

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + the name of the action to test if it is allowed + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if action is allowed, false otherwise +
  • +
+ + + + + + + + + +
+
+

Role Flags

+
+
+
+
+ # + Roles._prototype:set_flag(name[, value=true]) +
+
+
+
+ +

Sets the state of a flag for a role, flags can be used to apply effects to players

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the flag to set the value of + +
  • + + + + + +
  • + + value + + : + + (boolean) + + the state to set the flag to + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:clear_flags() +
+
+
+
+ +

Clears all flags from this role, individual flags can be removed with set_flag(name,false)

+

+ + + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:has_flag(name) +
+
+
+
+ +

A test for if the role has a flag set

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the flag to test for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the flag is set, false otherwise +
  • +
+ + + + + + + + + +
+
+

Role Properties

+
+
+
+
+ # + Roles._prototype:set_custom_tag(tag) +
+
+
+
+ +

Sets a custom player tag for the role, can be accessed by other code

+

+ + + Parameters: + +
    + + + + + +
  • + + tag + + : + + (string) + + the value that the tag will be + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:set_custom_color(color) +
+
+
+
+ +

Sets a custom colour for the role, can be accessed by other code

+

+ + + Parameters: + +
    + + + + + +
  • + + color + + : + + (table) + + ?string|table can either be and rgb colour or the name of a colour defined in the presets + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:set_permission_group(name[, use_factorio_api=false]) +
+
+
+
+ +

Sets the permission group for this role, players will be moved to the group of they highest role

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the permission group to have players moved to + +
  • + + + + + +
  • + + use_factorio_api + + : + + (boolean) + + when true the custom permission group module is ignored + + (default: false) +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:set_parent(role) +
+
+
+
+ +

Sets the parent for a role, any action not in allow or disallow will be looked for in its parents + nb: this is a recursive action, and changing the allows and disallows will effect all children roles

+

+ + + Parameters: + +
    + + + + + +
  • + + role + + : + + (string) + + the name of the role that will be the parent; has imminent effect if role is already defined + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:set_auto_promote_condition(callback) +
+
+
+
+ +

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

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + receives only one param which is player to promote, return true to promote the player + +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:set_block_auto_promote([state=true]) +
+
+
+
+ +

Sets the role to not allow players to have auto promote effect them, useful to keep people locked to a punishment

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when true the players with this role will not be auto promoted + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (Roles._prototype) + allows chaining +
  • +
+ + + + + + + + + +
+
+

Role Players

+
+
+
+
+ # + Roles._prototype:add_player(player, skip_check, skip_event) +
+
+
+
+ +

Adds a player to this role, players can have more than one role at a time, used internally see Roles.assign

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be given this role + +
  • + + + + + +
  • + + skip_check + + : + + (boolean) + + when true player will be taken as the player name (use when player has not yet joined) + +
  • + + + + + +
  • + + skip_event + + : + + (boolean) + + when true the event emit will be skipped, this is used internally with Roles.assign + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player was added successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:remove_player(player, skip_check, skip_event) +
+
+
+
+ +

Removes a player from this role, players can have more than one role at a time, used internally see Roles.unassign

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will lose this role + +
  • + + + + + +
  • + + skip_check + + : + + (boolean) + + when true player will be taken as the player name (use when player has not yet joined) + +
  • + + + + + +
  • + + skip_event + + : + + (boolean) + + when true the event emit will be skipped, this is used internally with Roles.unassign + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the player was removed successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:get_players([online=nil]) +
+
+
+
+ +

Returns an array of all the players who have this role, can be filtered by online status

+

+ + + Parameters: + +
    + + + + + +
  • + + online + + : + + (boolean) + + when given will filter by this online state, nil will return all players + + (default: nil) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + all the players who have this role, indexed order is meaningless +
  • +
+ + + + + + + + + +
+
+
+
+ # + Roles._prototype:print(message) +
+
+
+
+ +

Will print a message to all players with this role

+

+ + + Parameters: + +
    + + + + + +
  • + + message + + : + + (string) + + the message that will be printed to the players + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of players who received the message +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Store.html b/doc/core/Store.html new file mode 100644 index 00000000..eb815f53 --- /dev/null +++ b/doc/core/Store.html @@ -0,0 +1,1026 @@ + + + + + + + + Store core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Store core

+

Core Module - Store + - Adds an easy way to store and watch for updates to a value

+

+ + + + + + +

Usage

+

+---- Basic Use
+    -- At the most basic level this allows for the naming of locations to store in the global table, the second feature is that you are
+    -- able to listen for updates of this value, which means that when ever the set function is called it will trigger the update callback.
+
+    -- This may be useful when storing config values and when they get set you want to make sure it is taken care of, or maybe you want
+    -- to have a value that you can trigger an update of from different places.
+
+    -- This will register a new location called 'scenario.difficulty'
+    -- note that setting a start value is optional and we could take nil to mean normal
+    Store.register('scenario.difficulty',function(value)
+        game.print('The scenario difficulty has be set to: '..value)
+    end)
+
+    -- This will set the value in the store to 'hard' and will trigger the update callback which will print a message to the game
+    Store.set('scenario.difficulty','hard')
+
+    -- This will return 'hard'
+    Store.get('scenario.difficulty')
+

+---- Using Children
+    -- One limitation of store is that all locations must be registered to avoid desyncs, to get round this issue "children" can be used.
+    -- When you set the value of a child it does not have its own update callback so rather the "parent" location which has been registered
+    -- will have its update value called with a second param of the name of that child.
+
+    -- This may be useful when you want a value of each player or force and since you cant register every player at the start you must use
+    -- the players name as the child name.
+
+    -- This will register the location 'scenario.score' where we plan to use force names as the child
+    Store.register('scenario.score',function(value,child)
+        game.print(child..' now has a score of '..value)
+    end)
+
+    -- This will return nil, but will not error as children don't need to be registered
+    Store.get('scenario.score','player')
+
+    -- This will set 'player' to have a value of 10 for 'scenario.score' and trigger the game message print
+    Store.set('scenario.score','player',10)
+
+    -- This would be the similar to Store.get however this will return the names of all the children
+    Store.get_children('scenario.score')
+

+---- Using Sync
+    -- There is the option to use synced values which is the same as a normal value however you can combine this with an external script
+    -- which can read the output from 'script-output/log/store.log' and have it send rcon commands back to the game allowing for cross instance
+    -- syncing of values.
+
+    -- This may be useful when you want to have a value change effect multiple instances or even if you just want a database to store values so
+    -- you can sync data between map resets.
+
+    -- This example will register the location 'statistics.total-play-time' where we plan to use plan names as the child
+    -- note that the location must be the same across instances
+    Store.register('statistics.total-play-time',true,function(value,child)
+        game.print(child..' now has now played for '..value)
+    end)
+
+    -- Use of set and are all the same as non synced but you should include from_sync as true
+
+

+---- Alternative method
+    -- Some people may prefer to use a variable rather than a string for formating reasons here is an example. Also for any times when
+    -- there will be little external input Store.uid_location() can be used to generate non conflicting locations, uid_location will also
+    -- be used if you give a nil location.
+
+    local store_game_speed =
+    Store.register(function(value)
+        game.print('The game speed has been set to: '..value)
+    end)
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
utils.global
utils.event
expcore.common
utils.token
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
is_registered(location)Check for if a location is registered
uid_location()Returns a unique name that can be used for a store
register([location][, synced][, callback])Registers a new location with an update callback which is triggered when the value updates
get(location[, child][, allow_unregistered=false])Gets the value stored at a location, this location must be registered
set(location[, child], value[, from_sync])Sets the value at a location, this location must be registered
clear(location[, child][, from_sync])Sets the value at a location to nil, this location must be registered
get_children(location)Gets all non nil children at a location, children can be added and removed during runtime + this is similar to Store.get but will always return a table even if it is empty
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.token +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + is_registered(location) +
+
+
+
+ +

Check for if a location is registered

+

+ + + Parameters: + +
    + + + + + +
  • + + location + + : + + (string) + + the location to test for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if registered +
  • +
+ + + + + + + + + +
+
+
+
+ # + uid_location() +
+
+
+
+ +

Returns a unique name that can be used for a store

+

+ + + + + + Returns: +
    +
  • + (string) + a unique name +
  • +
+ + + + + + + + + +
+
+
+
+ # + register([location][, synced][, callback]) +
+
+
+
+ +

Registers a new location with an update callback which is triggered when the value updates

+

+ + + Parameters: + +
    + + + + + +
  • + + location + + : + + (string) + + string a unique that points to the data, string used rather than token to allow migration + + (optional) +
  • + + + + + +
  • + + synced + + : + + (boolean) + + when true will output changes to a file so it can be synced + + (optional) +
  • + + + + + +
  • + + callback + + : + + (function) + + when given the callback will be automatically registered to the update of the value + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the location that is being used +
  • +
+ + + + + + + + + +
+
+
+
+ # + get(location[, child][, allow_unregistered=false]) +
+
+
+
+ +

Gets the value stored at a location, this location must be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + location + + : + + (string) + + the location to get the data from + +
  • + + + + + +
  • + + child + + : + + (string) + + the child location if required + + (optional) +
  • + + + + + +
  • + + allow_unregistered + + : + + (boolean) + + when true no error is returned if the location is not registered + + (default: false) +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the data which was stored at the location +
  • +
+ + + + + + + + + +
+
+
+
+ # + set(location[, child], value[, from_sync]) +
+
+
+
+ +

Sets the value at a location, this location must be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + location + + : + + (string) + + the location to set the data to + +
  • + + + + + +
  • + + child + + : + + (string) + + the child location if required + + (optional) +
  • + + + + + +
  • + + value + + : + + (any) + + the new value to set at the location, value may be reverted if there is a watch callback, cant be nil + +
  • + + + + + +
  • + + from_sync + + : + + (boolean) + + set this true to avoid an output to the sync file + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if it was successful +
  • +
+ + + + + + + + + +
+
+
+
+ # + clear(location[, child][, from_sync]) +
+
+
+
+ +

Sets the value at a location to nil, this location must be registered

+

+ + + Parameters: + +
    + + + + + +
  • + + location + + : + + (string) + + the location to set the data to + +
  • + + + + + +
  • + + child + + : + + (string) + + the child location if required + + (optional) +
  • + + + + + +
  • + + from_sync + + : + + (boolean) + + set this true to avoid an output to the sync file + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if it was successful +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_children(location) +
+
+
+
+ +

Gets all non nil children at a location, children can be added and removed during runtime + this is similar to Store.get but will always return a table even if it is empty

+

+ + + Parameters: + +
    + + + + + +
  • + + location + + : + + (string) + + the location to get the children of + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a table containing all the children names +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/core/Sudo.html b/doc/core/Sudo.html new file mode 100644 index 00000000..b57f5340 --- /dev/null +++ b/doc/core/Sudo.html @@ -0,0 +1,552 @@ + + + + + + + + Sudo core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Sudo core

+

Core Module - Sudo + - An extention of task and token to allow a single require to register and run functions bypassing all permissions.

+

+ + + + + + +

Usage

+

+    -- To use sudo you must register the allowed functions when the files are loaded, often this will just be giving access to
+    -- some functions within a module if you expect that some parts may be blocked by in game permissions or a custom system you have made
+
+    -- This will be blocked if the current player (from a command or gui) is not admin
+    local function make_admin(player)
+        player.admin = true
+    end
+
+    -- Here we give sudo access to the function under the name "make-admin"
+    Sudo.register('make-admin',make_admin)
+
+    -- This will allow us to bypass this by running one tick later outside of any player scope
+    Sudo.run('make-admin',game.player)
+ + + + + + + +

Dependencies

+ + + + + + + + + + +
utils.task
utils.token
+ + +

Functions

+ + + + + + + + + + + + + + + + +
register(name, callback)Registers a new callback under the given name, used to avoid desyncs
get(name)Gets the function that is registered under the given name
run(name[, ...])Runs the function that is registered under the given name, you may supply any number of params as needed
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.task +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.token +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + register(name, callback) +
+
+
+
+ +

Registers a new callback under the given name, used to avoid desyncs

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name that will be used to call this function + +
  • + + + + + +
  • + + callback + + : + + (function) + + the function that will be called by this name + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + get(name) +
+
+
+
+ +

Gets the function that is registered under the given name

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the function you want to get + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + run(name[, ...]) +
+
+
+
+ +

Runs the function that is registered under the given name, you may supply any number of params as needed

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the function you want to run + +
  • + + + + + +
  • + + ... + + : + + (any) + + the other params that you want to pass to your function + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/guis/Player-List.html b/doc/guis/Player-List.html new file mode 100644 index 00000000..15f04345 --- /dev/null +++ b/doc/guis/Player-List.html @@ -0,0 +1,634 @@ + + + + + + + + Player-List gui + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Player-List gui

+

Gui Module - Player List + - Adds a player list to show names and play time; also includes action buttons which can apply to players

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui
expcore.roles
expcore.store
utils.game
utils.event
expcore.common
config.action_buttons
resources.color_presets
+ + +

Elements

+ + + + + + + + + + + + + + + + + + + + +
open_action_barButton used to open the action bar
close_action_barButton used to close the action bar
reason_confirmButton used to confirm a reason
player_listRegisters the player list
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.action_buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Elements

+
+
+
+
+ # + open_action_bar +
+
+
+
+ +

Button used to open the action bar

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + close_action_bar +
+
+
+
+ +

Button used to close the action bar

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + reason_confirm +
+
+
+
+ +

Button used to confirm a reason

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + player_list +
+
+
+
+ +

Registers the player list

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/guis/Rocket-Info.html b/doc/guis/Rocket-Info.html new file mode 100644 index 00000000..a0c8e321 --- /dev/null +++ b/doc/guis/Rocket-Info.html @@ -0,0 +1,637 @@ + + + + + + + + Rocket-Info gui + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Rocket-Info gui

+

Gui Module - Rocket Info + - Adds a rocket infomation gui which shows general stats, milestones and build progress of rockets

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui
expcore.roles
utils.event
config.rockets
expcore.common
resources.color_presets
modules.control.rockets
+ + +

Elements

+ + + + + + + + + + + + + + + + + + + + + + + + +
zoom_to_mapUsed on the name label to allow zoom to map
launch_rocketUsed to launch the rocket, when it is ready
toggle_rocketUsed to toggle the auto launch on a rocket
toggle_sectionUsed to toggle the visibility of the different sections
rocket_infoRegisters the rocket info
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.rockets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.rockets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Elements

+
+
+
+
+ # + zoom_to_map +
+
+
+
+ +

Used on the name label to allow zoom to map

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + launch_rocket +
+
+
+
+ +

Used to launch the rocket, when it is ready

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + toggle_rocket +
+
+
+
+ +

Used to toggle the auto launch on a rocket

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + toggle_section +
+
+
+
+ +

Used to toggle the visibility of the different sections

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + rocket_info +
+
+
+
+ +

Registers the rocket info

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/guis/Science-Info.html b/doc/guis/Science-Info.html new file mode 100644 index 00000000..46a7c6ba --- /dev/null +++ b/doc/guis/Science-Info.html @@ -0,0 +1,457 @@ + + + + + + + + Science-Info gui + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Science-Info gui

+

Gui Module - Science Info + - Adds a science info gui that shows production usage and net for the different science packs as well as an eta

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + +
expcore.gui
utils.event
expcore.common
config.science
modules.control.production
+ + +

Elements

+ + + + + + + + +
science_infoRegisters the science info
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.science +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.production +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Elements

+
+
+
+
+ # + science_info +
+
+
+
+ +

Registers the science info

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/guis/Task-List.html b/doc/guis/Task-List.html new file mode 100644 index 00000000..044ce929 --- /dev/null +++ b/doc/guis/Task-List.html @@ -0,0 +1,640 @@ + + + + + + + + Task-List gui + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Task-List gui

+

Gui Module - Task List + - Adds a task list to the game which players can add remove and edit items on

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + +
expcore.gui
utils.event
expcore.roles
config.tasks
expcore.common
modules.control.tasks
+ + +

Elements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
add_new_taskButton in the header to add a new task
confirm_editUsed to save changes to a task
cancel_editUsed to cancel any changes you made to a task
discard_taskRemoves the task from the list
edit_taskOpens edit mode for the task
task_listRegisters the task list
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.tasks +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.tasks +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Elements

+
+
+
+
+ # + add_new_task +
+
+
+
+ +

Button in the header to add a new task

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + confirm_edit +
+
+
+
+ +

Used to save changes to a task

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + cancel_edit +
+
+
+
+ +

Used to cancel any changes you made to a task

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + discard_task +
+
+
+
+ +

Removes the task from the list

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + edit_task +
+
+
+
+ +

Opens edit mode for the task

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + task_list +
+
+
+
+ +

Registers the task list

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/guis/Warps-List.html b/doc/guis/Warps-List.html new file mode 100644 index 00000000..70ad4fae --- /dev/null +++ b/doc/guis/Warps-List.html @@ -0,0 +1,845 @@ + + + + + + + + Warps-List gui + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warps-List gui

+

Gui Module - Warp List + - Adds a warp list gui which allows players to add and remove warp points

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui
expcore.store
utils.global
utils.event
utils.game
expcore.roles
resources.color_presets
config.warps
expcore.common
modules.control.warps
+ + +

Elements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
zoom_to_mapUsed on the name label to allow zoom to map
warp_timerThis timer controls when a player is able to warp, eg every 60 seconds
goto_warpWhen the button is clicked it will teleport the player
add_new_warpWill add a new warp to the list, checks if the player is too close to an existing one
confirm_editConfirms the edit to name or icon of the warp
cancel_editCancels the editing changes of the selected warp name or icon
discard_warpRemoves a warp from the list, including the physical area and map tag
edit_warpOpens edit mode for the warp
warp_listRegisters the warp list
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.warps +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + modules.control.warps +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Elements

+
+
+
+
+ # + zoom_to_map +
+
+
+
+ +

Used on the name label to allow zoom to map

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + warp_timer +
+
+
+
+ +

This timer controls when a player is able to warp, eg every 60 seconds

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + goto_warp +
+
+
+
+ +

When the button is clicked it will teleport the player

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + add_new_warp +
+
+
+
+ +

Will add a new warp to the list, checks if the player is too close to an existing one

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + confirm_edit +
+
+
+
+ +

Confirms the edit to name or icon of the warp

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + cancel_edit +
+
+
+
+ +

Cancels the editing changes of the selected warp name or icon

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + discard_warp +
+
+
+
+ +

Removes a warp from the list, including the physical area and map tag

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + edit_warp +
+
+
+
+ +

Opens edit mode for the warp

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + warp_list +
+
+
+
+ +

Registers the warp list

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/index.html b/doc/index.html index 45c80e3f..8d881fce 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,376 +1,522 @@ - - - - - Reference + + + + + + + + ExpGaming Scenario + + + - - + + -
+
+
-
- -
-
-
+ + - - + + + + +
+
+
+ + + + diff --git a/doc/ldoc.css b/doc/ldoc.css index 7d74ca23..809ab237 100644 --- a/doc/ldoc.css +++ b/doc/ldoc.css @@ -1,307 +1,244 @@ -/* BEGIN RESET +/* universal */ -Copyright (c) 2010, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.com/yui/license.html -version: 2.8.2r1 -*/ -html { - color: #000; - background: #FFF; -} -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { - margin: 0; - padding: 0; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -fieldset,img { - border: 0; -} -address,caption,cite,code,dfn,em,strong,th,var,optgroup { - font-style: inherit; - font-weight: inherit; -} -del,ins { - text-decoration: none; -} -li { - list-style: disc; - margin-left: 20px; -} -caption,th { - text-align: left; -} -h1,h2,h3,h4,h5,h6 { - font-size: 100%; - font-weight: bold; -} -q:before,q:after { - content: ''; -} -abbr,acronym { - border: 0; - font-variant: normal; -} -sup { - vertical-align: baseline; -} -sub { - vertical-align: baseline; -} -legend { - color: #000; -} -input,button,textarea,select,optgroup,option { - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; -} -input,button,textarea,select {*font-size:100%; -} -/* END RESET */ - -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color: #ffffff; margin: 0px; -} - -code, tt { font-family: monospace; font-size: 1.1em; } -span.parameter { font-family:monospace; } -span.parameter:after { content:":"; } -span.types:before { content:"("; } -span.types:after { content:")"; } -.type { font-weight: bold; font-style:italic } - -body, p, td, th { font-size: .95em; line-height: 1.2em;} - -p, ul { margin: 10px 0 0 0px;} - -strong { font-weight: bold;} - -em { font-style: italic;} - -h1 { - font-size: 1.5em; - margin: 0 0 20px 0; -} -h2, h3, h4 { margin: 15px 0 10px 0; } -h2 { font-size: 1.25em; } -h3 { font-size: 1.15em; } -h4 { font-size: 1.06em; } - -a:link { font-weight: bold; color: #004080; text-decoration: none; } -a:visited { font-weight: bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration: underline; } - -hr { - color:#cccccc; - background: #00007f; - height: 1px; -} - -blockquote { margin-left: 3em; } - -ul { list-style-type: disc; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; -} - -pre.example { - background-color: rgb(245, 245, 245); - border: 1px solid silver; - padding: 10px; - margin: 10px 0 10px 0; - font-family: "Andale Mono", monospace; - font-size: .85em; -} - -pre { - background-color: rgb(245, 245, 245); - border: 1px solid silver; - padding: 10px; - margin: 10px 0 10px 0; - overflow: auto; - font-family: "Andale Mono", monospace; -} +body{background-color:#0F0F0F;color:#C8C8C8;font-family:'Lucida Grande',Arial,sans-serif} +a{text-decoration:none;border-style:none;outline:none!important} +a:link{color:#FF7200;text-decoration:none} +a:visited{color:#FF7200;text-decoration:none} +a:hover{color:#C8C8C8;text-decoration:none} +a:active{color:#C8C8C8;text-decoration:none} +h1{font-size:2.5rem} +h2{font-size:2.3rem} +h3{font-size:2rem} +h4{font-size:1.8rem} +h5{font-size:1.6rem} -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } +/* table */ -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; +table,thead{text-align:left} +table,th,td{padding:2px} + + +/* sidebar */ + +.sidebar {height: 100%} + +.sidebar-custom { + border-right: 1px solid #2C2C2C; + padding-right: 1.4rem; + bottom: 0rem; } -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#main { - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 14em; - vertical-align: top; - background-color: #f0f0f0; - overflow: visible; -} - -#navigation h2 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align: left; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - margin: 1px 1px 10px 1px; -} - -#navigation li { - text-indent: -1em; - display: block; - margin: 3px 0px 0px 22px; -} - -#navigation li li a { - margin: 0px 3px 0px -1em; -} - -#content { - margin-left: 14em; - padding: 1em; - width: 700px; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about { - clear: both; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 12pt "Times New Roman", "TimeNR", Times, serif; - } - a { font-weight: bold; color: #004080; text-decoration: underline; } - - #main { - background-color: #ffffff; - border-left: 0px; - } - - #container { - margin-left: 2%; - margin-right: 2%; - background-color: #ffffff; - } - - #content { - padding: 1em; - background-color: #ffffff; - } - - #navigation { - display: none; - } - pre.example { - font-family: "Andale Mono", monospace; - font-size: 10pt; - page-break-inside: avoid; +@supports (-ms-ime-align:auto) { + .sidebar-custom { + height: 99%; } } +.up-to-top { + top: 1.5rem; + position: -webkit-sticky; + position: sticky; + text-align: right; + margin-right: 0.2rem; +} + +.up-to-top a{padding:20px} +.up-to-top a:link{color:#FF7200} +.up-to-top a:hover{color:#C8C8C8} +.icon-arrow-right-custom{margin-bottom:3px} +.project-infobox{text-align:right} +.project-infobox .project-desc{font-style:italic} +.nav-modules{text-align:right} +.nav-module-contents{text-align:right} + + +/* navigation */ + +.nav .nav a{color:#FF7200} +.nav .nav a:link{color:#FF7200} +.nav .nav a:visited{color:#FF7200} +.nav .nav a:hover{color:#C8C8C8;text-decoration:none} +.nav .nav-item.active>a:hover{color:#C8C8C8;text-decoration:none} +.nav .nav-item.active{margin-left:0} +.nav .nav a:active{color:#C8C8C8} + + +/* main page module list */ + +.body-module-name {font-weight: 500} + table.module_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; + border-spacing: 0; + display: table; border-collapse: collapse; + margin-bottom: 2.0rem; } + table.module_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; + border-top: 1px solid #2C2C2C; + border-bottom: 1px solid #2C2C2C; + padding: 3px 7px 3px 7px; } -table.module_list td.name { background-color: #f0f0f0; min-width: 200px; } -table.module_list td.summary { width: 100%; } +table.module_list td.name { + vertical-align: top; + min-width: 125px; + background-color: #0D0D0D; +} -table.function_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; +table.module_list td.summary {vertical-align: top} + +.module_list p {margin:0px} + +/* section */ + +.module-see-also li { + margin-top: 0.5rem; +} + +.section-title a:link{color:#C8C8C8} +.section-title a:visited{color:#C8C8C8} +.section-title a:hover{color:#FF7200} +.section-title a:active{color:#FF7200} + +.section-body-container dd { + margin: 1.0rem 0 1.5rem 0; +} + +table.section-content-list { + border-spacing: 0; + display: table; border-collapse: collapse; -} -table.function_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.function_list td.name { background-color: #f0f0f0; min-width: 200px; } -table.function_list td.summary { width: 100%; } - -ul.nowrap { - overflow:auto; - white-space:nowrap; + margin-bottom: 1.5rem; } -dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} -dl.table h3, dl.function h3 {font-size: .95em;} - -/* stop sublists from having initial vertical space */ -ul ul { margin-top: 0px; } -ol ul { margin-top: 0px; } -ol ol { margin-top: 0px; } -ul ol { margin-top: 0px; } - -/* make the target distinct; helps when we're navigating to a function */ -a:target + * { - background-color: #FF9; +table.section-content-list td { + border-top: 1px solid #2C2C2C; + border-bottom: 1px solid #2C2C2C; + padding: 3px 7px 3px 7px; } -/* styles for prettification of source */ -pre .comment { color: #558817; } -pre .constant { color: #a8660d; } -pre .escape { color: #844631; } -pre .keyword { color: #aa5050; font-weight: bold; } -pre .library { color: #0e7c6b; } -pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; } -pre .string { color: #8080ff; } -pre .number { color: #f8660d; } -pre .operator { color: #2239a8; font-weight: bold; } -pre .preprocessor, pre .prepro { color: #a33243; } -pre .global { color: #800080; } -pre .prompt { color: #558817; } -pre .url { color: #272fc2; text-decoration: underline; } +table.section-content-list td.name { + background-color: #0D0D0D; + vertical-align: top; + white-space: nowrap; +} + +table.section-content-list td.summary { + min-width: 200px; + vertical-align: top; +} + +.section-content-list p {margin: 0px} + +div.section-item-header .section-item-title { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1.5rem; + margin-left: 3px; +} + +.section-title:target { + padding-left: 7px; + border-left: 5px solid #FF7200; + text-decoration: none; +} + +.section-item-title:target { + padding: 3px 5px 3px 5px; + background-color: #FF7200; + color: #000000; + text-decoration: none; +} + +.section-item-body {margin-left: 4rem} + +/*.section-subitem-li { + padding-left: 1.28571429em; + text-indent: -1.28571429em; +}*/ + +/*.section-subitem-module-field-li { + margin-left: -1.28571429em; + padding-left: 1.28571429em; + text-indent: -1.28571429em; +}*/ + +/* example pages */ + +pre.code.example{margin:0 0 1em} +pre.code.example code h2{display:none} +pre.code.example code pre{margin:0} + + +/* usage code */ + +code{background-color:#181818;color:#C8C8C8;font-size:1.3rem} +pre.code code{background-color:#282828;color:#C8C8C8;font-size:1.3rem} +pre.code .comment{color:#998d70} +pre.code .constant{color:#a8660d} +pre.code .escape{color:#844631} +pre.code .keyword{color:#c43724;font-weight:700} +pre.code .library{color:#0e7c6b} +pre.code .marker{color:#512b1e;background:#fedc56;font-weight:700} +pre.code .string{color:#99ca3c} +pre.code .number{color:#f8660d} +pre.code .operator{color:#2239a8;font-weight:700} +pre.code .preprocessor,pre .prepro{color:#a33243} +pre.code .global{color:#5798da} +pre.code .user-keyword{color:purple} +pre.code .prompt{color:#998d70} +pre.code .url{color:#272fc2;text-decoration:underline} + + +/* footer */ + +.footer{height:65px} +.sidebar-footer{text-align:left;padding-right:33px} +.content-footer{text-align:right} + + +/* misc */ + +.types {font-weight:bold;font-style:italic} + +.divider[data-content]::after,.divider-vert[data-content]::after{background:#262626;color:#C8C8C8} +.divider-custom{border-width:1px;border-color:#585959} + + +/* fragment hashtag */ + +.fragment-hashtag{color:#3C3C3C} +a.fragment-hashtag{color:#3C3C3C} +a.fragment-hashtag:hover{color:#FF7200} + + +/* mobile */ + +@media screen and (max-width: 540px) { + .up-to-top {display: none} + .sidebar-custom { + border-right: 1px solid #2C2C2C; + padding-right: 1.4rem; + bottom: 0rem; + margin-right: 0px; + } + .sidebar-footer { + text-align: right; + padding-right: 10px; + white-space: nowrap; + } + table.function_list td.name { + background-color: #0D0D0D; + vertical-align: top; + white-space: normal; + } + .function-item-spec-body-wrap {margin-left: 1.5rem} +} + + +/* tablets */ + +@media screen and (min-width: 540px) and (max-width: 780px) { + .sidebar-footer {white-space: nowrap} +} diff --git a/doc/ldoc.ltp b/doc/ldoc.ltp new file mode 100644 index 00000000..539ab547 --- /dev/null +++ b/doc/ldoc.ltp @@ -0,0 +1,416 @@ +> local iter = ldoc.modules.iter +> local M = ldoc.markup +> local use_li = ldoc.use_li +> local no_spaces = ldoc.no_spaces +> local display_name = ldoc.display_name + +> local function remove_parent_obj(obj) +> obj = obj:gsub(">Concepts%.(.*)<", ">%1<"):gsub(">Common%.(.*)<", ">%1<") +> obj = obj:gsub(">{Concepts%.(.*)}<", ">{%1}<"):gsub(">{Common%.(.*)}<", ">{%1}<") +> return obj +> end + + + + + + +> if module then + $(module.name) $(module.type) +> else + $(ldoc.title) +> end + +> if module then + + +> else + + +> end + + + + +
+
+ + + + + + + +
+ + +> if not module then +> for kind, mods in ldoc.kinds() do +

$(kind)

+> kind = kind:lower() + +> for m in mods() do + + +> if M(ldoc.strip_header(m.summary),m) ~= "" then + +> end + +> end -- for modules +
$(m.name)$(M(ldoc.strip_header(m.summary),m))
+> end -- for kinds +> end + + + +> if module then + + + +

$(module.name) $(module.type)

+

$(M(module.summary))

+

$(M(module.description))

+ +> if ldoc.body and module.type == "example" then +
$(ldoc.body:gsub("^

(.*%.lua)

(.*)$", "%2"):gsub("
(.*)
", "%1"):gsub("^%s*(.-)%s*$", "%1"))
+> elseif ldoc.body and module.type == "topic" then + $(M(ldoc.body)) +> end + + +> if module.info then +
    +> for tag, value in module.info:iter() do +
  • $(tag): $(M(value,module))
  • +> end +
+> end + + + +> if module.see then +

See also

+ +> end +> if module.usage then +

Usage

+> for usage in iter(module.usage) do +
$(ldoc.prettify(usage))
+> end +> end + + + + + +> if module and module.type ~= "topic" then +> for kind, items in module.kinds() do + + +

$(kind)

+ $(M(module.kinds:get_section_description(kind))) + + +> for item in items() do + + +> if item.summary ~= "" then + +> end + +> end + +
$(display_name(item))$(M(item.summary,item))
+> end +> end + + +
+ + +> if module and module.type ~= "topic" then +> for kind, items in module.kinds() do +

$(kind)

+
+> for item in items() do +
+
+
+ # + $(display_name(item)) +
+
+
+
+ +> if item.summary ~= "" or item.description ~= "" then +

$(M(item.summary))

+

$(M(item.description))

+> end + + +> if not ldoc.no_return_or_parms and item.params and #item.params > 0 then +> local module_item_subnames = module.kinds:type_of(item).subnames +> if module_item_subnames then + $(module_item_subnames): +> end + +
    + +> for param in iter(item.params) do +> local param, sublist = item:subparam(param) + +> if sublist then +
  • + $(sublist) : $(M(item.params.map[sublist], item)) +
      +> end + +> for p in iter(param) do + +> local name, tp, def = item:display_name_of(p), ldoc.typename(item:type_of_param(p)), item:default_of_param(p) + +> if not module_item_subnames then +
    • +> else +
    • +> end + + $(name) + +> if tp ~= "" or item.params.map[p] ~= "" then + : +> end + +> if tp ~= "" then + ($(remove_parent_obj(tp))) +> end + + $(remove_parent_obj(M(item.params.map[p], item))) + +> if def == true then + (optional) +> elseif def then + (default: $(def)) +> end +> if item:readonly(p) then + (readonly) +> end +
    • +> end + +> if sublist then +
    +
  • +> end +> end + +
+ +> end + + + +> if item.retgroups then +> local groups = item.retgroups + Returns: +> for i, group in ldoc.ipairs(groups) do +
    +> for r in group:iter() do +> local type, ctypes = item:return_type(r) +> local rt = ldoc.typename(type) +
  • +> if rt ~= '' then + ($(remove_parent_obj(rt))) +> end +> if r.text ~= '' then + $(remove_parent_obj(M(r.text, item))) +> end +> if ctypes then +
      +> for c in ctypes:iter() do +
    • + $(c.name) + ($(ldoc.typename(c.type))) + : $(M(c.comment, item)) +
    • +> end +
    +> end +
  • +> end +
+> if i < #groups then +
Or
+> end +> end +> end + + +> if item.raise then +
Raises
$(M(item.raise, item)) +> end + + +> if item.see then + See also: + +> end + + + +> if item.usage then + Usage: +> for usage in iter(item.usage) do +
$(ldoc.prettify(usage))
+> end +> end + + +
+> end +
+> end +> else + +
+> end +> end + + + +
+
+ + + + + diff --git a/doc/modules/Gui.html b/doc/modules/Gui.html new file mode 100644 index 00000000..493c008e --- /dev/null +++ b/doc/modules/Gui.html @@ -0,0 +1,805 @@ + + + + + + + + Gui module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Gui module

+

Core Module - Gui + - 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 separate files in ./gui

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.instances
expcore.gui.elements.buttons
expcore.gui.elements.checkbox
expcore.gui.elements.dropdown
expcore.gui.elements.slider
expcore.gui.elements.text
expcore.gui.elements.elem-button
expcore.gui.elements.progress-bar
expcore.gui.concepts.toolbar
expcore.gui.concepts.left
expcore.gui.concepts.center
expcore.gui.concepts.popups
+ + +

Test

+ + + + + + + + + + + + + + + + + + + +
expcore.gui
expcore.common
resources.color_presets
utils.event
expcore.store
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.instances +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.checkbox +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.dropdown +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.slider +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.text +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.elem-button +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.progress-bar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.toolbar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.left +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.center +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.popups +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Test

+
+
+
+
+ # + expcore.gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/Jail.html b/doc/modules/Jail.html new file mode 100644 index 00000000..a03abf37 --- /dev/null +++ b/doc/modules/Jail.html @@ -0,0 +1,1169 @@ + + + + + + + + Jail module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Jail module

+

Control Module - Jail + - Adds a way to jail players and temp ban players.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    local Jail = require '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')
+
+    -- This will give 'MrBiter' all his roles back and remove him from jail
+    -- again as above the player name is only used in the event for user feedback
+    Jail.unjail_player('MrBiter','Cooldude2606')
+
+    -- Temp ban works the same as jail but will store the reason and move the players items to spawn
+    -- this is meant to be used as a more permiment jail but not as strong as a ban
+    Jail.temp_ban_player('MrBiter','Cooldude2606','Likes biters too much')
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + +
expcore.rolesAllows moving players into the jail role
utils.gameAllows accessing a player from any value
utils.globalAllows storing data in the global table
expcore.commonUse of move_items to clear inventroies
+ + +

Events

+ + + + + + + + + + + + + + + + + + + + +
on_player_jailedWhen a player is assigned to jail
on_player_unjailedWhen a player is unassigned from jail
on_player_temp_bannedWhen a player is temp banned
on_player_untemp_bannedWhen a temp ban is removed from a player
+ + +

Jail functions

+ + + + + + + + + + + + + + + + +
is_jailed (player)Checks if the player is currently in jail
jail_player (player, by_player_name[, reason='Non given.'])Moves a player to jail and removes all other roles
unjail_player (player, by_player_name)Moves a player out of jail and restores all roles previously removed
+ + +

Temp ban functions

+ + + + + + + + + + + + + + + + +
is_temp_banned (player)Checks if a player is temp banned
temp_ban_player (player, by_player_name[, reason='Non given.'])Temp bans a player by moving them to jail, clearing all other roles, storing the reason, and moving their items to spawn
untemp_ban_player (player, by_player_name)Rrmoves a player from temp ban by clearing the stored reason, removing them from jail, and restoring previous roles
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.roles +
+
+
+
+ +

Allows moving players into the jail role

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ +

Allows accessing a player from any value

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ +

Allows storing data in the global table

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + expcore.common +
+
+
+
+ +

Use of move_items to clear inventroies

+

+ + + + + + + + + + + + + + +
+
+

Events

+
+
+
+
+ # + on_player_jailed +
+
+
+
+ +

When a player is assigned to jail

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was jailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who jailed the other player + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was jailed + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_player_unjailed +
+
+
+
+ +

When a player is unassigned from jail

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was unjailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who unjailed the other player + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_player_temp_banned +
+
+
+
+ +

When a player is temp banned

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was temp banned + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who temp banned the other player + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was temp banned + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_player_untemp_banned +
+
+
+
+ +

When a temp ban is removed from a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who was untemp banned + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who untemp banned the other player + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Jail functions

+
+
+
+
+ # + is_jailed (player) +
+
+
+
+ +

Checks if the player is currently in jail

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to check if they are in jail + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player is currently in jail +
  • +
+ + + + + + + + + +
+
+
+
+ # + jail_player (player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Moves a player to jail and removes all other roles

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player who will be jailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the jailing + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being jailed + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + wheather the user was jailed successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + unjail_player (player, by_player_name) +
+
+
+
+ +

Moves a player out of jail and restores all roles previously removed

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be unjailed + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player that is doing the unjail + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player was unjailed successfully +
  • +
+ + + + + + + + + +
+
+

Temp ban functions

+
+
+
+
+ # + is_temp_banned (player) +
+
+
+
+ +

Checks if a player is temp banned

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to check if they are temp banned + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player is temp banned +
  • +
+ + + + + + + + + +
+
+
+
+ # + temp_ban_player (player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Temp bans a player by moving them to jail, clearing all other roles, storing the reason, and moving their items to spawn

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will be temp banned + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the temp ban + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being temp banned + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player was successfully temp banned +
  • +
+ + + + + + + + + +
+
+
+
+ # + untemp_ban_player (player, by_player_name) +
+
+
+
+ +

Rrmoves a player from temp ban by clearing the stored reason, removing them from jail, and restoring previous roles

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player who is being removed from temp ban + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the untemp ban + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the player was successfully removed +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/Production.html b/doc/modules/Production.html new file mode 100644 index 00000000..ca9dbceb --- /dev/null +++ b/doc/modules/Production.html @@ -0,0 +1,1281 @@ + + + + + + + + Production module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Production module

+

Control Module - Production + - Common functions used to track production of items

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    local Production = require '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
+    Production.precision_up(defines.flow_precision_index.one_second)
+
+    -- The get production function is used to get production, consumion and net
+    -- it may be used for any item and with any precision level, use total for total
+    Production.get_production(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute)
+
+    -- The fluctuations works by compearing recent production with the average over time
+    -- again any precision may be used, apart from one_thousand_hours as there would be no valid average
+    Production.get_fluctuations(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute)
+
+    -- ETA is calculated based on what function you use but all share a similar method
+    -- for production eta it will take current production average given by the precision
+    -- and work out how many ticks it will require to make the required amount (1000 by default)
+    Production.get_production_eta(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute,250000)
+
+    -- Both get_color and format_number are helper functions to help format production stats
+    -- get_color will return green,orange,red,or grey based on the active_value
+    -- the passive_value is used when active_value is 0 and can only return orange,red,or grey
+    Production.get_color(clamp,active_value,passive_value)
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + +
resources.color_presetsProvides colors for Production.get_color
utilProvides format_number function to add surfixs
+ + +

Precision

+ + + + + + + + + + + + + + + + +
precision_up (precision)Gets the next lesser precision index value, eg 1 second -> 1 minute
precision_down (precision)Gets the next greater precision index value, eg 1 minute -> 1 second
precision_ticks (precision)Gets the number of tick that precision is given over, eg 1 minute -> 60 ticks
+ + +

Stats

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_production_total (force, item_name)Returns the production data for the whole game time
get_production (force, item_name, precision)Returns the production data for the given precision game time
get_fluctuations (force, item_name, precision)Returns the current fluctuation from the average
get_production_eta (force, item_name, precision[, required=1000])Returns the amount of ticks required to produce a certain amount
get_consumsion_eta (force, item_name, precision[, required=1000])Returns the amount of ticks required to consume a certain amount
get_net_eta (force, item_name, precision[, required=1000])Returns the amount of ticks required to produce but not consume a certain amount
+ + +

Formating

+ + + + + + + + + + + + +
get_color (clamp, active_value, passive_value)Returns a color value bassed on the value that was given
format_number (value)Returns three parts used to format a number
+ + +
+ + +

Dependencies

+
+
+
+
+ # + resources.color_presets +
+
+
+
+ +

Provides colors for Production.get_color

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + util +
+
+
+
+ +

Provides format_number function to add surfixs

+

+ + + + + + + + + + + + + + +
+
+

Precision

+
+
+
+
+ # + precision_up (precision) +
+
+
+
+ +

Gets the next lesser precision index value, eg 1 second -> 1 minute

+

+ + + Parameters: + + + + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + precision_down (precision) +
+
+
+
+ +

Gets the next greater precision index value, eg 1 minute -> 1 second

+

+ + + Parameters: + + + + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + precision_ticks (precision) +
+
+
+
+ +

Gets the number of tick that precision is given over, eg 1 minute -> 60 ticks

+

+ + + Parameters: + + + + + + + Returns: +
    +
  • + (number) + the number of ticks in this time +
  • +
+ + + + + + + + + +
+
+

Stats

+
+
+
+
+ # + get_production_total (force, item_name) +
+
+
+
+ +

Returns the production data for the whole game time

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains total made, used and net +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_production (force, item_name, precision) +
+
+
+
+ +

Returns the production data for the given precision game time

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains made, used and net +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_fluctuations (force, item_name, precision) +
+
+
+
+ +

Returns the current fluctuation from the average

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains made, used and net +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_production_eta (force, item_name, precision[, required=1000]) +
+
+
+
+ +

Returns the amount of ticks required to produce a certain amount

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + + + + +
  • + + required + + : + + (number) + + the number of items that are required to be made + + (default: 1000) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to produce this ammount of items +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_consumsion_eta (force, item_name, precision[, required=1000]) +
+
+
+
+ +

Returns the amount of ticks required to consume a certain amount

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + + + + +
  • + + required + + : + + (number) + + the number of items that are required to be consumed + + (default: 1000) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to consume this ammount of items +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_net_eta (force, item_name, precision[, required=1000]) +
+
+
+
+ +

Returns the amount of ticks required to produce but not consume a certain amount

+

+ + + Parameters: + +
    + + + + + +
  • + + force + + : + + (LuaForce) + + the force to get the data for + +
  • + + + + + +
  • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
  • + + + + + +
  • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
  • + + + + + +
  • + + required + + : + + (number) + + the number of items that are required to be made but not used + + (default: 1000) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of ticks required to produce, but not use, this ammount of items +
  • +
+ + + + + + + + + +
+
+

Formating

+
+
+
+
+ # + get_color (clamp, active_value, passive_value) +
+
+
+
+ +

Returns a color value bassed on the value that was given

+

+ + + Parameters: + +
    + + + + + +
  • + + clamp + + : + + (number) + + value which seperates the different colours + +
  • + + + + + +
  • + + active_value + + : + + (number) + + first value tested, tested against clamp + +
  • + + + + + +
  • + + passive_value + + : + + (number) + + second value tested, tested against 0 + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains r,g,b keys +
  • +
+ + + + + + + + + +
+
+
+
+ # + format_number (value) +
+
+
+
+ +

Returns three parts used to format a number

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (number) + + the value to format + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the sign for the number +
  • +
  • + (string) + the surfix for any unit used +
  • +
  • + (string) + the number formated +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/Reports.html b/doc/modules/Reports.html new file mode 100644 index 00000000..35edb453 --- /dev/null +++ b/doc/modules/Reports.html @@ -0,0 +1,1026 @@ + + + + + + + + Reports module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Reports module

+

Control Module - Reports + - Adds a way to report players and store report messages.

+

+ + + + + + +

Usage

+

+    -- import the module from the control modules
+    local Reports = require '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.
+    Reports.report_player('MrBiter','Cooldude2606','Liking biters too much') -- true
+
+    -- The other get methods can be used to get all the reports on a player or to test if a player is reported.
+    Reports.get_report('MrBiter','Cooldude2606') -- 'Liking biters too much'
+
+    -- This will remove the warning on 'MrBiter' (must be a valid player) which was made by 'Cooldude2606'.
+    Reports.remove_report('MrBiter','Cooldude2606') -- true
+
+    -- This will remove all the report that have been made against 'MrBiter'. Note that the remove event will
+    -- be triggered once per report issused.
+    Reports.remove_all('MrBiter') -- true
+
+ + + + + + + +

Events

+ + + + + + + + + + + + +
on_player_reportedWhen a player is reported
on_report_removedWhen a report is removed from a player
+ + +

Dependencies

+ + + + + + + + + + + + +
utils.gameAllows getting player from any value
utils.globalAllows storing of data in global table
+ + +

Get functions

+ + + + + + + + + + + + + + + + + + + + +
get_reports (player)Gets a list of all reports that a player has against them
get_report (player, by_player_name)Gets a single report against a player given the name of the player who made the report
is_reported (player[, by_player_name])Checks if a player is reported, option to get if reported by a certain player
count_reports (player[, custom_count])Counts the number of reports that a player has aganist them
+ + +

Set functions

+ + + + + + + + + + + + + + + + +
report_player (player, by_player_name[, reason='Non given.'])Adds a report to a player, each player can only report another player once
remove_report (player, reported_by_name)Removes a report from a player
remove_all (player)Removes all reports from a player
+ + +
+ + +

Events

+
+
+
+
+ # + on_player_reported +
+
+
+
+ +

When a player is reported

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the player index of the player who got reported + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who made the report + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason given for the report + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_report_removed +
+
+
+
+ +

When a report is removed from a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the player index of the player who has the report removed + +
  • + + + + + +
  • + + reported_by_name + + : + + (string) + + the name of the player who made the removed report + +
  • + + + + + +
  • + + removed_by_name + + : + + (string) + + the name of the player who removed the report + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ +

Allows getting player from any value

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ +

Allows storing of data in global table

+

+ + + + + + + + + + + + + + +
+
+

Get functions

+
+
+
+
+ # + get_reports (player) +
+
+
+
+ +

Gets a list of all reports that a player has against them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a list of all reports, key is by player name, value is reason +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_report (player, by_player_name) +
+
+
+
+ +

Gets a single report against a player given the name of the player who made the report

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who made the report + +
  • + + +
+ + + + + Returns: +
    +
  • + (string or nil) + string is the reason that the player was reported, if the player is not reported +
  • +
+ + + + + + + + + +
+
+
+
+ # + is_reported (player[, by_player_name]) +
+
+
+
+ +

Checks if a player is reported, option to get if reported by a certain player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to check if reported + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + when given will check if reported by this player + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + if the player has been reported +
  • +
+ + + + + + + + + +
+
+
+
+ # + count_reports (player[, custom_count]) +
+
+
+
+ +

Counts the number of reports that a player has aganist them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to count the reports for + +
  • + + + + + +
  • + + custom_count + + : + + (function) + + when given this function will be used to count the reports + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of reports that the user has +
  • +
+ + + + + + + + + +
+
+

Set functions

+
+
+
+
+ # + report_player (player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Adds a report to a player, each player can only report another player once

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to add the report to + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player that is making the report + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being reported + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the report was added successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_report (player, reported_by_name) +
+
+
+
+ +

Removes a report from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove the report from + +
  • + + + + + +
  • + + reported_by_name + + : + + (string) + + the name of the player that made the report + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the report was removed successfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_all (player) +
+
+
+
+ +

Removes all reports from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove the reports from + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + whether the reports were removed successfully +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/Warnings.html b/doc/modules/Warnings.html new file mode 100644 index 00000000..69fcc9c9 --- /dev/null +++ b/doc/modules/Warnings.html @@ -0,0 +1,1279 @@ + + + + + + + + Warnings module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Warnings module

+

Control Module - Warnings + - Adds a way to give and remove warnings to players.

+

+ + + + + + +

Usage

+

+    -- This will add a warning to the player
+    Warnings.add_warning('MrBiter','Cooldude2606','Killed too many biters')
+
+    -- This will remove a warning from a player, second name is just who is doing the action
+    Warnings.remove_warning('MrBiter','Cooldude2606')
+
+    -- Script warning as similar to normal warning but are designed to have no effect for a short amount of time
+    -- this is so it can be used for greifer protection without being too agressive
+    Warnings.add_script_warning('MrBiter','Killed too many biters')
+
+    -- Both normal and script warnings can also be cleared, this will remove all warnings
+    Warnings.clear_warnings('MrBiter','Cooldude2606')
+ + + + + + + +

Events

+ + + + + + + + + + + + + + + + + + + + +
on_warning_addedWhen a warning is added to a player
on_warning_removedWhen a warning is removed from a player
on_script_warning_addedWhen a warning is added to a player, by the script
on_script_warning_removedWhen a warning is remnoved from a player, by the script
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
get_warnings (player)Gets an array of warnings that the player has, always returns a list even if emtpy
count_warnings (player)Gets the number of warnings that a player has on them
add_warning (player, by_player_name[, reason='Non given.'])Adds a warning to a player, when a warning is added a set action is done based on the number of warnings and the config file
remove_warning (player, by_player_name)Removes a warning from a player, always removes the earlyist warning, fifo
clear_warnings (player, by_player_name)Removes all warnings from a player, will trigger remove event for each warning
get_script_warnings (player)Gets an array of all the script warnings that a player has
count_script_warnings (player)Gets the number of script warnings that a player has on them
add_script_warning (player[, reason='Non given.'])Adds a script warning to a player, this may add a full warning if max script warnings is met
remove_script_warning (player)Removes a script warning from a player
clear_script_warnings (player)Removes all script warnings from a player, emits event for each warning removed
+ + +
+ + +

Events

+
+
+
+
+ # + on_warning_added +
+
+
+
+ +

When a warning is added to a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who recived the warning + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who gave the warning + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was given a warning + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_warning_removed +
+
+
+
+ +

When a warning is removed from a player

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who is having the warning removed + +
  • + + + + + +
  • + + warning_by_name + + : + + (string) + + the name of the player who gave the warning + +
  • + + + + + +
  • + + removed_by_name + + : + + (string) + + the name of the player who is removing the warning + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_script_warning_added +
+
+
+
+ +

When a warning is added to a player, by the script

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who recived the warning + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player was given a warning + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + on_script_warning_removed +
+
+
+
+ +

When a warning is remnoved from a player, by the script

+

+ + + Event Parameters: + +
    + + + + + +
  • + + player_index + + : + + (number) + + the index of the player who is having the warning removed + +
  • + + + + + +
  • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + get_warnings (player) +
+
+
+
+ +

Gets an array of warnings that the player has, always returns a list even if emtpy

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the warning for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + an array of all the warnings on this player, contains tick, by_player_name and reason +
  • +
+ + + + + + + + + +
+
+
+
+ # + count_warnings (player) +
+
+
+
+ +

Gets the number of warnings that a player has on them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to count the warnings for + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + add_warning (player, by_player_name[, reason='Non given.']) +
+
+
+
+ +

Adds a warning to a player, when a warning is added a set action is done based on the number of warnings and the config file

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to add a warning to + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being warned + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_warning (player, by_player_name) +
+
+
+
+ +

Removes a warning from a player, always removes the earlyist warning, fifo

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove a warning from + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + clear_warnings (player, by_player_name) +
+
+
+
+ +

Removes all warnings from a player, will trigger remove event for each warning

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the warnings from + +
  • + + + + + +
  • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true when warnings were cleared succesfully +
  • +
+ + + + + + + + + +
+
+
+
+ # + get_script_warnings (player) +
+
+
+
+ +

Gets an array of all the script warnings that a player has

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the script warnings of + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + a table of all the script warnings a player has, contains tick and reason +
  • +
+ + + + + + + + + +
+
+
+
+ # + count_script_warnings (player) +
+
+
+
+ +

Gets the number of script warnings that a player has on them

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to count the script warnings of + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of script warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + add_script_warning (player[, reason='Non given.']) +
+
+
+
+ +

Adds a script warning to a player, this may add a full warning if max script warnings is met

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to add a script warning to + +
  • + + + + + +
  • + + reason + + : + + (string) + + the reason that the player is being warned + + (default: 'Non given.') +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of script warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + remove_script_warning (player) +
+
+
+
+ +

Removes a script warning from a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to remove a script warning from + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of script warnings that the player has +
  • +
+ + + + + + + + + +
+
+
+
+ # + clear_script_warnings (player) +
+
+
+
+ +

Removes all script warnings from a player, emits event for each warning removed

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the script warnings from + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/addons.advanced-start.html b/doc/modules/addons.advanced-start.html new file mode 100644 index 00000000..71ef2c75 --- /dev/null +++ b/doc/modules/addons.advanced-start.html @@ -0,0 +1,71 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module addons.advanced-start

+

Adds a better method of player starting items based on production levels.

+

+ + + +
+
+ + + + +
+
+
+generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
+
+ + diff --git a/doc/modules/addons.chat-popups.html b/doc/modules/addons.chat-popups.html new file mode 100644 index 00000000..df8efb1e --- /dev/null +++ b/doc/modules/addons.chat-popups.html @@ -0,0 +1,72 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module addons.chat-popups

+

Creates flying text entities when a player sends a message in chat + also displays a ping above users who are named in the message

+

+ + + +
+
+ + + + +
+
+
+generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
+
+ + diff --git a/doc/modules/addons.damage-popups.html b/doc/modules/addons.damage-popups.html new file mode 100644 index 00000000..89bc2255 --- /dev/null +++ b/doc/modules/addons.damage-popups.html @@ -0,0 +1,72 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module addons.damage-popups

+

Displays the amount of dmg that is done by players to entities + also shows player health when a player is attacked

+

+ + + +
+
+ + + + +
+
+
+generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
+
+ + diff --git a/doc/modules/config._file_loader.html b/doc/modules/config._file_loader.html index 2b4403f7..6feb3502 100644 --- a/doc/modules/config._file_loader.html +++ b/doc/modules/config._file_loader.html @@ -1,121 +1,235 @@ - - - - - Reference + + + + + + + + config._file_loader module + + + - - + + -
+
+
-
- -
-
-
+ + + - - + + + + +
+
+
+ + + + diff --git a/doc/modules/config.action_buttons.html b/doc/modules/config.action_buttons.html index ae1730dc..0dd6dbf0 100644 --- a/doc/modules/config.action_buttons.html +++ b/doc/modules/config.action_buttons.html @@ -1,122 +1,515 @@ - - - - - Reference + + + + + + + + config.action_buttons module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.advanced_start.html b/doc/modules/config.advanced_start.html index e1826c7e..5c01fd7d 100644 --- a/doc/modules/config.advanced_start.html +++ b/doc/modules/config.advanced_start.html @@ -1,118 +1,232 @@ - - - - - Reference + + + + + + + + config.advanced_start module + + + - - + + -
+
+
-
- -
-
-
+ + + - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.bonuses.html b/doc/modules/config.bonuses.html new file mode 100644 index 00000000..15f7f5a8 --- /dev/null +++ b/doc/modules/config.bonuses.html @@ -0,0 +1,232 @@ + + + + + + + + config.bonuses module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.bonuses module

+

Lists all bonuses which can be used, name followed by min max

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.chat_reply.html b/doc/modules/config.chat_reply.html new file mode 100644 index 00000000..0f1367a1 --- /dev/null +++ b/doc/modules/config.chat_reply.html @@ -0,0 +1,287 @@ + + + + + + + + config.chat_reply module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.chat_reply module

+

This file defines the different triggers for the chat bot

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + +
expcore.common
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.common +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/config.death_logger.html b/doc/modules/config.death_logger.html index 98437177..d800df68 100644 --- a/doc/modules/config.death_logger.html +++ b/doc/modules/config.death_logger.html @@ -1,120 +1,234 @@ - - - - - Reference + + + + + + + + config.death_logger module + + + - - + + -
+
+
-
- -
-
-
+ + + - - + + + + +
+
+
+ + + + diff --git a/doc/modules/config.discord_alerts.html b/doc/modules/config.discord_alerts.html new file mode 100644 index 00000000..d90c30e2 --- /dev/null +++ b/doc/modules/config.discord_alerts.html @@ -0,0 +1,233 @@ + + + + + + + + config.discord_alerts module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.discord_alerts module

+

Config file used to enable and disable different push messages for discord

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.expcore-commands.auth_admin.html b/doc/modules/config.expcore-commands.auth_admin.html index 3a780c6b..7948bb6c 100644 --- a/doc/modules/config.expcore-commands.auth_admin.html +++ b/doc/modules/config.expcore-commands.auth_admin.html @@ -1,120 +1,282 @@ - - - - - Reference + + + + + + + + config.expcore-commands.auth_admin module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.expcore-commands.auth_roles.html b/doc/modules/config.expcore-commands.auth_roles.html index 328cf7df..d7b9bc5f 100644 --- a/doc/modules/config.expcore-commands.auth_roles.html +++ b/doc/modules/config.expcore-commands.auth_roles.html @@ -1,118 +1,315 @@ - - - - - Reference + + + + + + + + config.expcore-commands.auth_roles module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.expcore-commands.auth_runtime_disable.html b/doc/modules/config.expcore-commands.auth_runtime_disable.html index f8f18960..93ea32d7 100644 --- a/doc/modules/config.expcore-commands.auth_runtime_disable.html +++ b/doc/modules/config.expcore-commands.auth_runtime_disable.html @@ -1,119 +1,316 @@ - - - - - Reference + + + + + + + + config.expcore-commands.auth_runtime_disable module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.expcore-commands.parse_general.html b/doc/modules/config.expcore-commands.parse_general.html index 3b6006bd..7fe058b7 100644 --- a/doc/modules/config.expcore-commands.parse_general.html +++ b/doc/modules/config.expcore-commands.parse_general.html @@ -1,122 +1,319 @@ - - - - - Reference + + + + + + + + config.expcore-commands.parse_general module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.expcore-commands.parse_roles.html b/doc/modules/config.expcore-commands.parse_roles.html index 45f17c50..2c0885f6 100644 --- a/doc/modules/config.expcore-commands.parse_roles.html +++ b/doc/modules/config.expcore-commands.parse_roles.html @@ -1,118 +1,343 @@ - - - - - Reference + + + + + + + + config.expcore-commands.parse_roles module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.permission_groups.html b/doc/modules/config.permission_groups.html index c9572f7f..fc44964f 100644 --- a/doc/modules/config.permission_groups.html +++ b/doc/modules/config.permission_groups.html @@ -1,121 +1,347 @@ - - - - - Reference + + + + + + + + config.permission_groups module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.popup_messages.html b/doc/modules/config.popup_messages.html index 93daa302..1fe88709 100644 --- a/doc/modules/config.popup_messages.html +++ b/doc/modules/config.popup_messages.html @@ -1,118 +1,234 @@ - - - - - Reference + + + + + + + + config.popup_messages module + + + - - + + -
+
+
-
- -
-
-
+ + + - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.rockets.html b/doc/modules/config.rockets.html index 93c35073..908b558a 100644 --- a/doc/modules/config.rockets.html +++ b/doc/modules/config.rockets.html @@ -1,165 +1,324 @@ - - - - - Reference + + + + + + + + config.rockets module + + + - - + + -
+
+
-
- -
-
-
+ + + - - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.roles.html b/doc/modules/config.roles.html index 62b973ec..ce60d7ec 100644 --- a/doc/modules/config.roles.html +++ b/doc/modules/config.roles.html @@ -1,118 +1,290 @@ - - - - - Reference + + + + + + + + config.roles module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/config.scorched_earth.html b/doc/modules/config.scorched_earth.html index 22741e11..0b10a247 100644 --- a/doc/modules/config.scorched_earth.html +++ b/doc/modules/config.scorched_earth.html @@ -1,118 +1,235 @@ - - - - - Reference + + + + + + + + config.scorched_earth module + + + - - + + -
+
+
-
- -
-
-
+ + + - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.spawn_area.html b/doc/modules/config.spawn_area.html index e25138fb..01013de6 100644 --- a/doc/modules/config.spawn_area.html +++ b/doc/modules/config.spawn_area.html @@ -1,118 +1,235 @@ - - - - - Reference + + + + + + + + config.spawn_area module + + + - - + + -
+
+
-
- -
-
-
+ + + - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.warnings.html b/doc/modules/config.warnings.html index d087da36..4fc67842 100644 --- a/doc/modules/config.warnings.html +++ b/doc/modules/config.warnings.html @@ -1,118 +1,235 @@ - - - - - Reference + + + + + + + + config.warnings module + + + - - + + -
+
+
-
- -
-
-
+ + + - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.warps.html b/doc/modules/config.warps.html new file mode 100644 index 00000000..e0a4c5e2 --- /dev/null +++ b/doc/modules/config.warps.html @@ -0,0 +1,235 @@ + + + + + + + + config.warps module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.warps module

+

This file contains all the different settings for the warp system and gui

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/control.html b/doc/modules/control.html index 73a8a5b4..2e7d23d6 100644 --- a/doc/modules/control.html +++ b/doc/modules/control.html @@ -1,121 +1,359 @@ - - - - - Reference + + + + + + + + control module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/control.reports.html b/doc/modules/control.reports.html new file mode 100644 index 00000000..eee1ba64 --- /dev/null +++ b/doc/modules/control.reports.html @@ -0,0 +1,341 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module control.reports

+

Gets a list of all reports that a player has against them

+

+ + +

Get functions

+ + + + + + + + + + + + + + + + + +
Reports.get_reports (player)Gets a list of all reports that a player has against them
Reports.get_report (player[, by_player_name='server'])Gets a single report against a player given the name of the player who made the report
Reports.is_reported (player[, by_player_name])Checks if a player is reported, option to get if reported by a certain player
Reports.count (player[, custom_count])Counts the number of reports that a player has aganist them
+

Set functions

+ + + + + + + + + + + + + +
Reports.report_player (player[, by_player_name='server'[, reason='Non Given.']])Adds a report to a player, each player can only report another player once
Reports.remove_report (player[, by_player_name='server'])Removes a report from a player
Reports.remove_all (player)Removes all reports from a player
+ +
+
+ + +

Get functions

+ + + Functions used to get information from reports +
+
+ + Reports.get_reports (player) +
+
+ Gets a list of all reports that a player has against them + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to get the report for +
  • +
+ +

Returns:

+
    + + table + a list of all reports, key is by player name, value is reason +
+ + + + +
+
+ + Reports.get_report (player[, by_player_name='server']) +
+
+ Gets a single report against a player given the name of the player who made the report + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to get the report for +
  • +
  • by_player_name + string + the name of the player who made the report + (default 'server') +
  • +
+ +

Returns:

+
    + + string or nil + string is the reason that the player was reported, if the player is not reported +
+ + + + +
+
+ + Reports.is_reported (player[, by_player_name]) +
+
+ Checks if a player is reported, option to get if reported by a certain player + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to check if reported +
  • +
  • by_player_name + string + when given will check if reported by this player + (optional) +
  • +
+ +

Returns:

+
    + + boolean + if the player has been reported +
+ + + + +
+
+ + Reports.count (player[, custom_count]) +
+
+ Counts the number of reports that a player has aganist them + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to count the reports for +
  • +
  • custom_count + function + when given this function will be used to count the reports + (optional) +
  • +
+ +

Returns:

+
    + + number + the number of reports that the user has +
+ + + + +
+
+

Set functions

+ + + Functions used to get information from reports +
+
+ + Reports.report_player (player[, by_player_name='server'[, reason='Non Given.']]) +
+
+ Adds a report to a player, each player can only report another player once + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to add the report to +
  • +
  • by_player_name + string + the name of the player that is making the report + (default 'server') +
  • +
  • reason + string + the reason that the player is being reported + (default 'Non Given.') +
  • +
+ +

Returns:

+
    + + boolean + whether the report was added successfully +
+ + + + +
+
+ + Reports.remove_report (player[, by_player_name='server']) +
+
+ Removes a report from a player + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to remove the report from +
  • +
  • by_player_name + string + the name of the player that made the report + (default 'server') +
  • +
+ +

Returns:

+
    + + boolean + whether the report was removed successfully +
+ + + + +
+
+ + Reports.remove_all (player) +
+
+ Removes all reports from a player + + +

Parameters:

+
    +
  • player + LuaPlayer + the player to remove the reports from +
  • +
+ +

Returns:

+
    + + boolean + whether the reports were removed successfully +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.4.3 +Last updated 2019-06-21 18:40:35 +
+
+ + diff --git a/doc/modules/expcore.commands.html b/doc/modules/expcore.commands.html index a41d8db7..1ff1dfca 100644 --- a/doc/modules/expcore.commands.html +++ b/doc/modules/expcore.commands.html @@ -1,123 +1,264 @@ - - - - - Reference + + + + + + + + expcore.commands module + + + - - + + -
+
+
-
- -
-
-
+ + + - - + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/expcore.common.html b/doc/modules/expcore.common.html index 83fc1ed4..3b4cbc89 100644 --- a/doc/modules/expcore.common.html +++ b/doc/modules/expcore.common.html @@ -1,996 +1,2444 @@ - - - - - Reference + + + + + + + + expcore.common module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/expcore.gui.concepts.center.html b/doc/modules/expcore.gui.concepts.center.html new file mode 100644 index 00000000..c2353ac0 --- /dev/null +++ b/doc/modules/expcore.gui.concepts.center.html @@ -0,0 +1,1126 @@ + + + + + + + + expcore.gui.concepts.center module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.concepts.center module

+

Gui structure define for center gui frames +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.gui.concepts.toolbar
utils.game
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CenterFrames.get_flow(player)Gets the center flow for a player
CenterFrames.clear_flow(player)Clears the center flow for a player
CenterFrames.draw_frame(player, name)Draws the center frame for a player, if already open then will do nothing
CenterFrames.redraw_frame(player, name)Draws the center frame for a player, if already open then will destroy it and redraw
CenterFrames.toggle_frame(player, name[, state])Toggles if the frame is currently open or not, will open if closed and close if open
CenterFrames.new_frame(permission_name)Creates a new center frame define
CenterFrames._prototype:set_auto_focus([state=true])Sets the frame to be the current active gui when opened and closes all other frames
CenterFrames._prototype:draw_frame(player)Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)
CenterFrames._prototype:redraw_frame(player)Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)
CenterFrames._prototype:toggle_frame(player)Toggles if the frame is open, if open it will close it and if closed it will open it
CenterFrames._prototype:event_handler([action=update])Creates an event handler that will trigger one of its functions, use with Event.add
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.toolbar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + CenterFrames.get_flow(player) +
+
+
+
+ +

Gets the center flow for a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow for + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames.clear_flow(player) +
+
+
+
+ +

Clears the center flow for a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to clear the flow for + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + CenterFrames.draw_frame(player, name) +
+
+
+
+ +

Draws the center frame for a player, if already open then will do nothing

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the frame drawn + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the hui that will drawn + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames.redraw_frame(player, name) +
+
+
+
+ +

Draws the center frame for a player, if already open then will destroy it and redraw

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the frame drawn + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the hui that will drawn + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames.toggle_frame(player, name[, state]) +
+
+
+
+ +

Toggles if the frame is currently open or not, will open if closed and close if open

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player that will have the frame toggled + +
  • + + + + + +
  • + + name + + : + + (string) + + the name of the hui that will be toggled + +
  • + + + + + +
  • + + state + + : + + (boolean) + + when set will force a state for the frame + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + if the frame if no open or closed +
  • +
+ + + + + + + + + +
+
+
+
+ # + CenterFrames.new_frame(permission_name) +
+
+
+
+ +

Creates a new center frame define

+

+ + + Parameters: + +
    + + + + + +
  • + + permission_name + + : + + (string) + + the name that can be used with the permission system + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new center frame define +
  • +
+ + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:set_auto_focus([state=true]) +
+
+
+
+ +

Sets the frame to be the current active gui when opened and closes all other frames

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when true will auto close other frames and set this frame as player.opened + + (default: true) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:draw_frame(player) +
+
+
+
+ +

Draws this frame to the player, if already open does nothing (will call on_draw to draw to the frame)

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame for + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:redraw_frame(player) +
+
+
+
+ +

Draws this frame to the player, if already open it will remove it and redraw it (will call on_draw to draw to the frame)

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame for + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:toggle_frame(player) +
+
+
+
+ +

Toggles if the frame is open, if open it will close it and if closed it will open it

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame for + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + with the gui frame is now open +
  • +
+ + + + + + + + + +
+
+
+
+ # + CenterFrames._prototype:event_handler([action=update]) +
+
+
+
+ +

Creates an event handler that will trigger one of its functions, use with Event.add

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + the action to take on this event + + (default: update) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.concepts.left.html b/doc/modules/expcore.gui.concepts.left.html new file mode 100644 index 00000000..8c7b6772 --- /dev/null +++ b/doc/modules/expcore.gui.concepts.left.html @@ -0,0 +1,1476 @@ + + + + + + + + expcore.gui.concepts.left module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.concepts.left module

+

Gui structure define for left frames +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.gui.concepts.toolbar
expcore.gui.elements.buttons
mod-gui
utils.game
utils.event
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LeftFrames.get_flow(player)Gets the left frame flow for a player
LeftFrames.get_frame(name, player)Gets one frame from the left flow by its name
LeftFrames.get_open(player)Gets all open frames for a player, if non are open it will remove the close all button
LeftFrames.toggle_frame(name, player[, state])Toggles the visibility of a left frame, or sets its visibility state
LeftFrames.new_frame(permission_name)Creates a new left frame define
LeftFrames._prototype:set_open_by_default([state=true])Sets if the frame is visible when a player joins, can also be a function to return a boolean
LeftFrames._prototype:set_direction(direction)Sets the direction of the frame, either vertical or horizontal
LeftFrames._prototype:_internal_draw(player)Creates the gui for the first time, used internally
LeftFrames._prototype:get_frame(player)Gets the frame for this define from the left frame flow
LeftFrames._prototype:is_open(player)Returns if the player currently has this define visible
LeftFrames._prototype:toggle(player)Toggles the visibility of the left frame
LeftFrames._prototype:update(player)Updates the contents of the left frame, first tries update callback, other wise will clear and redraw
LeftFrames._prototype:update_all([update_offline=false])Updates the frame for all players, see update
LeftFrames._prototype:redraw(player)Redraws the frame by calling on_draw, will always clear the frame
LeftFrames._prototype:redraw_all([update_offline=false])Redraws the frame for all players, see redraw
LeftFrames._prototype:event_handler([action=update])Creates an event handler that will trigger one of its functions, use with Event.add
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.concepts.toolbar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + LeftFrames.get_flow(player) +
+
+
+
+ +

Gets the left frame flow for a player

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow of + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + LeftFrames.get_frame(name, player) +
+
+
+
+ +

Gets one frame from the left flow by its name

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the gui frame to get + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame in the left frame flow with that name +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames.get_open(player) +
+
+
+
+ +

Gets all open frames for a player, if non are open it will remove the close all button

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow of + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + contains all the open (and registered) frames for the player +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames.toggle_frame(name, player[, state]) +
+
+
+
+ +

Toggles the visibility of a left frame, or sets its visibility state

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the gui frame to toggle + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + + + + +
  • + + state + + : + + (boolean) + + when given will be the state that the visibility is set to + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the new state of the visibility +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames.new_frame(permission_name) +
+
+
+
+ +

Creates a new left frame define

+

+ + + Parameters: + +
    + + + + + +
  • + + permission_name + + : + + (string) + + the name that can be used with the permission system + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new left frame define +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:set_open_by_default([state=true]) +
+
+
+
+ +

Sets if the frame is visible when a player joins, can also be a function to return a boolean

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean or 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 + + (default: true) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:set_direction(direction) +
+
+
+
+ +

Sets the direction of the frame, either vertical or horizontal

+

+ + + Parameters: + +
    + + + + + +
  • + + direction + + : + + (string) + + the direction to have the elements be added to the frame + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:_internal_draw(player) +
+
+
+
+ +

Creates the gui for the first time, used internally

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to draw the frame to + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:get_frame(player) +
+
+
+
+ +

Gets the frame for this define from the left frame flow

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame in the left frame flow for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:is_open(player) +
+
+
+
+ +

Returns if the player currently has this define visible

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if it is open/visible +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:toggle(player) +
+
+
+
+ +

Toggles the visibility of the left frame

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to toggle the frame of + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + the new state of the visibility +
  • +
+ + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:update(player) +
+
+
+
+ +

Updates the contents of the left frame, first tries update callback, other wise will clear and redraw

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to update the frame of + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:update_all([update_offline=false]) +
+
+
+
+ +

Updates the frame for all players, see update

+

+ + + Parameters: + +
    + + + + + +
  • + + update_offline + + : + + (boolean) + + when true will update the frame for offline players + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:redraw(player) +
+
+
+
+ +

Redraws the frame by calling on_draw, will always clear the frame

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to update the frame of + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:redraw_all([update_offline=false]) +
+
+
+
+ +

Redraws the frame for all players, see redraw

+

+ + + Parameters: + +
    + + + + + +
  • + + update_offline + + : + + (boolean) + + when true will update the frame for offline players + + (default: false) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + LeftFrames._prototype:event_handler([action=update]) +
+
+
+
+ +

Creates an event handler that will trigger one of its functions, use with Event.add

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + the action to take on this event + + (default: update) +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.concepts.popups.html b/doc/modules/expcore.gui.concepts.popups.html new file mode 100644 index 00000000..ec65c5df --- /dev/null +++ b/doc/modules/expcore.gui.concepts.popups.html @@ -0,0 +1,1012 @@ + + + + + + + + expcore.gui.concepts.popups module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.concepts.popups module

+

Gui structure define for popup gui +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
utils.event
expcore.gui.elements.progress-bar
expcore.gui.elements.buttons
mod-gui
resources.color_presets
utils.global
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + +
PopupFrames.get_flow(player)Gets the left flow that contains the popup frames
PopupFrames.open(define_name, player[, open_time], ...)Opens a popup for the player, can give the amount of time it is open as well as params for the draw function
PopupFrames.new_popup([name])Creates a new popup frame define
PopupFrames._prototype:set_default_open_time(amount)Sets the default open time for the popup, will be used if non is provided with open
PopupFrames._prototype:open(player[, open_time], ...)Opens this define for a player, can be given open time and any other params for the draw function
+ + +

Fields

+ + + + + + + + + + + + +
PopupFrames.close_progressProgress bar which when depleted will close the popup frame
PopupFrames.close_buttonA button which can be used to close the gui before the timer runs out
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.progress-bar +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + resources.color_presets +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + PopupFrames.get_flow(player) +
+
+
+
+ +

Gets the left flow that contains the popup frames

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to get the flow for + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the left flow that contains the popup frames +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames.open(define_name, player[, open_time], ...) +
+
+
+
+ +

Opens a popup for the player, can give the amount of time it is open as well as params for the draw function

+

+ + + Parameters: + +
    + + + + + +
  • + + define_name + + : + + (string) + + the name of the define that you want to open for the player + +
  • + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to open the popup for + +
  • + + + + + +
  • + + open_time + + : + + (number) + + the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default + + (optional) +
  • + + + + + +
  • + + ... + + : + + (any) + + the other params that you want to pass to your on_draw event + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame that was drawn, the inner gui flow which contains the content +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames.new_popup([name]) +
+
+
+
+ +

Creates a new popup frame define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new popup frame define +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames._prototype:set_default_open_time(amount) +
+
+
+
+ +

Sets the default open time for the popup, will be used if non is provided with open

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the number of ticks, by default, the popup will be open for + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + PopupFrames._prototype:open(player[, open_time], ...) +
+
+
+
+ +

Opens this define for a player, can be given open time and any other params for the draw function

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to open the popup for + +
  • + + + + + +
  • + + open_time + + : + + (number) + + the minimum number of ticks you want the popup open for, 0 means no limit, nil will take default + + (optional) +
  • + + + + + +
  • + + ... + + : + + (any) + + the other params that you want to pass to your on_draw event + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the frame that was drawn, the inner gui flow which contains the content +
  • +
+ + + + + + + + + +
+
+

Fields

+
+
+
+
+ # + PopupFrames.close_progress +
+
+
+
+ +

Progress bar which when depleted will close the popup frame

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + PopupFrames.close_button +
+
+
+
+ +

A button which can be used to close the gui before the timer runs out

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.concepts.toolbar.html b/doc/modules/expcore.gui.concepts.toolbar.html new file mode 100644 index 00000000..c7846884 --- /dev/null +++ b/doc/modules/expcore.gui.concepts.toolbar.html @@ -0,0 +1,635 @@ + + + + + + + + expcore.gui.concepts.toolbar module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.concepts.toolbar module

+

Gui structure for the toolbar (top left) +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.elements.buttons
expcore.roles
utils.event
utils.game
mod-gui
+ + +

Functions

+ + + + + + + + + + + + + + + + +
Toolbar.new_button([name])Adds a new button to the toolbar
Toolbar.add_button(button)Adds an existing buttton to the toolbar
Toolbar.update(player)Updates the player's toolbar with an new buttons or expected change in auth return
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.elements.buttons +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.roles +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Toolbar.new_button([name]) +
+
+
+
+ +

Adds a new button to the toolbar

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + when given allows an alias to the button for the permission system + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the button define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Toolbar.add_button(button) +
+
+
+
+ +

Adds an existing buttton to the toolbar

+

+ + + Parameters: + +
    + + + + + +
  • + + button + + : + + (table) + + the button define for the button to be added + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Toolbar.update(player) +
+
+
+
+ +

Updates the player's toolbar with an new buttons or expected change in auth return

+

+ + + Parameters: + +
    + + + + + +
  • + + player + + : + + (LuaPlayer) + + the player to update the toolbar for + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.core.html b/doc/modules/expcore.gui.core.html index 523bda7b..67781766 100644 --- a/doc/modules/expcore.gui.core.html +++ b/doc/modules/expcore.gui.core.html @@ -1,121 +1,260 @@ - - - - - Reference + + + + + + + + expcore.gui.core module + + + - - + + -
+
+
-
- -
-
-
+ + + - - + + + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.buttons.html b/doc/modules/expcore.gui.elements.buttons.html new file mode 100644 index 00000000..dc8adc9a --- /dev/null +++ b/doc/modules/expcore.gui.elements.buttons.html @@ -0,0 +1,694 @@ + + + + + + + + expcore.gui.elements.buttons module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.buttons module

+

Gui class define for buttons and sprite buttons +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
mod-gui
expcore.gui.core
expcore.gui.prototype
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + +
Button.new_button([name])Creates a new button element define
Button._prototype:set_sprites(sprite[, hovered_sprite][, clicked_sprite])Adds sprites to a button making it a sprite button
Button._prototype:set_click_filter(filter[, ...])Adds a click / mouse button filter to the button
Button._prototype:set_key_filter(filter[, ...])Adds a control key filter to the button
+ + +
+ + +

Dependencies

+
+
+
+
+ # + mod-gui +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Button.new_button([name]) +
+
+
+
+ +

Creates a new button element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Button._prototype:set_sprites(sprite[, hovered_sprite][, clicked_sprite]) +
+
+
+
+ +

Adds sprites to a button making it a sprite button

+

+ + + Parameters: + +
    + + + + + +
  • + + sprite + + : + + (SpritePath) + + the sprite path for the default sprite for the button + +
  • + + + + + +
  • + + hovered_sprite + + : + + (SpritePath) + + the sprite path for the sprite when the player hovers over the button + + (optional) +
  • + + + + + +
  • + + clicked_sprite + + : + + (SpritePath) + + the sprite path for the sprite when the player clicks the button + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + returns the button define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Button._prototype:set_click_filter(filter[, ...]) +
+
+
+
+ +

Adds a click / mouse button filter to the button

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (table) + + ?string|table either a of mouse buttons or the first mouse button to filter, with a table true means allowed + +
  • + + + + + +
  • + + ... + + : + + (table) + + when filter is not a you can add the mouse buttons one after each other + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + returns the button define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Button._prototype:set_key_filter(filter[, ...]) +
+
+
+
+ +

Adds a control key filter to the button

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (table) + + ?string|table either a of control keys or the first control keys to filter, with a table true means allowed + +
  • + + + + + +
  • + + ... + + : + + (table) + + when filter is not a you can add the control keys one after each other + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + returns the button define to allow chaining +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.checkbox.html b/doc/modules/expcore.gui.elements.checkbox.html new file mode 100644 index 00000000..bdfbf5a6 --- /dev/null +++ b/doc/modules/expcore.gui.elements.checkbox.html @@ -0,0 +1,1040 @@ + + + + + + + + expcore.gui.elements.checkbox module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.checkbox module

+

Gui class define for checkbox and radiobuttons +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.store
utils.game
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Checkbox.new_checkbox([name])Creates a new checkbox element define
Checkbox.new_radiobutton([name])Creates a new radiobutton element define, has all functions checkbox has
Checkbox._prototype_radiobutton:add_as_option(option_set, option_name)Adds this radiobutton to be an option in the given option set (only one can be true at a time)
Checkbox._prototype_radiobutton:get_store(category, internal)Gets the stored value of the radiobutton or the option set if present
Checkbox._prototype_radiobutton:set_store(category, value, internal)Sets the stored value of the radiobutton or the option set if present
Checkbox.new_option_set(name, callback, categorize)Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
Checkbox.draw_option_set(name, element)Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)
Checkbox.reset_radiobuttons(element[, exclude][, recursive=false])Sets all radiobutton in a element to false (unless excluded) and can act recursively
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Checkbox.new_checkbox([name]) +
+
+
+
+ +

Creates a new checkbox element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new checkbox element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.new_radiobutton([name]) +
+
+
+
+ +

Creates a new radiobutton element define, has all functions checkbox has

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:add_as_option(option_set, option_name) +
+
+
+
+ +

Adds this radiobutton to be an option in the given option set (only one can be true at a time)

+

+ + + Parameters: + +
    + + + + + +
  • + + option_set + + : + + (string) + + the name of the option set to add this element to + +
  • + + + + + +
  • + + option_name + + : + + (string) + + the name of this option that will be used to identify it + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:get_store(category, internal) +
+
+
+
+ +

Gets the stored value of the radiobutton or the option set if present

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + used to prevent stackover flow + +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the value that is stored for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:set_store(category, value, internal) +
+
+
+
+ +

Sets the stored value of the radiobutton or the option set if present

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + value + + : + + (boolean) + + the value to set for this define, must be valid for its type ie for checkbox etc + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + used to prevent stackover flow + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.new_option_set(name, callback, categorize) +
+
+
+
+ +

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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.draw_option_set(name, element) +
+
+
+
+ +

Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the option set to draw the radiobuttons of + +
  • + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the parent element that the radiobuttons will be drawn to + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Checkbox.reset_radiobuttons(element[, exclude][, recursive=false]) +
+
+
+
+ +

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) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if successful +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.checkboxs.html b/doc/modules/expcore.gui.elements.checkboxs.html new file mode 100644 index 00000000..de6841e3 --- /dev/null +++ b/doc/modules/expcore.gui.elements.checkboxs.html @@ -0,0 +1,848 @@ + + + + + + + + expcore.gui.elements.checkboxs module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.checkboxs module

+

Gui class define for checkboxs and radiobuttons +[[

+

+ + + + + + + + + + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Checkbox.new_checkbox([name])Creates a new checkbox element define
Checkbox.new_radiobutton([name])Creates a new radiobutton element define, has all functions checkbox has
Checkbox._prototype_radiobutton:add_as_option(option_set, option_name)Adds this radiobutton to be an option in the given option set (only one can be true at a time)
Checkbox._prototype_radiobutton:get_store(category, internal)Gets the stored value of the radiobutton or the option set if present
Checkbox._prototype_radiobutton:set_store(category, value, internal)Sets the stored value of the radiobutton or the option set if present
Checkbox.new_option_set(name, callback, categorize)Registers a new option set that can be linked to radiobutotns (only one can be true at a time)
Checkbox.draw_option_set(name, element)Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)
Checkbox.reset_radiobuttons(element[, exclude][, recursive=false])Sets all radiobutotn in a element to false (unless excluded) and can act recursivly
+ + +
+ + +

Functions

+
+
+
+
+ # + Checkbox.new_checkbox([name]) +
+
+
+
+ +

Creates a new checkbox element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new checkbox element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.new_radiobutton([name]) +
+
+
+
+ +

Creates a new radiobutton element define, has all functions checkbox has

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:add_as_option(option_set, option_name) +
+
+
+
+ +

Adds this radiobutton to be an option in the given option set (only one can be true at a time)

+

+ + + Parameters: + +
    + + + + + +
  • + + option_set + + : + + (string) + + the name of the option set to add this element to + +
  • + + + + + +
  • + + option_name + + : + + (string) + + the name of this option that will be used to idenitife it + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:get_store(category, internal) +
+
+
+
+ +

Gets the stored value of the radiobutton or the option set if present

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + used to prevent stackover flow + +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the value that is stored for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox._prototype_radiobutton:set_store(category, value, internal) +
+
+
+
+ +

Sets the stored value of the radiobutton or the option set if present

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + value + + : + + (boolean) + + the value to set for this define, must be valid for its type ie for checkbox etc + +
  • + + + + + +
  • + + internal + + : + + (boolean) + + used to prevent stackover flow + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.new_option_set(name, callback, categorize) +
+
+
+
+ +

Registers a new option set that can be linked to radiobutotns (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 chagnes + 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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + Checkbox.draw_option_set(name, element) +
+
+
+
+ +

Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the name of the option set to draw the radiobuttons of + +
  • + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the parent element that the radiobuttons will be drawn to + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Checkbox.reset_radiobuttons(element[, exclude][, recursive=false]) +
+
+
+
+ +

Sets all radiobutotn in a element to false (unless excluded) and can act recursivly

+

+ + + 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) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if successful +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.dropdown.html b/doc/modules/expcore.gui.elements.dropdown.html new file mode 100644 index 00000000..15a4a3ed --- /dev/null +++ b/doc/modules/expcore.gui.elements.dropdown.html @@ -0,0 +1,874 @@ + + + + + + + + expcore.gui.elements.dropdown module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.dropdown module

+

Gui class define for dropdowns and list box +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dropdown.new_dropdown([name])Creates a new dropdown element define
Dropdown.new_list_box([name])Creates a new list box element define
Dropdown._prototype:new_static_options(options[, ...], the)Adds new static options to the dropdown which will trigger the general callback
Dropdown._prototype:new_dynamic_options(callback)Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options)
Dropdown._prototype:add_option_callback(option, callback)Adds a case specific callback which will only run when that option is selected (general case still triggered)
Dropdown.select_value(element, value)Selects the option from a dropdown or list box given the value rather than key
Dropdown.get_selected_value(element)Returns the currently selected value rather than index
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Dropdown.new_dropdown([name]) +
+
+
+
+ +

Creates a new dropdown element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new dropdown element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown.new_list_box([name]) +
+
+
+
+ +

Creates a new list box element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new list box element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown._prototype:new_static_options(options[, ...], the) +
+
+
+
+ +

Adds new static options to the dropdown which will trigger the general callback

+

+ + + Parameters: + +
    + + + + + +
  • + + options + + : + + (table) + + ?string|table either a of option strings or the first option string, with a table values are the options + +
  • + + + + + +
  • + + ... + + : + + (table) + + when options is not a you can add the options one after each other + + (optional) +
  • + + + + + +
  • + + the + + : + + (self) + + define to allow chaining + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Dropdown._prototype:new_dynamic_options(callback) +
+
+
+
+ +

Adds a callback which should return a table of values to be added as options for the dropdown (appended after static options)

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + the function that will run to get the options for the dropdown + callback param - player LuaPlayer - the player that the element is being drawn to + callback param - element LuaGuiElement - the element that is being drawn + callback return - table - the values of this table will be appended to the static options of the dropdown + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown._prototype:add_option_callback(option, callback) +
+
+
+
+ +

Adds a case specific callback which will only run when that option is selected (general case still triggered)

+

+ + + Parameters: + +
    + + + + + +
  • + + option + + : + + (string) + + the name of the option to trigger the callback on; if not already added then will be added as an option + +
  • + + + + + +
  • + + callback + + : + + (function) + + the function that will be called when that option is selected + callback param - player LuaPlayer - the player who owns the gui element + callback param - element LuaGuiElement - the element which is being effected + callback param - value string - the new option that has been selected + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown.select_value(element, value) +
+
+
+
+ +

Selects the option from a dropdown or list box given the value rather than key

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that contains the option + +
  • + + + + + +
  • + + value + + : + + (string) + + the option to select from the dropdown + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the key where the value was +
  • +
+ + + + + + + + + +
+
+
+
+ # + Dropdown.get_selected_value(element) +
+
+
+
+ +

Returns the currently selected value rather than index

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the gui element that you want to get the value of + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + the value that is currently selected +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.elem-button.html b/doc/modules/expcore.gui.elements.elem-button.html new file mode 100644 index 00000000..45ce8da8 --- /dev/null +++ b/doc/modules/expcore.gui.elements.elem-button.html @@ -0,0 +1,570 @@ + + + + + + + + expcore.gui.elements.elem-button module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.elem-button module

+

Gui class defines for elem buttons +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
+ + +

Functions

+ + + + + + + + + + + + +
ElemButton.new_elem_button([name])Creates a new elem button element define
ElemButton._prototype:set_default(value)Sets the default value for the elem button, this may be a function or a string
+ + +

Fields

+ + + + + + + + +
ElemButton._prototype.set_typeSets the type of the elem button, the type is required so this must be called at least once
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + ElemButton.new_elem_button([name]) +
+
+
+
+ +

Creates a new elem button element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new elem button element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + ElemButton._prototype:set_default(value) +
+
+
+
+ +

Sets the default value for the elem button, this may be a function or a string

+

+ + + Parameters: + +
    + + + + + +
  • + + value + + : + + (string or function) + + string a will be a static default and a function will be called when drawn to get the default + +
  • + + +
+ + + + + Returns: +
    +
  • + (the) + element define to allow for chaining +
  • +
+ + + + + + + + + +
+
+

Fields

+
+
+
+
+ # + ElemButton._prototype.set_type +
+
+
+
+ +

Sets the type of the elem button, the type is required so this must be called at least once

+

+ + + +
    + + + + + +
  • + + type + + : + + (string) + + the type that this elem button is see factorio api + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.progress-bar.html b/doc/modules/expcore.gui.elements.progress-bar.html new file mode 100644 index 00000000..c1809083 --- /dev/null +++ b/doc/modules/expcore.gui.elements.progress-bar.html @@ -0,0 +1,1343 @@ + + + + + + + + expcore.gui.elements.progress-bar module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.progress-bar module

+

Gui element define for progress bars +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.global
utils.game
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProgressBar.set_maximum(element, amount)Sets the maximum value that represents the end value of the progress bar
ProgressBar.increment(element[, amount=1])Increases the value of the progressbar, if a define is given all of its instances have incremented
ProgressBar.decrement(element[, amount=1])Decreases the value of the progressbar, if a define is given all of its instances have decremented
ProgressBar.new_progressbar([name])Creates a new progressbar element define
ProgressBar._prototype:set_default_maximum(amount)Sets the maximum value that represents the end value of the progress bar
ProgressBar._prototype:use_count_down([state=true])Will set the progress bar to start at 1 and trigger when it hits 0
ProgressBar._prototype:increment([amount=1][, category])Increases the value of the progressbar
ProgressBar._prototype:increment_filtered([amount=1], filter)Increases the value of the progressbar, if the filter condition is met, does not work with store
ProgressBar._prototype:decrement([amount=1][, category])Decreases the value of the progressbar
ProgressBar._prototype:decrement_filtered([amount=1], filter)Decreases the value of the progressbar, if the filter condition is met, does not work with store
ProgressBar._prototype:add_element(element[, maximum])Adds an element into the list of instances that will are waiting to complete, does not work with store + note use store if you want persistent data, this only stores the elements not the values which they have
ProgressBar._prototype:reset_element(element)Resets an element, or its store, to be back at the start, either 1 or 0
ProgressBar._prototype:event_counter([filter])Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented
ProgressBar._prototype:event_countdown([filter])Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.global +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + ProgressBar.set_maximum(element, amount) +
+
+
+
+ +

Sets the maximum value that represents the end value of the progress bar

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement or string) + + either a gui element or a registered define + +
  • + + + + + +
  • + + amount + + : + + (number) + + the amount to have set as the maximum + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.increment(element[, amount=1]) +
+
+
+
+ +

Increases the value of the progressbar, if a define is given all of its instances have incremented

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement or string) + + either a gui element or a registered define + +
  • + + + + + +
  • + + amount + + : + + (number) + + the amount to increase the progressbar by + + (default: 1) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.decrement(element[, amount=1]) +
+
+
+
+ +

Decreases the value of the progressbar, if a define is given all of its instances have decremented

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement or string) + + either a gui element or a registered define + +
  • + + + + + +
  • + + amount + + : + + (number) + + the amount to decrease the progressbar by + + (default: 1) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar.new_progressbar([name]) +
+
+
+
+ +

Creates a new progressbar element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new progressbar element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:set_default_maximum(amount) +
+
+
+
+ +

Sets the maximum value that represents the end value of the progress bar

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to have set as the maximum + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:use_count_down([state=true]) +
+
+
+
+ +

Will set the progress bar to start at 1 and trigger when it hits 0

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when true the bar will start filled, to be used with decrease + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:increment([amount=1][, category]) +
+
+
+
+ +

Increases the value of the progressbar

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to increase the progressbar by + + (default: 1) +
  • + + + + + +
  • + + category + + : + + (string) + + the category that is used with a store + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:increment_filtered([amount=1], filter) +
+
+
+
+ +

Increases the value of the progressbar, if the filter condition is met, does not work with store

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to increase the progressbar by + + (default: 1) +
  • + + + + + +
  • + + filter + + : + + (function) + + the filter to be used + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:decrement([amount=1][, category]) +
+
+
+
+ +

Decreases the value of the progressbar

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to decrease the progressbar by + + (default: 1) +
  • + + + + + +
  • + + category + + : + + (string) + + the category that is used with a store + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:decrement_filtered([amount=1], filter) +
+
+
+
+ +

Decreases the value of the progressbar, if the filter condition is met, does not work with store

+

+ + + Parameters: + +
    + + + + + +
  • + + amount + + : + + (number) + + the amount to decrease the progressbar by + + (default: 1) +
  • + + + + + +
  • + + filter + + : + + (function) + + the filter to be used + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:add_element(element[, maximum]) +
+
+
+
+ +

Adds an element into the list of instances that will are waiting to complete, does not work with store + note use store if you want persistent data, this only stores the elements not the values which they have

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that you want to add into the waiting to complete list + +
  • + + + + + +
  • + + maximum + + : + + (number) + + the maximum for this element if not given the default for this define is used + + (optional) +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:reset_element(element) +
+
+
+
+ +

Resets an element, or its store, to be back at the start, either 1 or 0

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that you want to reset the progress of + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:event_counter([filter]) +
+
+
+
+ +

Event handler factory that counts up by 1 every time the event triggers, can filter which elements have incremented

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (function) + + when given will use filtered increment + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the event handler +
  • +
+ + + + + + + + + +
+
+
+
+ # + ProgressBar._prototype:event_countdown([filter]) +
+
+
+
+ +

Event handler factory that counts down by 1 every time the event triggers, can filter which elements have decremented

+

+ + + Parameters: + +
    + + + + + +
  • + + filter + + : + + (function) + + when given will use filtered decrement + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the event handler +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.slider.html b/doc/modules/expcore.gui.elements.slider.html new file mode 100644 index 00000000..394a0754 --- /dev/null +++ b/doc/modules/expcore.gui.elements.slider.html @@ -0,0 +1,673 @@ + + + + + + + + expcore.gui.elements.slider module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.slider module

+

Gui class define for sliders +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
expcore.gui.instances
utils.game
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + +
Slider.new_slider([name])Creates a new slider element define
Slider._prototype:set_range([min][, max])Sets the range of a slider, if not used will use default values for a slider
Slider._prototype:draw_label(element)Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player
Slider._prototype:enable_auto_draw_label([state=true])Enables auto draw of the label, the label will share the same parent element as the slider
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.instances +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Slider.new_slider([name]) +
+
+
+
+ +

Creates a new slider element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new slider element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Slider._prototype:set_range([min][, max]) +
+
+
+
+ +

Sets the range of a slider, if not used will use default values for a slider

+

+ + + Parameters: + +
    + + + + + +
  • + + min + + : + + (number) + + the minimum value that the slider can take + + (optional) +
  • + + + + + +
  • + + max + + : + + (number) + + the maximum value that the slider can take + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Slider._prototype:draw_label(element) +
+
+
+
+ +

Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the parent element that the label will be drawn to + +
  • + + +
+ + + + + Returns: +
    +
  • + (LuaGuiElement) + the new label element so that styles can be applied +
  • +
+ + + + + + + + + +
+
+
+
+ # + Slider._prototype:enable_auto_draw_label([state=true]) +
+
+
+
+ +

Enables auto draw of the label, the label will share the same parent element as the slider

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will disable the auto draw of the label + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the define to allow chaining +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.elements.text.html b/doc/modules/expcore.gui.elements.text.html new file mode 100644 index 00000000..d9fca3e5 --- /dev/null +++ b/doc/modules/expcore.gui.elements.text.html @@ -0,0 +1,691 @@ + + + + + + + + expcore.gui.elements.text module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.elements.text module

+

Gui class define for text fields and text boxes +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
expcore.gui.core
expcore.gui.prototype
utils.game
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + +
Text.new_text_field([name])Creates a new text field element define
Text.new_text_box([name])Creates a new text box element define
Text._prototype_box:set_selectable([state=true])Sets the text box to be selectable
Text._prototype_box:set_word_wrap([state=true])Sets the text box to have word wrap
Text._prototype_box:set_read_only([state=true])Sets the text box to be read only
+ + +
+ + +

Dependencies

+
+
+
+
+ # + expcore.gui.core +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.prototype +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Text.new_text_field([name]) +
+
+
+
+ +

Creates a new text field element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new text field element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text.new_text_box([name]) +
+
+
+
+ +

Creates a new text box element define

+

+ + + Parameters: + +
    + + + + + +
  • + + name + + : + + (string) + + the optional debug name that can be added + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the new text box element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text._prototype_box:set_selectable([state=true]) +
+
+
+
+ +

Sets the text box to be selectable

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will set the state to false + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + table the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text._prototype_box:set_word_wrap([state=true]) +
+
+
+
+ +

Sets the text box to have word wrap

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will set the state to false + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + table the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Text._prototype_box:set_read_only([state=true]) +
+
+
+
+ +

Sets the text box to be read only

+

+ + + Parameters: + +
    + + + + + +
  • + + state + + : + + (boolean) + + when false will set the state to false + + (default: true) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + table the define to allow for chaining +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.html b/doc/modules/expcore.gui.html index 810d6e38..580de83b 100644 --- a/doc/modules/expcore.gui.html +++ b/doc/modules/expcore.gui.html @@ -1,119 +1,655 @@ - - - - - Reference + + + + + + + + expcore.gui module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/expcore.gui.instances.html b/doc/modules/expcore.gui.instances.html index b379c6a8..baca9bef 100644 --- a/doc/modules/expcore.gui.instances.html +++ b/doc/modules/expcore.gui.instances.html @@ -1,119 +1,259 @@ - - - - - Reference + + + + + + + + expcore.gui.instances module + + + - - + + -
+
+
-
- -
-
-
+ + + - - + + + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.prototype.html b/doc/modules/expcore.gui.prototype.html new file mode 100644 index 00000000..dabb924e --- /dev/null +++ b/doc/modules/expcore.gui.prototype.html @@ -0,0 +1,1588 @@ + + + + + + + + expcore.gui.prototype module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

expcore.gui.prototype module

+

Used to create new gui prototypes see elements and concepts +[[

+

+ + + + + + + + + + + + + +

Dependencies

+ + + + + + + + + + + + + +
utils.game
expcore.store
expcore.gui.instances
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Constructor.event(event_name)Creates a new function to add functions to an event handler
Constructor.extend(new_prototype)Extents a prototype with the base functions of all gui prototypes, no metatables
Constructor.store(sync, callback)Creates a new function which adds a store to a gui define
Constructor.setter(value_type, key[, second_key])Creates a setter function that checks the type when a value is set
Prototype:uid()Gets the uid for the element define
Prototype:set_style(style[, function])Sets the style for the element define
Prototype:set_embedded_flow(boolean)Sets the element to be drawn inside a nameless flow, can be given a name using a function
Prototype:raise_event(event_name, ...)Raises a custom event for this define, any number of params can be given
Prototype:draw_to(element)The main function for defines, when called will draw an instance of this define to the given element + what is drawn is based on the data in draw_data which is set using other functions
Prototype:get_store(category)Gets the value in this elements store, category needed if categorize function used
Prototype:set_store(category, value)Sets the value in this elements store, category needed if categorize function used
Prototype:clear_store([category])Sets the value in this elements store to nil, category needed if categorize function used
+ + +

Fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Prototype.debug_nameSets a debug alias for the define
Prototype.set_captionSets the caption for the element define
Prototype.set_tooltipSets the tooltip for the element define
Prototype.set_pre_authenticatorSets an authenticator that blocks the draw function if check fails
Prototype.set_post_authenticatorSets an authenticator that disables the element if check fails
Prototype.on_drawRegisters a callback to the on_draw event
Prototype.on_style_updateRegisters a callback to the on_style_update event
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.game +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.store +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.gui.instances +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Functions

+
+
+
+
+ # + Constructor.event(event_name) +
+
+
+
+ +

Creates a new function to add functions to an event handler

+

+ + + Parameters: + +
    + + + + + +
  • + + event_name + + : + + (string) + + the name of the event that callbacks will be added to + +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the function used to register handlers +
  • +
+ + + + + + + + + +
+
+
+
+ # + Constructor.extend(new_prototype) +
+
+
+
+ +

Extents a prototype with the base functions of all gui prototypes, no metatables

+

+ + + Parameters: + +
    + + + + + +
  • + + new_prototype + + : + + (table) + + the prototype that you want to add the functions to + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + the same prototype but with the new functions added +
  • +
+ + + + + + + + + +
+
+
+
+ # + Constructor.store(sync, callback) +
+
+
+
+ +

Creates a new function which adds a store to a gui define

+

+ + + Parameters: + +
    + + + + + +
  • + + sync + + : + + (boolean) + + if the function should create a synced store + +
  • + + + + + +
  • + + callback + + : + + (function) + + the function called when needing to update the value of an element + +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the function that will add a store for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Constructor.setter(value_type, key[, second_key]) +
+
+
+
+ +

Creates a setter function that checks the type when a value is set

+

+ + + Parameters: + +
    + + + + + +
  • + + value_type + + : + + (string) + + the type that the value should be when it is set + +
  • + + + + + +
  • + + key + + : + + (string) + + the key of the define that will be set + +
  • + + + + + +
  • + + second_key + + : + + (string) + + allows for setting of a key in a sub table + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (function) + the function that will check the type and set the value +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:uid() +
+
+
+
+ +

Gets the uid for the element define

+

+ + + + + + Returns: +
    +
  • + (string) + the uid of this element define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:set_style(style[, function]) +
+
+
+
+ +

Sets the style for the element define

+

+ + + Parameters: + +
    + + + + + +
  • + + style + + : + + (string) + + the style that will be used for this element when drawn + +
  • + + + + + +
  • + + function + + : + + (callback) + + function is called when element is drawn to alter its style + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the element define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:set_embedded_flow(boolean) +
+
+
+
+ +

Sets the element to be drawn inside a nameless flow, can be given a name using a function

+

+ + + Parameters: + +
    + + + + + +
  • + + boolean + + : + + (state) + + |function when true a padless flow is created to contain the element + +
  • + + +
+ + + + + Returns: +
    +
  • + (self) + the element define to allow chaining +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:raise_event(event_name, ...) +
+
+
+
+ +

Raises a custom event for this define, any number of params can be given

+

+ + + Parameters: + +
    + + + + + +
  • + + event_name + + : + + (string) + + the name of the event that you want to raise + +
  • + + + + + +
  • + + ... + + : + + (any) + + any params that you want to pass to the event + +
  • + + +
+ + + + + Returns: +
    +
  • + (number) + the number of handlers that were registered +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:draw_to(element) +
+
+
+
+ +

The main function for defines, when called will draw an instance of this define to the given element + what is drawn is based on the data in draw_data which is set using other functions

+

+ + + Parameters: + +
    + + + + + +
  • + + element + + : + + (LuaGuiElement) + + the element that the define will draw a instance of its self onto + +
  • + + +
+ + + + + Returns: + + + + + + + + + + +
+
+
+
+ # + Prototype:get_store(category) +
+
+
+
+ +

Gets the value in this elements store, category needed if categorize function used

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + the value that is stored for this define +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:set_store(category, value) +
+
+
+
+ +

Sets the value in this elements store, category needed if categorize function used

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + [opt] the category to get such as player name or force name + +
  • + + + + + +
  • + + value + + : + + (any) + + the value to set for this define, must be valid for its type ie for checkbox etc + +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+
+
+ # + Prototype:clear_store([category]) +
+
+
+
+ +

Sets the value in this elements store to nil, category needed if categorize function used

+

+ + + Parameters: + +
    + + + + + +
  • + + category + + : + + (string) + + the category to get such as player name or force name + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (boolean) + true if the value was set +
  • +
+ + + + + + + + + +
+
+

Fields

+
+
+
+
+ # + Prototype.debug_name +
+
+
+
+ +

Sets a debug alias for the define

+

+ + + +
    + + + + + +
  • + + name + + : + + (string) + + the debug name for the element define that can be used to get this element define + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_caption +
+
+
+
+ +

Sets the caption for the element define

+

+ + + +
    + + + + + +
  • + + caption + + : + + (string) + + the caption that will be drawn with the element + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_tooltip +
+
+
+
+ +

Sets the tooltip for the element define

+

+ + + +
    + + + + + +
  • + + tooltip + + : + + (string) + + the tooltip that will be displayed for this element when drawn + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_pre_authenticator +
+
+
+
+ +

Sets an authenticator that blocks the draw function if check fails

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + the function that will be ran to test if the element should be drawn or not + callback param - LuaPlayer player - the player that the element is being drawn to + callback param - string define_name - the name of the define that is being drawn + callback return - boolean - false will stop the element from being drawn + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.set_post_authenticator +
+
+
+
+ +

Sets an authenticator that disables the element if check fails

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + the function that will be ran to test if the element should be enabled or not + callback param - LuaPlayer player - the player that the element is being drawn to + callback param - string define_name - the name of the define that is being drawn + callback return - boolean - false will disable the element + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.on_draw +
+
+
+
+ +

Registers a callback to the on_draw event

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + + callback param - LuaPlayer player - the player that the element was drawn to + callback param - LuaGuiElement element - the element that was drawn + callback param - any ... - any other params passed by the draw_to function + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + Prototype.on_style_update +
+
+
+
+ +

Registers a callback to the on_style_update event

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + + callback param - LuaStyle style - the style that was changed and/or needs changing + +
  • + + +
+ + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/expcore.gui.test.html b/doc/modules/expcore.gui.test.html index be35af41..eefdb376 100644 --- a/doc/modules/expcore.gui.test.html +++ b/doc/modules/expcore.gui.test.html @@ -1,120 +1,429 @@ - - - - - Reference + + + + + + + + expcore.gui.test module + + + - - + + -
+
+
-
- -
-
-
+ + + +
+
+ + + + diff --git a/doc/modules/expcore.permission_groups.html b/doc/modules/expcore.permission_groups.html index 33781f3f..72805bd0 100644 --- a/doc/modules/expcore.permission_groups.html +++ b/doc/modules/expcore.permission_groups.html @@ -1,660 +1,1394 @@ - - - - - Reference + + + + + + + + expcore.permission_groups module + + + - - + + -
+
+
-
- -
-
-
+ + + - - +
+
+
+ + + + diff --git a/doc/modules/expcore.roles.html b/doc/modules/expcore.roles.html index 493741d1..82ac20aa 100644 --- a/doc/modules/expcore.roles.html +++ b/doc/modules/expcore.roles.html @@ -1,1307 +1,2981 @@ - - - - - Reference + + + + + + + + expcore.roles module + + + - - + + -
+
+
-
- -
-
-
+ + + - - + + + +
  • + + skip_check + + : + + (boolean) + + when true player will be taken as the player name (use when player has not yet joined) + +
  • + + + + + +
  • + + skip_event + + : + + (boolean) + + when true the event emit will be skipped, this is used internally with Roles.assign + +
  • + + + + + + + + Returns: +
      +
    • + (boolean) + true if the player was added successfully +
    • +
    + + + + + + + + + + +
    +
    +
    + # + Roles._prototype:remove_player(player, skip_check, skip_event) +
    +
    +
    +
    + +

    Removes a player from this role, players can have more than one role at a time, used internally see Roles.unassign

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player that will lose this role + +
    • + + + + + +
    • + + skip_check + + : + + (boolean) + + when true player will be taken as the player name (use when player has not yet joined) + +
    • + + + + + +
    • + + skip_event + + : + + (boolean) + + when true the event emit will be skipped, this is used internally with Roles.unassign + +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + true if the player was removed successfully +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles._prototype:get_players([online=nil]) +
    +
    +
    +
    + +

    Returns an array of all the players who have this role, can be filtered by online status

    +

    + + + Parameters: + +
      + + + + + +
    • + + online + + : + + (boolean) + + when given will filter by this online state, nil will return all players + + (default: nil) +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + all the players who have this role, indexed order is meaningless +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles._prototype:print(message) +
    +
    +
    +
    + +

    Will print a message to all players with this role

    +

    + + + Parameters: + +
      + + + + + +
    • + + message + + : + + (string) + + the message that will be printed to the players + +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of players who received the message +
    • +
    + + + + + + + + + +
    + + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.store.html b/doc/modules/expcore.store.html index 57e11bed..8275edad 100644 --- a/doc/modules/expcore.store.html +++ b/doc/modules/expcore.store.html @@ -1,464 +1,972 @@ - - - - - Reference + + + + + + + + expcore.store module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + -

    Returns:

    -
      - - any - the value which was stored at that location -
    - - - - - -
    - - Store.set_child (location, child, value) -
    -
    - Sets the value of the chlid to a location, children can be added and removed during runtime - when a child is set it will call the update handler of the parent allowing children be to added at runtime - this may be used when a player joins the game and the child is the players name - - -

    Parameters:

    -
      -
    • location - string - the location of which the child is located -
    • -
    • child - string - the child element to set the value of -
    • -
    • value - any - the value to set at this location -
    • -
    - -

    Returns:

    -
      - - boolean - true if it was successful -
    - - - - -
    - - - -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.sudo.html b/doc/modules/expcore.sudo.html new file mode 100644 index 00000000..a1ac274b --- /dev/null +++ b/doc/modules/expcore.sudo.html @@ -0,0 +1,254 @@ + + + + + + + + expcore.sudo module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.sudo module

    +

    An extention of task and token to allow a single require to register and run functions bypassing all permissions +[[

    +

    + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + diff --git a/doc/modules/gui.player-list.html b/doc/modules/gui.player-list.html new file mode 100644 index 00000000..496ec30a --- /dev/null +++ b/doc/modules/gui.player-list.html @@ -0,0 +1,71 @@ + + + + + Reference + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + +

    Module gui.player-list

    +

    Gui left frame define for a player list

    +

    + + + +
    +
    + + + + +
    +
    +
    +generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
    +
    + + diff --git a/doc/modules/gui.rocket-info.html b/doc/modules/gui.rocket-info.html new file mode 100644 index 00000000..70702c2a --- /dev/null +++ b/doc/modules/gui.rocket-info.html @@ -0,0 +1,100 @@ + + + + + Reference + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + +

    Module gui.rocket-info

    +

    Adds a rocket infomation gui which shows general stats, milestones and build progress of rockets

    +

    + + +

    Fields

    + + + + + +
    header_area.captionRight aligned button to toggle the section
    + +
    +
    + + +

    Fields

    + +
    +
    + + header_area.caption +
    +
    + Right aligned button to toggle the section + + + + + + + +
    +
    + + +
    +
    +
    +generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
    +
    + + diff --git a/doc/modules/gui.science-info.html b/doc/modules/gui.science-info.html new file mode 100644 index 00000000..105102cd --- /dev/null +++ b/doc/modules/gui.science-info.html @@ -0,0 +1,71 @@ + + + + + Reference + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + +

    Module gui.science-info

    +

    Adds a science info gui that shows production usage and net for the different science packs as well as an eta

    +

    + + + +
    +
    + + + + +
    +
    +
    +generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
    +
    + + diff --git a/doc/modules/gui.task-list.html b/doc/modules/gui.task-list.html new file mode 100644 index 00000000..8af36bc8 --- /dev/null +++ b/doc/modules/gui.task-list.html @@ -0,0 +1,71 @@ + + + + + Reference + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + +

    Module gui.task-list

    +

    Adds a task list to the game which players can add remove and edit items on

    +

    + + + +
    +
    + + + + +
    +
    +
    +generated by LDoc 1.4.3 +Last updated 2019-06-21 19:36:35 +
    +
    + + diff --git a/doc/modules/modules.addons.advanced-start.html b/doc/modules/modules.addons.advanced-start.html index 771f4611..a17f317a 100644 --- a/doc/modules/modules.addons.advanced-start.html +++ b/doc/modules/modules.addons.advanced-start.html @@ -1,118 +1,349 @@ - - - - - Reference + + + + + + + + modules.addons.advanced-start module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/modules.addons.chat-popups.html b/doc/modules/modules.addons.chat-popups.html index b7f53d32..9caa5cfd 100644 --- a/doc/modules/modules.addons.chat-popups.html +++ b/doc/modules/modules.addons.chat-popups.html @@ -1,119 +1,350 @@ - - - - - Reference + + + + + + + + modules.addons.chat-popups module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/modules.addons.damage-popups.html b/doc/modules/modules.addons.damage-popups.html index 7789ebd5..4a119a6f 100644 --- a/doc/modules/modules.addons.damage-popups.html +++ b/doc/modules/modules.addons.damage-popups.html @@ -1,119 +1,350 @@ - - - - - Reference + + + + + + + + modules.addons.damage-popups module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/modules.control.production.html b/doc/modules/modules.control.production.html new file mode 100644 index 00000000..30718ab0 --- /dev/null +++ b/doc/modules/modules.control.production.html @@ -0,0 +1,1281 @@ + + + + + + + + modules.control.production module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.control.production module

    +

    Control Module - Production + - Common functions used to track production of items

    +

    + + + + + + +

    Usage

    +
    
    +    -- import the module from the control modules
    +    local Production = require '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
    +    Production.precision_up(defines.flow_precision_index.one_second)
    +
    +    -- The get production function is used to get production, consumion and net
    +    -- it may be used for any item and with any precision level, use total for total
    +    Production.get_production(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute)
    +
    +    -- The fluctuations works by compearing recent production with the average over time
    +    -- again any precision may be used, apart from one_thousand_hours as there would be no valid average
    +    Production.get_fluctuations(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute)
    +
    +    -- ETA is calculated based on what function you use but all share a similar method
    +    -- for production eta it will take current production average given by the precision
    +    -- and work out how many ticks it will require to make the required amount (1000 by default)
    +    Production.get_production_eta(game.forces.player,'iron-plate',defines.flow_precision_index.one_minute,250000)
    +
    +    -- Both get_color and format_number are helper functions to help format production stats
    +    -- get_color will return green,orange,red,or grey based on the active_value
    +    -- the passive_value is used when active_value is 0 and can only return orange,red,or grey
    +    Production.get_color(clamp,active_value,passive_value)
    + + + + + + + +

    Dependencies

    + + + + + + + + + + + + +
    resources.color_presetsProvides colors for Production.get_color
    utilProvides format_number function to add surfixs
    + + +

    Precision

    + + + + + + + + + + + + + + + + +
    precision_up (precision)Gets the next lesser precision index value, eg 1 second -> 1 minute
    precision_down (precision)Gets the next greater precision index value, eg 1 minute -> 1 second
    precision_ticks (precision)Gets the number of tick that precision is given over, eg 1 minute -> 60 ticks
    + + +

    Statistics

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    get_production_total (force, item_name)Returns the production data for the whole game time
    get_production (force, item_name, precision)Returns the production data for the given precision game time
    get_fluctuations (force, item_name, precision)Returns the current fluctuation from the average
    get_production_eta (force, item_name, precision[, required=1000])Returns the amount of ticks required to produce a certain amount
    get_consumsion_eta (force, item_name, precision[, required=1000])Returns the amount of ticks required to consume a certain amount
    get_net_eta (force, item_name, precision[, required=1000])Returns the amount of ticks required to produce but not consume a certain amount
    + + +

    Formating

    + + + + + + + + + + + + +
    get_color (clamp, active_value, passive_value)Returns a color value bassed on the value that was given
    format_number (value)Returns three parts used to format a number
    + + +
    + + +

    Dependencies

    +
    +
    +
    +
    + # + resources.color_presets +
    +
    +
    +
    + +

    Provides colors for Production.get_color

    +

    + + + + + + + + + + + + + + +
    +
    +
    +
    + # + util +
    +
    +
    +
    + +

    Provides format_number function to add surfixs

    +

    + + + + + + + + + + + + + + +
    +
    +

    Precision

    +
    +
    +
    +
    + # + precision_up (precision) +
    +
    +
    +
    + +

    Gets the next lesser precision index value, eg 1 second -> 1 minute

    +

    + + + Parameters: + + + + + + + Returns: + + + + + + + + + + +
    +
    +
    +
    + # + precision_down (precision) +
    +
    +
    +
    + +

    Gets the next greater precision index value, eg 1 minute -> 1 second

    +

    + + + Parameters: + + + + + + + Returns: + + + + + + + + + + +
    +
    +
    +
    + # + precision_ticks (precision) +
    +
    +
    +
    + +

    Gets the number of tick that precision is given over, eg 1 minute -> 60 ticks

    +

    + + + Parameters: + + + + + + + Returns: +
      +
    • + (number) + the number of ticks in this time +
    • +
    + + + + + + + + + +
    +
    +

    Statistics

    +
    +
    +
    +
    + # + get_production_total (force, item_name) +
    +
    +
    +
    + +

    Returns the production data for the whole game time

    +

    + + + Parameters: + +
      + + + + + +
    • + + force + + : + + (LuaForce) + + the force to get the data for + +
    • + + + + + +
    • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + contains total made, used and net +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_production (force, item_name, precision) +
    +
    +
    +
    + +

    Returns the production data for the given precision game time

    +

    + + + Parameters: + +
      + + + + + +
    • + + force + + : + + (LuaForce) + + the force to get the data for + +
    • + + + + + +
    • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
    • + + + + + +
    • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + contains made, used and net +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_fluctuations (force, item_name, precision) +
    +
    +
    +
    + +

    Returns the current fluctuation from the average

    +

    + + + Parameters: + +
      + + + + + +
    • + + force + + : + + (LuaForce) + + the force to get the data for + +
    • + + + + + +
    • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
    • + + + + + +
    • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + contains made, used and net +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_production_eta (force, item_name, precision[, required=1000]) +
    +
    +
    +
    + +

    Returns the amount of ticks required to produce a certain amount

    +

    + + + Parameters: + +
      + + + + + +
    • + + force + + : + + (LuaForce) + + the force to get the data for + +
    • + + + + + +
    • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
    • + + + + + +
    • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
    • + + + + + +
    • + + required + + : + + (number) + + the number of items that are required to be made + + (default: 1000) +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of ticks required to produce this ammount of items +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_consumsion_eta (force, item_name, precision[, required=1000]) +
    +
    +
    +
    + +

    Returns the amount of ticks required to consume a certain amount

    +

    + + + Parameters: + +
      + + + + + +
    • + + force + + : + + (LuaForce) + + the force to get the data for + +
    • + + + + + +
    • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
    • + + + + + +
    • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
    • + + + + + +
    • + + required + + : + + (number) + + the number of items that are required to be consumed + + (default: 1000) +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of ticks required to consume this ammount of items +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_net_eta (force, item_name, precision[, required=1000]) +
    +
    +
    +
    + +

    Returns the amount of ticks required to produce but not consume a certain amount

    +

    + + + Parameters: + +
      + + + + + +
    • + + force + + : + + (LuaForce) + + the force to get the data for + +
    • + + + + + +
    • + + item_name + + : + + (string) + + the name of the item that you want the data about + +
    • + + + + + +
    • + + precision + + : + + (defines.flow_precision_index) + + the precision that you want the data given to + +
    • + + + + + +
    • + + required + + : + + (number) + + the number of items that are required to be made but not used + + (default: 1000) +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of ticks required to produce, but not use, this ammount of items +
    • +
    + + + + + + + + + +
    +
    +

    Formating

    +
    +
    +
    +
    + # + get_color (clamp, active_value, passive_value) +
    +
    +
    +
    + +

    Returns a color value bassed on the value that was given

    +

    + + + Parameters: + +
      + + + + + +
    • + + clamp + + : + + (number) + + value which seperates the different colours + +
    • + + + + + +
    • + + active_value + + : + + (number) + + first value tested, tested against clamp + +
    • + + + + + +
    • + + passive_value + + : + + (number) + + second value tested, tested against 0 + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + contains r,g,b keys +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + format_number (value) +
    +
    +
    +
    + +

    Returns three parts used to format a number

    +

    + + + Parameters: + +
      + + + + + +
    • + + value + + : + + (number) + + the value to format + +
    • + + +
    + + + + + Returns: +
      +
    • + (string) + the sign for the number +
    • +
    • + (string) + the surfix for any unit used +
    • +
    • + (string) + the number formated +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.control.reports.html b/doc/modules/modules.control.reports.html new file mode 100644 index 00000000..cbfd54ef --- /dev/null +++ b/doc/modules/modules.control.reports.html @@ -0,0 +1,1026 @@ + + + + + + + + modules.control.reports module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.control.reports module

    +

    Control Module - Reports + - Adds a way to report players and store report messages.

    +

    + + + + + + +

    Usage

    +
    
    +    -- import the module from the control modules
    +    local Reports = require '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.
    +    Reports.report_player('MrBiter','Cooldude2606','Liking biters too much') -- true
    +
    +    -- The other get methods can be used to get all the reports on a player or to test if a player is reported.
    +    Reports.get_report('MrBiter','Cooldude2606') -- 'Liking biters too much'
    +
    +    -- This will remove the warning on 'MrBiter' (must be a valid player) which was made by 'Cooldude2606'.
    +    Reports.remove_report('MrBiter','Cooldude2606') -- true
    +
    +    -- This will remove all the report that have been made against 'MrBiter'. Note that the remove event will
    +    -- be triggered once per report issused.
    +    Reports.remove_all('MrBiter') -- true
    +
    + + + + + + + +

    Events

    + + + + + + + + + + + + +
    on_player_reportedWhen a player is reported
    on_report_removedWhen a report is removed from a player
    + + +

    Dependencies

    + + + + + + + + + + + + +
    utils.gameAllows getting player from any value
    utils.globalAllows storing of data in global table
    + + +

    Get functions

    + + + + + + + + + + + + + + + + + + + + +
    get_reports (player)Gets a list of all reports that a player has against them
    get_report (player, by_player_name)Gets a single report against a player given the name of the player who made the report
    is_reported (player[, by_player_name])Checks if a player is reported, option to get if reported by a certain player
    count_reports (player[, custom_count])Counts the number of reports that a player has aganist them
    + + +

    Set functions

    + + + + + + + + + + + + + + + + +
    report_player (player, by_player_name[, reason='Non given.'])Adds a report to a player, each player can only report another player once
    remove_report (player, reported_by_name)Removes a report from a player
    remove_all (player)Removes all reports from a player
    + + +
    + + +

    Events

    +
    +
    +
    +
    + # + on_player_reported +
    +
    +
    +
    + +

    When a player is reported

    +

    + + + Event Parameters: + +
      + + + + + +
    • + + player_index + + : + + (number) + + the player index of the player who got reported + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player who made the report + +
    • + + + + + +
    • + + reason + + : + + (string) + + the reason given for the report + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + on_report_removed +
    +
    +
    +
    + +

    When a report is removed from a player

    +

    + + + Event Parameters: + +
      + + + + + +
    • + + player_index + + : + + (number) + + the player index of the player who has the report removed + +
    • + + + + + +
    • + + reported_by_name + + : + + (string) + + the name of the player who made the removed report + +
    • + + + + + +
    • + + removed_by_name + + : + + (string) + + the name of the player who removed the report + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +

    Dependencies

    +
    +
    +
    +
    + # + utils.game +
    +
    +
    +
    + +

    Allows getting player from any value

    +

    + + + + + + + + + + + + + + +
    +
    +
    +
    + # + utils.global +
    +
    +
    +
    + +

    Allows storing of data in global table

    +

    + + + + + + + + + + + + + + +
    +
    +

    Get functions

    +
    +
    +
    +
    + # + get_reports (player) +
    +
    +
    +
    + +

    Gets a list of all reports that a player has against them

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + a list of all reports, key is by player name, value is reason +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_report (player, by_player_name) +
    +
    +
    +
    + +

    Gets a single report against a player given the name of the player who made the report

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to get the report for + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player who made the report + +
    • + + +
    + + + + + Returns: +
      +
    • + (string or nil) + string is the reason that the player was reported, if the player is not reported +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + is_reported (player[, by_player_name]) +
    +
    +
    +
    + +

    Checks if a player is reported, option to get if reported by a certain player

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to check if reported + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + when given will check if reported by this player + + (optional) +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + if the player has been reported +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + count_reports (player[, custom_count]) +
    +
    +
    +
    + +

    Counts the number of reports that a player has aganist them

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to count the reports for + +
    • + + + + + +
    • + + custom_count + + : + + (function) + + when given this function will be used to count the reports + + (optional) +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of reports that the user has +
    • +
    + + + + + + + + + +
    +
    +

    Set functions

    +
    +
    +
    +
    + # + report_player (player, by_player_name[, reason='Non given.']) +
    +
    +
    +
    + +

    Adds a report to a player, each player can only report another player once

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to add the report to + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player that is making the report + +
    • + + + + + +
    • + + reason + + : + + (string) + + the reason that the player is being reported + + (default: 'Non given.') +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + whether the report was added successfully +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + remove_report (player, reported_by_name) +
    +
    +
    +
    + +

    Removes a report from a player

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to remove the report from + +
    • + + + + + +
    • + + reported_by_name + + : + + (string) + + the name of the player that made the report + +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + whether the report was removed successfully +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + remove_all (player) +
    +
    +
    +
    + +

    Removes all reports from a player

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to remove the reports from + +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + whether the reports were removed successfully +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.control.warnings.html b/doc/modules/modules.control.warnings.html new file mode 100644 index 00000000..022c2d8a --- /dev/null +++ b/doc/modules/modules.control.warnings.html @@ -0,0 +1,1416 @@ + + + + + + + + modules.control.warnings module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.control.warnings module

    +

    Control Module - Warnings + - Adds a way to give and remove warnings to players.

    +

    + + + + + + +

    Usage

    +
    
    +    -- This will add a warning to the player
    +    Warnings.add_warning('MrBiter','Cooldude2606','Killed too many biters')
    +
    +    -- This will remove a warning from a player, second name is just who is doing the action
    +    Warnings.remove_warning('MrBiter','Cooldude2606')
    +
    +    -- Script warning as similar to normal warning but are designed to have no effect for a short amount of time
    +    -- this is so it can be used for greifer protection without being too agressive
    +    Warnings.add_script_warning('MrBiter','Killed too many biters')
    +
    +    -- Both normal and script warnings can also be cleared, this will remove all warnings
    +    Warnings.clear_warnings('MrBiter','Cooldude2606')
    + + + + + + + +

    Events

    + + + + + + + + + + + + + + + + + + + + +
    on_warning_addedWhen a warning is added to a player
    on_warning_removedWhen a warning is removed from a player
    on_script_warning_addedWhen a warning is added to a player, by the script
    on_script_warning_removedWhen a warning is remnoved from a player, by the script
    + + +

    Dependencies

    + + + + + + + + + + + + + + + + + + + + +
    utils.eventAllows registering of custom events
    utils.gameAllows getting player from any value
    utils.globalAllows storing in the global table
    config.warningsConfig file for this module
    + + +

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    get_warnings (player)Gets an array of warnings that the player has, always returns a list even if emtpy
    count_warnings (player)Gets the number of warnings that a player has on them
    add_warning (player, by_player_name[, reason='Non given.'])Adds a warning to a player, when a warning is added a set action is done based on the number of warnings and the config file
    remove_warning (player, by_player_name)Removes a warning from a player, always removes the earlyist warning, fifo
    clear_warnings (player, by_player_name)Removes all warnings from a player, will trigger remove event for each warning
    get_script_warnings (player)Gets an array of all the script warnings that a player has
    count_script_warnings (player)Gets the number of script warnings that a player has on them
    add_script_warning (player[, reason='Non given.'])Adds a script warning to a player, this may add a full warning if max script warnings is met
    remove_script_warning (player)Removes a script warning from a player
    clear_script_warnings (player)Removes all script warnings from a player, emits event for each warning removed
    + + +
    + + +

    Events

    +
    +
    +
    +
    + # + on_warning_added +
    +
    +
    +
    + +

    When a warning is added to a player

    +

    + + + Event Parameters: + +
      + + + + + +
    • + + player_index + + : + + (number) + + the index of the player who recived the warning + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player who gave the warning + +
    • + + + + + +
    • + + reason + + : + + (string) + + the reason that the player was given a warning + +
    • + + + + + +
    • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + on_warning_removed +
    +
    +
    +
    + +

    When a warning is removed from a player

    +

    + + + Event Parameters: + +
      + + + + + +
    • + + player_index + + : + + (number) + + the index of the player who is having the warning removed + +
    • + + + + + +
    • + + warning_by_name + + : + + (string) + + the name of the player who gave the warning + +
    • + + + + + +
    • + + removed_by_name + + : + + (string) + + the name of the player who is removing the warning + +
    • + + + + + +
    • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + on_script_warning_added +
    +
    +
    +
    + +

    When a warning is added to a player, by the script

    +

    + + + Event Parameters: + +
      + + + + + +
    • + + player_index + + : + + (number) + + the index of the player who recived the warning + +
    • + + + + + +
    • + + reason + + : + + (string) + + the reason that the player was given a warning + +
    • + + + + + +
    • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + on_script_warning_removed +
    +
    +
    +
    + +

    When a warning is remnoved from a player, by the script

    +

    + + + Event Parameters: + +
      + + + + + +
    • + + player_index + + : + + (number) + + the index of the player who is having the warning removed + +
    • + + + + + +
    • + + warning_count + + : + + (number) + + the new number of warnings that the player has + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +

    Dependencies

    +
    +
    +
    +
    + # + utils.event +
    +
    +
    +
    + +

    Allows registering of custom events

    +

    + + + + + + + + + + + + + + +
    +
    +
    +
    + # + utils.game +
    +
    +
    +
    + +

    Allows getting player from any value

    +

    + + + + + + + + + + + + + + +
    +
    +
    +
    + # + utils.global +
    +
    +
    +
    + +

    Allows storing in the global table

    +

    + + + + + + + + + + + + + + +
    +
    +
    +
    + # + config.warnings +
    +
    +
    +
    + +

    Config file for this module

    +

    + + + + + + + + + + + + + + +
    +
    +

    Functions

    +
    +
    +
    +
    + # + get_warnings (player) +
    +
    +
    +
    + +

    Gets an array of warnings that the player has, always returns a list even if emtpy

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to get the warning for + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + an array of all the warnings on this player, contains tick, by_player_name and reason +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + count_warnings (player) +
    +
    +
    +
    + +

    Gets the number of warnings that a player has on them

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to count the warnings for + +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of warnings that the player has +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + add_warning (player, by_player_name[, reason='Non given.']) +
    +
    +
    +
    + +

    Adds a warning to a player, when a warning is added a set action is done based on the number of warnings and the config file

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to add a warning to + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
    • + + + + + +
    • + + reason + + : + + (string) + + the reason that the player is being warned + + (default: 'Non given.') +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of warnings that the player has +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + remove_warning (player, by_player_name) +
    +
    +
    +
    + +

    Removes a warning from a player, always removes the earlyist warning, fifo

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to remove a warning from + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of warnings that the player has +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + clear_warnings (player, by_player_name) +
    +
    +
    +
    + +

    Removes all warnings from a player, will trigger remove event for each warning

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to clear the warnings from + +
    • + + + + + +
    • + + by_player_name + + : + + (string) + + the name of the player who is doing the action + +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + true when warnings were cleared succesfully +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + get_script_warnings (player) +
    +
    +
    +
    + +

    Gets an array of all the script warnings that a player has

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to get the script warnings of + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + a table of all the script warnings a player has, contains tick and reason +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + count_script_warnings (player) +
    +
    +
    +
    + +

    Gets the number of script warnings that a player has on them

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to count the script warnings of + +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of script warnings that the player has +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + add_script_warning (player[, reason='Non given.']) +
    +
    +
    +
    + +

    Adds a script warning to a player, this may add a full warning if max script warnings is met

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to add a script warning to + +
    • + + + + + +
    • + + reason + + : + + (string) + + the reason that the player is being warned + + (default: 'Non given.') +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of script warnings that the player has +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + remove_script_warning (player) +
    +
    +
    +
    + +

    Removes a script warning from a player

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to remove a script warning from + +
    • + + +
    + + + + + Returns: +
      +
    • + (number) + the number of script warnings that the player has +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + clear_script_warnings (player) +
    +
    +
    +
    + +

    Removes all script warnings from a player, emits event for each warning removed

    +

    + + + Parameters: + +
      + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to clear the script warnings from + +
    • + + +
    + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.gui.player-list.html b/doc/modules/modules.gui.player-list.html index 7fc8957c..6c2f2a74 100644 --- a/doc/modules/modules.gui.player-list.html +++ b/doc/modules/modules.gui.player-list.html @@ -1,118 +1,449 @@ - - - - - Reference + + + + + + + + modules.gui.player-list module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/modules.gui.rocket-info.html b/doc/modules/modules.gui.rocket-info.html index 310b86a0..a61c019d 100644 --- a/doc/modules/modules.gui.rocket-info.html +++ b/doc/modules/modules.gui.rocket-info.html @@ -1,118 +1,465 @@ - - - - - Reference + + + + + + + + modules.gui.rocket-info module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/modules.gui.science-info.html b/doc/modules/modules.gui.science-info.html index 8df96f38..10dd9a57 100644 --- a/doc/modules/modules.gui.science-info.html +++ b/doc/modules/modules.gui.science-info.html @@ -1,118 +1,365 @@ - - - - - Reference + + + + + + + + modules.gui.science-info module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/modules.gui.task-list.html b/doc/modules/modules.gui.task-list.html index a14412da..b2d44c25 100644 --- a/doc/modules/modules.gui.task-list.html +++ b/doc/modules/modules.gui.task-list.html @@ -1,118 +1,393 @@ - - - - - Reference + + + + + + + + modules.gui.task-list module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    +
    + + + + diff --git a/doc/modules/utils.alien_evolution_progress.html b/doc/modules/utils.alien_evolution_progress.html index a26633ee..511ede25 100644 --- a/doc/modules/utils.alien_evolution_progress.html +++ b/doc/modules/utils.alien_evolution_progress.html @@ -1,158 +1,427 @@ - - - - - Reference + + + + + + + + utils.alien_evolution_progress module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + - - +
  • + + total_aliens + + : + + + table + +
  • + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + diff --git a/doc/modules/utils.core.html b/doc/modules/utils.core.html index 41b857d2..415f1982 100644 --- a/doc/modules/utils.core.html +++ b/doc/modules/utils.core.html @@ -1,452 +1,1172 @@ - - - - - Reference + + + + + + + + utils.core module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + +
    + + + + diff --git a/doc/modules/utils.table.html b/doc/modules/utils.table.html index cfe0c528..499ad887 100644 --- a/doc/modules/utils.table.html +++ b/doc/modules/utils.table.html @@ -1,583 +1,1390 @@ - - - - - Reference + + + + + + + + utils.table module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + + - - +
    +
    +
    + + + + diff --git a/doc/modules/utils.timestamp.html b/doc/modules/utils.timestamp.html index e2b2a781..201f2509 100644 --- a/doc/modules/utils.timestamp.html +++ b/doc/modules/utils.timestamp.html @@ -1,217 +1,450 @@ - - - - - Reference + + + + + + + + utils.timestamp module + + + - - + + -
    +
    +
    -
    - -
    -
    -
    + + +