From fec4f0c184cf7d463152e7839b5a9923572c6199 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 21 Jun 2019 22:00:15 +0100 Subject: [PATCH 01/25] Moved reports to control --- config/action_buttons.lua | 6 +- doc/config.ld | 88 + doc/index.html | 688 ++-- doc/ldoc.css | 443 +-- doc/ldoc.ltp | 402 ++ doc/modules/Reports.html | 935 +++++ doc/modules/addons.advanced-start.html | 71 + doc/modules/addons.chat-popups.html | 72 + doc/modules/addons.damage-popups.html | 72 + doc/modules/config._file_loader.html | 278 +- doc/modules/config.action_buttons.html | 280 +- doc/modules/config.advanced_start.html | 292 +- doc/modules/config.bonuses.html | 176 + doc/modules/config.chat_reply.html | 176 + doc/modules/config.death_logger.html | 278 +- doc/modules/config.discord_alerts.html | 176 + .../config.expcore-commands.auth_admin.html | 278 +- .../config.expcore-commands.auth_roles.html | 292 +- ...expcore-commands.auth_runtime_disable.html | 278 +- ...config.expcore-commands.parse_general.html | 278 +- .../config.expcore-commands.parse_roles.html | 292 +- doc/modules/config.permission_groups.html | 278 +- doc/modules/config.popup_messages.html | 292 +- doc/modules/config.rockets.html | 376 +- doc/modules/config.roles.html | 292 +- doc/modules/config.scorched_earth.html | 292 +- doc/modules/config.spawn_area.html | 292 +- doc/modules/config.warnings.html | 292 +- doc/modules/config.warps.html | 176 + doc/modules/control.html | 278 +- doc/modules/control.reports.html | 341 ++ doc/modules/expcore.commands.html | 281 +- doc/modules/expcore.common.html | 2783 ++++++++++---- doc/modules/expcore.gui.concepts.center.html | 913 +++++ doc/modules/expcore.gui.concepts.left.html | 1179 ++++++ doc/modules/expcore.gui.concepts.popups.html | 658 ++++ doc/modules/expcore.gui.concepts.toolbar.html | 366 ++ doc/modules/expcore.gui.core.html | 278 +- doc/modules/expcore.gui.elements.buttons.html | 509 +++ .../expcore.gui.elements.checkboxs.html | 827 +++++ .../expcore.gui.elements.dropdown.html | 689 ++++ .../expcore.gui.elements.elem-button.html | 384 ++ .../expcore.gui.elements.progress-bar.html | 1130 ++++++ doc/modules/expcore.gui.elements.slider.html | 460 +++ doc/modules/expcore.gui.elements.text.html | 506 +++ doc/modules/expcore.gui.html | 278 +- doc/modules/expcore.gui.instances.html | 278 +- doc/modules/expcore.gui.prototype.html | 1399 +++++++ doc/modules/expcore.gui.test.html | 278 +- doc/modules/expcore.permission_groups.html | 1430 +++++--- doc/modules/expcore.roles.html | 3241 ++++++++++++----- doc/modules/expcore.store.html | 987 +++-- doc/modules/expcore.sudo.html | 177 + doc/modules/gui.player-list.html | 71 + doc/modules/gui.rocket-info.html | 100 + doc/modules/gui.science-info.html | 71 + doc/modules/gui.task-list.html | 71 + .../modules.addons.advanced-start.html | 292 +- doc/modules/modules.addons.chat-popups.html | 278 +- doc/modules/modules.addons.damage-popups.html | 278 +- doc/modules/modules.gui.player-list.html | 292 +- doc/modules/modules.gui.rocket-info.html | 342 +- doc/modules/modules.gui.science-info.html | 292 +- doc/modules/modules.gui.task-list.html | 292 +- .../utils.alien_evolution_progress.html | 365 +- doc/modules/utils.core.html | 1119 ++++-- doc/modules/utils.debug.html | 729 ++-- doc/modules/utils.event.html | 1256 +++++-- doc/modules/utils.event_core.html | 483 ++- doc/modules/utils.math.html | 398 +- doc/modules/utils.recipe_locker.html | 361 +- doc/modules/utils.state_machine.html | 780 ++-- doc/modules/utils.table.html | 1458 ++++++-- doc/modules/utils.task.html | 496 ++- doc/modules/utils.timestamp.html | 494 ++- doc/spectre-icons.min.css | 568 +++ doc/spectre.min.css | 2778 ++++++++++++++ doc/topics/license.html | 729 ++++ doc/topics/readme.md.html | 269 ++ modules/addons/discord-alerts.lua | 8 +- modules/addons/reports-control.lua | 141 - modules/commands/reports.lua | 14 +- modules/control/reports.lua | 212 ++ 83 files changed, 33865 insertions(+), 8963 deletions(-) create mode 100644 doc/config.ld create mode 100644 doc/ldoc.ltp create mode 100644 doc/modules/Reports.html create mode 100644 doc/modules/addons.advanced-start.html create mode 100644 doc/modules/addons.chat-popups.html create mode 100644 doc/modules/addons.damage-popups.html create mode 100644 doc/modules/config.bonuses.html create mode 100644 doc/modules/config.chat_reply.html create mode 100644 doc/modules/config.discord_alerts.html create mode 100644 doc/modules/config.warps.html create mode 100644 doc/modules/control.reports.html create mode 100644 doc/modules/expcore.gui.concepts.center.html create mode 100644 doc/modules/expcore.gui.concepts.left.html create mode 100644 doc/modules/expcore.gui.concepts.popups.html create mode 100644 doc/modules/expcore.gui.concepts.toolbar.html create mode 100644 doc/modules/expcore.gui.elements.buttons.html create mode 100644 doc/modules/expcore.gui.elements.checkboxs.html create mode 100644 doc/modules/expcore.gui.elements.dropdown.html create mode 100644 doc/modules/expcore.gui.elements.elem-button.html create mode 100644 doc/modules/expcore.gui.elements.progress-bar.html create mode 100644 doc/modules/expcore.gui.elements.slider.html create mode 100644 doc/modules/expcore.gui.elements.text.html create mode 100644 doc/modules/expcore.gui.prototype.html create mode 100644 doc/modules/expcore.sudo.html create mode 100644 doc/modules/gui.player-list.html create mode 100644 doc/modules/gui.rocket-info.html create mode 100644 doc/modules/gui.science-info.html create mode 100644 doc/modules/gui.task-list.html create mode 100644 doc/spectre-icons.min.css create mode 100644 doc/spectre.min.css create mode 100644 doc/topics/license.html create mode 100644 doc/topics/readme.md.html delete mode 100644 modules/addons/reports-control.lua create mode 100644 modules/control/reports.lua diff --git a/config/action_buttons.lua b/config/action_buttons.lua index d1f6846d86..9bf8de57ff 100644 --- a/config/action_buttons.lua +++ b/config/action_buttons.lua @@ -7,7 +7,7 @@ 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 Reports = require 'modules.control.reports' local Warnings = require 'modules.addons.warnings-control' local Jail = require 'modules.addons.jail-control' local Colors = require 'resources.color_presets' @@ -106,7 +106,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,7 +118,7 @@ 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 diff --git a/doc/config.ld b/doc/config.ld new file mode 100644 index 0000000000..fdaec597a6 --- /dev/null +++ b/doc/config.ld @@ -0,0 +1,88 @@ +file = '../' +dir = '../doc' +project = 'ExpGaming Scenario' +title = 'ExpGaming Scenario' +description = 'Explosive Gaming\'s server scenario for 0.17' + +convert_opt = true +sort = true +not_luadoc = true +no_lua_ref = true +template_escape = ">" +topics = {"../README.md", "../LICENSE"} +style = '../doc' +template = '../doc' + +new_type("event", "Events", false, "Event 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/index.html b/doc/index.html index 45c80e3fc1..36d76e1a3b 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,376 +1,378 @@ - - - - - Reference - - - - -
-
- -
-
-
+ + + + + + ExpGaming Scenario + + + + + + -
+
+
+ - + +
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/ldoc.css b/doc/ldoc.css index 7d74ca235e..809ab2375c 100644 --- a/doc/ldoc.css +++ b/doc/ldoc.css @@ -1,307 +1,244 @@ -/* BEGIN RESET - -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 */ +/* universal */ + +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} -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 } +/* table */ -body, p, td, th { font-size: .95em; line-height: 1.2em;} +table,thead{text-align:left} +table,th,td{padding:2px} -p, ul { margin: 10px 0 0 0px;} -strong { font-weight: bold;} +/* sidebar */ -em { font-style: italic;} +.sidebar {height: 100%} -h1 { - font-size: 1.5em; - margin: 0 0 20px 0; +.sidebar-custom { + border-right: 1px solid #2C2C2C; + padding-right: 1.4rem; + bottom: 0rem; } -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; + +@supports (-ms-ime-align:auto) { + .sidebar-custom { + height: 99%; + } } -blockquote { margin-left: 3em; } +.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} -ul { list-style-type: disc; } -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; +/* main page module list */ + +.body-module-name {font-weight: 500} + +table.module_list { + border-spacing: 0; + display: table; + border-collapse: collapse; + margin-bottom: 2.0rem; } -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; +table.module_list td { + border-top: 1px solid #2C2C2C; + border-bottom: 1px solid #2C2C2C; + padding: 3px 7px 3px 7px; } -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; +table.module_list td.name { + vertical-align: top; + min-width: 125px; + background-color: #0D0D0D; } +table.module_list td.summary {vertical-align: top} -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } +.module_list p {margin:0px} -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; +/* section */ + +.module-see-also li { + margin-top: 0.5rem; } -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; +.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; } -#product big { - font-size: 2em; +table.section-content-list { + border-spacing: 0; + display: table; + border-collapse: collapse; + margin-bottom: 1.5rem; } -#main { - background-color: #f0f0f0; - border-left: 2px solid #cccccc; +table.section-content-list td { + border-top: 1px solid #2C2C2C; + border-bottom: 1px solid #2C2C2C; + padding: 3px 7px 3px 7px; } -#navigation { - float: left; - width: 14em; +table.section-content-list td.name { + background-color: #0D0D0D; vertical-align: top; - background-color: #f0f0f0; - overflow: visible; + white-space: nowrap; } -#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; +table.section-content-list td.summary { + min-width: 200px; + vertical-align: top; } -#navigation ul -{ - font-size:1em; - list-style-type: none; - margin: 1px 1px 10px 1px; -} +.section-content-list p {margin: 0px} -#navigation li { - text-indent: -1em; - display: block; - margin: 3px 0px 0px 22px; +div.section-item-header .section-item-title { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1.5rem; + margin-left: 3px; } -#navigation li li a { - margin: 0px 3px 0px -1em; +.section-title:target { + padding-left: 7px; + border-left: 5px solid #FF7200; + text-decoration: none; } -#content { - margin-left: 14em; - padding: 1em; - width: 700px; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; +.section-item-title:target { + padding: 3px 5px 3px 5px; + background-color: #FF7200; + color: #000000; + text-decoration: none; } -#about { - clear: both; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} +.section-item-body {margin-left: 4rem} -@media print { - body { - font: 12pt "Times New Roman", "TimeNR", Times, serif; - } - a { font-weight: bold; color: #004080; text-decoration: underline; } +/*.section-subitem-li { + padding-left: 1.28571429em; + text-indent: -1.28571429em; +}*/ - #main { - background-color: #ffffff; - border-left: 0px; - } +/*.section-subitem-module-field-li { + margin-left: -1.28571429em; + padding-left: 1.28571429em; + text-indent: -1.28571429em; +}*/ - #container { - margin-left: 2%; - margin-right: 2%; - background-color: #ffffff; - } +/* example pages */ - #content { - padding: 1em; - background-color: #ffffff; - } +pre.code.example{margin:0 0 1em} +pre.code.example code h2{display:none} +pre.code.example code pre{margin:0} - #navigation { - display: none; - } - pre.example { - font-family: "Andale Mono", monospace; - font-size: 10pt; - page-break-inside: avoid; - } -} -table.module_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.module_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.module_list td.name { background-color: #f0f0f0; min-width: 200px; } -table.module_list td.summary { width: 100%; } +/* 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} -table.function_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - 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; -} +/* 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} -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; } +/* fragment hashtag */ -/* make the target distinct; helps when we're navigating to a function */ -a:target + * { - background-color: #FF9; +.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} } -/* 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; } + +/* 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 0000000000..ca3fc3d2b7 --- /dev/null +++ b/doc/ldoc.ltp @@ -0,0 +1,402 @@ +> 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/Reports.html b/doc/modules/Reports.html new file mode 100644 index 0000000000..f22beb2fa1 --- /dev/null +++ b/doc/modules/Reports.html @@ -0,0 +1,935 @@ + + + + + + + + Reports module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Reports module

+

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

+

+ + + + + + +

Usage

+

+    -- 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
+ + +

Get functions

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

Set functions

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

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 + +
  • + + +
+ + + + + + + + + + + + + +
+
+

Get functions

+
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+

Set functions

+
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+
+
+ # + 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 +
  • +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/doc/modules/addons.advanced-start.html b/doc/modules/addons.advanced-start.html new file mode 100644 index 0000000000..71ef2c75f9 --- /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 0000000000..df8efb1e67 --- /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 0000000000..89bc225544 --- /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 2b4403f7d8..21cb995df3 100644 --- a/doc/modules/config._file_loader.html +++ b/doc/modules/config._file_loader.html @@ -1,121 +1,179 @@ - - - - - Reference + + + + + + + + config._file_loader module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config._file_loader

-

This contains a list of all files that will be loaded and the order they are loaded in + + + +

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

config._file_loader module

+

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

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.action_buttons.html b/doc/modules/config.action_buttons.html index ae1730dcaf..d04dd7ff24 100644 --- a/doc/modules/config.action_buttons.html +++ b/doc/modules/config.action_buttons.html @@ -1,122 +1,180 @@ - - - - - Reference + + + + + + + + config.action_buttons module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.action_buttons

-

Config for the different action buttons that show on the player list + + + +

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

config.action_buttons module

+

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_child(action_name_store,player.name,'BUTTON_NAME') should be called during on_click + 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

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.advanced_start.html b/doc/modules/config.advanced_start.html index e1826c7e38..be13127164 100644 --- a/doc/modules/config.advanced_start.html +++ b/doc/modules/config.advanced_start.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.advanced_start module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.advanced_start module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.bonuses.html b/doc/modules/config.bonuses.html new file mode 100644 index 0000000000..9389a5dd0b --- /dev/null +++ b/doc/modules/config.bonuses.html @@ -0,0 +1,176 @@ + + + + + + + + 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 0000000000..69221be0c3 --- /dev/null +++ b/doc/modules/config.chat_reply.html @@ -0,0 +1,176 @@ + + + + + + + + config.chat_reply module + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.chat_reply module

+

This file defines the different triggers for the chat bot

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.death_logger.html b/doc/modules/config.death_logger.html index 9843717760..203ad3f94e 100644 --- a/doc/modules/config.death_logger.html +++ b/doc/modules/config.death_logger.html @@ -1,120 +1,178 @@ - - - - - Reference + + + + + + + + config.death_logger module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.death_logger

-

This config controls what happens when a player dies mostly about map markers and item collection + + + +

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

config.death_logger module

+

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

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.discord_alerts.html b/doc/modules/config.discord_alerts.html new file mode 100644 index 0000000000..f3e462a99a --- /dev/null +++ b/doc/modules/config.discord_alerts.html @@ -0,0 +1,176 @@ + + + + + + + + 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 3a780c6bae..3e050d1bd4 100644 --- a/doc/modules/config.expcore-commands.auth_admin.html +++ b/doc/modules/config.expcore-commands.auth_admin.html @@ -1,120 +1,178 @@ - - - - - Reference + + + + + + + + config.expcore-commands.auth_admin module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.expcore-commands.auth_admin

-

This is a very simple config file which adds a admin only auth function + + + +

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

config.expcore-commands.auth_admin module

+

This is a very simple config file which adds a admin only auth function not much to change here its more so it can be enabled and disabled from ./config/file_loader.lua either way you can change the requirements to be "admin" if you wanted to

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.expcore-commands.auth_roles.html b/doc/modules/config.expcore-commands.auth_roles.html index 328cf7df6c..01997b9b78 100644 --- a/doc/modules/config.expcore-commands.auth_roles.html +++ b/doc/modules/config.expcore-commands.auth_roles.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.expcore-commands.auth_roles module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.expcore-commands.auth_roles module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.expcore-commands.auth_runtime_disable.html b/doc/modules/config.expcore-commands.auth_runtime_disable.html index f8f1896025..126d731153 100644 --- a/doc/modules/config.expcore-commands.auth_runtime_disable.html +++ b/doc/modules/config.expcore-commands.auth_runtime_disable.html @@ -1,119 +1,177 @@ - - - - - Reference + + + + + + + + config.expcore-commands.auth_runtime_disable module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.expcore-commands.auth_runtime_disable

-

This config for command auth allows commands to be globally enabled and disabled during runtime + + + +

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

config.expcore-commands.auth_runtime_disable module

+

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

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.expcore-commands.parse_general.html b/doc/modules/config.expcore-commands.parse_general.html index 3b6006bd47..9a908bba5b 100644 --- a/doc/modules/config.expcore-commands.parse_general.html +++ b/doc/modules/config.expcore-commands.parse_general.html @@ -1,122 +1,180 @@ - - - - - Reference + + + + + + + + config.expcore-commands.parse_general module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.expcore-commands.parse_general

-

This file contains some common command param parse functions + + + +

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

config.expcore-commands.parse_general module

+

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

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.expcore-commands.parse_roles.html b/doc/modules/config.expcore-commands.parse_roles.html index 45f17c50fa..7f85c2c53b 100644 --- a/doc/modules/config.expcore-commands.parse_roles.html +++ b/doc/modules/config.expcore-commands.parse_roles.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.expcore-commands.parse_roles module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.expcore-commands.parse_roles module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.permission_groups.html b/doc/modules/config.permission_groups.html index c9572f7f38..35e8a99fee 100644 --- a/doc/modules/config.permission_groups.html +++ b/doc/modules/config.permission_groups.html @@ -1,121 +1,179 @@ - - - - - Reference + + + + + + + + config.permission_groups module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.permission_groups

-

Use this file to add new permission groups to the game + + + +

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

config.permission_groups module

+

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

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/config.popup_messages.html b/doc/modules/config.popup_messages.html index 93daa30265..d1abfb314e 100644 --- a/doc/modules/config.popup_messages.html +++ b/doc/modules/config.popup_messages.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.popup_messages module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.popup_messages module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.rockets.html b/doc/modules/config.rockets.html index 93c35073ea..bcc93126c8 100644 --- a/doc/modules/config.rockets.html +++ b/doc/modules/config.rockets.html @@ -1,165 +1,257 @@ - - - - - Reference + + + + + + + + config.rockets module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.rockets

-

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

-

- - -

Fields

- - - - - - - - - -
show_statsThe data that will show in the stats section
show_progressThe data and buttons in the build progress section
- -
-
- - -

Fields

- -
+ + + +
+
+ + + + + + + +
+ + + + + + + + +

config.rockets module

+

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

+

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

Fields

+ + + + + + + + + + + + +
show_progressThe data and buttons in the build progress section
show_statsThe data that will show in the stats section
+ + +
+ + +

Fields

+
- - show_stats +
+
+ # + show_progress +
- The data that will show in the stats section +
+

The data and buttons in the build progress section

+

+ + + + + + + + -
+
- - show_progress +
+
+ # + show_stats +
- The data and buttons in the build progress section +
+ +

The data that will show in the stats section

+

+ + + + + + + + +
+
- -
+ +
+
+
- - -
-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 62b973ec89..6a21bf0f49 100644 --- a/doc/modules/config.roles.html +++ b/doc/modules/config.roles.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.roles module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.roles module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.scorched_earth.html b/doc/modules/config.scorched_earth.html index 22741e11bd..72c4958fb9 100644 --- a/doc/modules/config.scorched_earth.html +++ b/doc/modules/config.scorched_earth.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.scorched_earth module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.scorched_earth module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.spawn_area.html b/doc/modules/config.spawn_area.html index e25138fb0d..b849bd5b3b 100644 --- a/doc/modules/config.spawn_area.html +++ b/doc/modules/config.spawn_area.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.spawn_area module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module config.spawn_area

-

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)

-

- - - -
-
- - - - -
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.spawn_area module

+

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)

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.warnings.html b/doc/modules/config.warnings.html index d087da36f9..d6ef9bfd90 100644 --- a/doc/modules/config.warnings.html +++ b/doc/modules/config.warnings.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + config.warnings module + + + - - - -
- -
- -
-
-
- - - -
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + +
+
+ + + + + + + +
+ + + + + + + + +

config.warnings module

+

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

+

+ + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + + diff --git a/doc/modules/config.warps.html b/doc/modules/config.warps.html new file mode 100644 index 0000000000..895cbacb06 --- /dev/null +++ b/doc/modules/config.warps.html @@ -0,0 +1,176 @@ + + + + + + + + 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 73a8a5b4e9..7f8c0a3212 100644 --- a/doc/modules/control.html +++ b/doc/modules/control.html @@ -1,121 +1,179 @@ - - - - - Reference + + + + + + + + control module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module control

-

Please go to ./config if you want to change settings, each file is commented with what it does + + + +

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

control module

+

Please go to ./config if you want to change settings, each file is commented with what it does if it is not in ./config then you should not attempt to change it unless you know what you are doing all files which are loaded (including the config files) are present in ./config/file_loader.lua this file is the landing point for all scenarios please DO NOT edit directly, further comments are to aid development

-

+

+ + + + + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/control.reports.html b/doc/modules/control.reports.html new file mode 100644 index 0000000000..eee1ba640c --- /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 a41d8db765..2fd660009c 100644 --- a/doc/modules/expcore.commands.html +++ b/doc/modules/expcore.commands.html @@ -1,123 +1,180 @@ - - - - - Reference + + + + + + + + expcore.commands module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module expcore.commands

-

Factorio command making module that makes commands with better parse and more modularity

-

+ + + +

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

expcore.commands module

+

Factorio command making module that makes commands with better parse and more modularity

+

[[

-

Info:

+ + +
    -
  • Author: Cooldude2606
  • +
  • Author: Cooldude2606
+ + + + + + + -
-
+
+ + +
+
+
-
-
-
-generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
-
- - + + + diff --git a/doc/modules/expcore.common.html b/doc/modules/expcore.common.html index 83fc1ed40c..9132875558 100644 --- a/doc/modules/expcore.common.html +++ b/doc/modules/expcore.common.html @@ -1,996 +1,2255 @@ - - - - - Reference + + + + + + + + expcore.common module + + + - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module expcore.common

-

Adds some commonly used functions used in many modules

-

+ + + +

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

expcore.common module

+

Adds some commonly used functions used in many modules

+

[[

-

Info:

-
    -
  • Author: cooldude2606
  • -
- - -

Functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Common.type_check (value[, test_type=nil])Compare types faster for faster validation of params
Common.type_check_error (value, test_type, error_message, level)Raises an error if the value is of the wrong type
Common.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
Common.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
Common.write_json (path, tbl)Writes a table object to a file in json format
Common.opt_require (path)Calls a require that will not error if the file is not found
Common.ext_require (path, ...)Calls a require and returns only the keys given, file must return a table
Common.format_time (ticks, options)Formats tick into a clean format, denominations from highest to lowest + + + +
    +
  • Author: cooldude2606
  • +
+ + + + + + + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Common.auto_complete (options, input[, use_key=false][, rtn_key=false])Returns the closest match to the input
Common.clear_flying_text (surface)Clears all flying text entites on a surface
Common.enum (tbl)Converts a table to an enum
Common.ext_require (path, ...)Calls a require and returns only the keys given, file must return a table
Common.extract_keys (tbl, ...)Extracts certain keys from a table
Common.format_chat_colour (message, color)Returns a message with valid chat tags to change its colour
Common.format_chat_colour_localized (message, color)Returns a message with valid chat tags to change its colour, using localization
Common.format_chat_player_name (player[, raw_string=false])Returns the players name in the players color
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
Common.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
Common.print_grid_value (value, surface, position, scale, offset, immutable)https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4a2/map_gen/maps/diggy/debug.lua#L31 +
Common.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
Common.opt_require (path)Calls a require that will not error if the file is not found
Common.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
Common.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
Common.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.
Common.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.
Common.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.
Common.clear_flying_text (surface)Clears all flying text entites on a surface
Common.string_contains (s, contains)Tests if a string contains a given substring.
Common.extract_keys (tbl, ...)Extracts certain keys from a table
Common.enum (tbl)Converts a table to an enum
Common.auto_complete (options, input[, use_key=false[, rtn_key=false]])Returns the closest match to the input
Common.table_keys (tbl)Returns all the keys of a table
Common.table_values (tbl)Returns all the values of a table
Common.table_alphanumsort (tbl)Returns the list is a sorted way that would be expected by people (this is by key)
Common.table_keysort (tbl)Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
Common.format_chat_colour (message, color)Returns a message with valid chat tags to change its colour
Common.format_chat_colour_localized (message, color)Returns a message with valid chat tags to change its colour, using localization
Common.format_chat_player_name (player[, raw_string=false])Returns the players name in the players color
- -
-
- - -

Functions

- -
+
Common.string_contains (s, contains)Tests if a string contains a given substring.
Common.table_alphanumsort (tbl)Returns the list is a sorted way that would be expected by people (this is by key)
Common.table_keys (table[, sorted][, as_string])Returns a copy of all of the keys in the table.
Common.table_keysort (tbl)Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
Common.table_values (table[, sorted][, as_string])Returns a copy of all of the values in the table.
Common.type_check (value[, test_type=nil])Compare types faster for faster validation of params
Common.type_check_error (value, test_type, error_message, level)Raises an error if the value is of the wrong type
Common.write_json (path, tbl)Writes a table object to a file in json format
+ + +
+ + +

Functions

+
- - Common.type_check (value[, test_type=nil]) +
+
+ # + Common.auto_complete (options, input[, use_key=false][, rtn_key=false]) +
- Compare types faster for faster validation of params +
+

Returns the closest match to the input

+

+ + + Parameters: -

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
  • -
+
  • -
  • -
    - - Common.type_check_error (value, test_type, error_message, level) -
    -
    - Raises an error if the value is of the wrong type + options + : + + (table) + + table a of options for the auto complete + + -

    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:

    + 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:
      -
      type_check_error('foo','number','Value must be a number') -- will raise error "Value must be a number"
      +
    • + the list item found that matches the input +
    + + + + + + + + -
    +
    - - Common.param_check (value, test_type, param_name, param_number) +
    +
    + # + Common.clear_flying_text (surface) +
    - Raises an error when the value is the incorrect type, uses a consistent error message format +
    +

    Clears all flying text entites on a surface

    +

    + + + Parameters: -

    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"
      +
    • + + surface + + : + + (LuaSurface) + + the surface to clear + +
    • + +
    -
    + + + + + + + + + + + + +
    - - Common.player_return (value[, colour=defines.colour.white[, player=game.player]]) +
    +
    + # + Common.enum (tbl) +
    - Will return a value of any type to the player/server console, allows colour for in-game players +
    + +

    Converts a table to an enum

    +

    + + Parameters: -

    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:

    + +
  • + + tbl + + : + + (table) + + table the that will be converted + +
  • + + + + + + + + Returns:
      -
    • 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
    • +
    • + (table) + the new table that acts like an enum +
    + -
    + + + + + + + +
    - - Common.write_json (path, tbl) +
    +
    + # + Common.ext_require (path, ...) +
    - Writes a table object to a file in json format +
    + +

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

    +

    + + Parameters: -

    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 -
    • -
    -
    -
    - - Common.opt_require (path) -
    -
    - Calls a require that will not error if the file is not found +
  • + path -

    Parameters:

    -
      -
    • path - string - the path that you want to require -
    • -
    + : + + (string) + + the path that you want to require + +
  • + + + + + +
  • + + ... + + : -

    Returns:

    -
      + (string) - the returns from that file or nil, error if not loaded -
    + the name of the keys that you want returned +
  • -

    Usage:

    + + + + + + Returns:
      -
      local file = opt_require('file.not.present') -- will not cause any error
      +
    • + the keys in the order given +
    + + -
    + + + + + Usage: +
    local extract, param_check = ext_require('expcore.common','extract','param_check')
    + + +
    - - Common.ext_require (path, ...) +
    +
    + # + Common.extract_keys (tbl, ...) +
    - Calls a require and returns only the keys given, file must return a table +
    +

    Extracts certain keys from a table

    +

    + + + Parameters: -

    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:

    +
  • + + tbl + + : + + (table) + + table the which contains the keys + +
  • + + + + + +
  • + + ... + + : + + (string) + + the names of the keys you want extracted + +
  • + + + + + + + + Returns:
      -
      local extract, param_check = ext_require('expcore.common','extract','param_check')
      +
    • + 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')
    + + +
    - - Common.format_time (ticks, options) +
    +
    + # + Common.format_chat_colour (message, color) +
    - 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 +
    +

    Returns a message with valid chat tags to change its colour

    +

    + + + Parameters: -

    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 -
    +
  • -
  • -
    - - Common.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 + message + : -

    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) -
    • -
    + (string) + the message that will be in the output + -
    -
    - - Common.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 -
    • -
    +
  • + color + : + (table) + a color which contains r,g,b as its keys -
  • -
    - - Common.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 -
    • -
    - - - - - -
    -
    - - Common.clear_flying_text (surface) -
    -
    - Clears all flying text entites on a surface + -

    Parameters:

    -
      -
    • surface - LuaSurface - the surface to clear -
    + + + + Returns: +
      +
    • + (string) + the message with the color tags included +
    • +
    + + + + + -
    +
    - - Common.string_contains (s, contains) +
    +
    + # + Common.format_chat_colour_localized (message, color) +
    - Tests if a string contains a given substring. +
    +

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

    +

    + + + Parameters: -

    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 -
    +
  • -
  • -
    - - Common.extract_keys (tbl, ...) -
    -
    - Extracts certain keys from a table + message + : -

    Parameters:

    -
      -
    • tbl - table - table the which contains the keys -
    • -
    • ... - string - the names of the keys you want extracted -
    • -
    + (string or table) + + the message that will be in the output + + + + + + + +
  • -

    Returns:

    -
      + color - the keys in the order given -
    + : + (table) + a color which contains r,g,b as its keys -

    Usage:

    +
  • + + + + + + + + Returns:
      -
      local key_three, key_one = extract({key_one='foo',key_two='bar',key_three=true},'key_three','key_one')
      +
    • + (table) + the message with the color tags included +
    + + + + + + + + -
    +
    - - Common.enum (tbl) +
    +
    + # + Common.format_chat_player_name (player[, raw_string=false]) +
    - Converts a table to an enum +
    +

    Returns the players name in the players color

    +

    + + + Parameters: -

    Parameters:

      -
    • tbl - table - table the that will be converted -
    • -
    -

    Returns:

    -
      - table - the new table that acts like an enum -
    +
  • -
  • -
    - - Common.auto_complete (options, input[, use_key=false[, rtn_key=false]]) -
    -
    - Returns the closest match to the input + player + : -

    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) -
    • -
    + (LuaPlayer) -

    Returns:

    -
      + the player to use the name and color of - the list item found that matches the input -
    + -
    -
    - - Common.table_keys (tbl) -
    -
    - Returns all the keys of a table + +
  • + + raw_string + + : + + (boolean) + + when true a is returned rather than a localized string + + (default: false) +
  • -

    Parameters:

    -
      -
    • tbl - table - table the to get the keys of -
    -

    Returns:

    -
      + - table - an array of the table keys -
    + + Returns: +
      +
    • + (table) + the players name with tags for the players color +
    • +
    + + + + + -
    +
    - - Common.table_values (tbl) +
    +
    + # + Common.format_time (ticks, options) +
    - Returns all the values of a table +
    + +

    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: -

    Parameters:

      -
    • tbl - table - table the to get the values of -
    • -
    -

    Returns:

    -
      - table - an array of the table values -
    +
  • -
  • -
    - - Common.table_alphanumsort (tbl) -
    -
    - Returns the list is a sorted way that would be expected by people (this is by key) + ticks + : -

    Parameters:

    -
      -
    • tbl - table - the table to be sorted -
    • -
    + (number) -

    Returns:

    -
      + the number of ticks that represents a time - table - the sorted table -
    + -
    -
    - - Common.table_keysort (tbl) -
    -
    - Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above) + +
  • + + options + + : + + (table) + + table a of options to use for the format + +
  • -

    Parameters:

    -
      -
    • tbl - table - the table to be sorted -
    -

    Returns:

    -
      + - table - the sorted table -
    + + Returns: +
      +
    • + (string) + a locale string that can be used +
    • +
    + + + + + -
    +
    - - Common.format_chat_colour (message, color) +
    +
    + # + Common.move_items (items[, surface=navies][, position={0][, radius=32][, chest_type=iron-chest]) +
    - Returns a message with valid chat tags to change its colour +
    + +

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

    +

    + + Parameters: -

    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 -
    +
  • -
  • -
    - - Common.format_chat_colour_localized (message, color) -
    -
    - Returns a message with valid chat tags to change its colour, using localization + items + : -

    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 -
    • -
    + (table) -

    Returns:

    -
      + items which are to be added to the chests, ['name']=count - table - the message with the color tags included -
    + -
    -
    - - Common.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) -
    • -
    + 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) +
  • + + + + + + + + + + + + + + + + +
    +
    +
    +
    + # + Common.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
    + + +
    +
    +
    +
    + # + Common.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"
    + + +
    +
    +
    +
    + # + Common.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
    + + +
    +
    +
    +
    + # + Common.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Common.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Common.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Common.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Common.table_keys (table[, sorted][, as_string]) +
    +
    +
    +
    + +

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

    +

    + + + Parameters: + +
      + + + + + +
    • + + table + + : + + (table) + + tbl 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Common.table_keysort (tbl) +
    +
    +
    +
    + +

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

    +

    + + + Parameters: + +
      + + + + + +
    • + + tbl + + : + + (table) + + the table to be sorted + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + the sorted table +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Common.table_values (table[, sorted][, as_string]) +
    +
    +
    +
    + +

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

    +

    + + + Parameters: + +
      + + + + + +
    • + + table + + : + + (table) + + tbl 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Common.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
    + + +
    +
    +
    +
    + # + Common.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"
    + + +
    +
    +
    +
    + # + Common.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 + +
    • + + +
    + + -

    Returns:

    -
      + + - table - the players name with tags for the players color -
    + + + + +
    +
    - - + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.gui.concepts.center.html b/doc/modules/expcore.gui.concepts.center.html new file mode 100644 index 0000000000..6e16dce5c2 --- /dev/null +++ b/doc/modules/expcore.gui.concepts.center.html @@ -0,0 +1,913 @@ + + + + + + + + expcore.gui.concepts.center module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.concepts.center module

    +

    Gui structure define for center gui frames +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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:event_handler ([action=update])Creates an event handler that will trigger one of its functions, use with Event.add
    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:set_auto_focus ([state=true])Sets the frame to be the current active gui when opened and closes all other frames
    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.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.get_flow (player)Gets the center flow for a player
    CenterFrames.new_frame (permision_name)Creates a new center frame define
    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
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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: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) +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + 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: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: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.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.get_flow (player) +
    +
    +
    +
    + +

    Gets the center flow for a player

    +

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

    Creates a new center frame define

    +

    + + + Parameters: + +
      + + + + + +
    • + + permision_name + + : + + (string) + + the name that can be used with the permision system + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + the new center frame define +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.concepts.left.html b/doc/modules/expcore.gui.concepts.left.html new file mode 100644 index 0000000000..72bac7b3cd --- /dev/null +++ b/doc/modules/expcore.gui.concepts.left.html @@ -0,0 +1,1179 @@ + + + + + + + + expcore.gui.concepts.left module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.concepts.left module

    +

    Gui structure define for left frames +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    LeftFrames._prototype:_internal_draw (player)Creates the gui for the first time, used internally
    LeftFrames._prototype:event_handler ([action=update])Creates an event handler that will trigger one of its functions, use with Event.add
    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: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:set_direction (direction)Sets the direction of the frame, either vertical or horizontal
    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:toggle (player)Toggles the visiblty of the left frame
    LeftFrames._prototype:update (player)Updates the contents of the left frame, first tries update callback, oter wise will clear and redraw
    LeftFrames._prototype:update_all ([update_offline=false])Updates the frame for all players, see update
    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.new_frame (permision_name)Creates a new left frame define
    LeftFrames.toggle_frame (name, player[, state])Toggles the visiblty of a left frame, or sets its visiblty state
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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: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) +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + 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: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: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 thef frame + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + 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 visiblty, 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:toggle (player) +
    +
    +
    +
    + +

    Toggles the visiblty of the left frame

    +

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

    Updates the contents of the left frame, first tries update callback, oter 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.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.new_frame (permision_name) +
    +
    +
    +
    + +

    Creates a new left frame define

    +

    + + + Parameters: + +
      + + + + + +
    • + + permision_name + + : + + (string) + + the name that can be used with the permision system + +
    • + + +
    + + + + + Returns: +
      +
    • + (table) + the new left frame define +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + LeftFrames.toggle_frame (name, player[, state]) +
    +
    +
    +
    + +

    Toggles the visiblty of a left frame, or sets its visiblty 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 visiblty is set to + + (optional) +
    • + + +
    + + + + + Returns: +
      +
    • + (boolean) + the new state of the visiblity +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.concepts.popups.html b/doc/modules/expcore.gui.concepts.popups.html new file mode 100644 index 0000000000..65be91b44a --- /dev/null +++ b/doc/modules/expcore.gui.concepts.popups.html @@ -0,0 +1,658 @@ + + + + + + + + expcore.gui.concepts.popups module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.concepts.popups module

    +

    Gui structure define for popup gui +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + +
    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
    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.get_flow (player)Gets the left flow that contains the popup frames
    PopupFrames.new_popup ([name])Creates a new popup frame define
    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
    + + +

    Fields

    + + + + + + + + + + + + +
    PopupFrames.close_buttonA button which can be used to close the gui before the timer runs out
    PopupFrames.close_progressProgress bar which when depleaded will close the popup frame
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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.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.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.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 +
    • +
    + + + + + + + + + +
    +
    +

    Fields

    +
    +
    +
    +
    + # + PopupFrames.close_button +
    +
    +
    +
    + +

    A button which can be used to close the gui before the timer runs out

    +

    + + + + + + + + + + + + + + +
    +
    +
    +
    + # + PopupFrames.close_progress +
    +
    +
    +
    + +

    Progress bar which when depleaded will close the popup frame

    +

    + + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.concepts.toolbar.html b/doc/modules/expcore.gui.concepts.toolbar.html new file mode 100644 index 0000000000..feb16ea851 --- /dev/null +++ b/doc/modules/expcore.gui.concepts.toolbar.html @@ -0,0 +1,366 @@ + + + + + + + + expcore.gui.concepts.toolbar module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.concepts.toolbar module

    +

    Gui structure for the toolbar (top left) +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + +
    Toolbar.add_button (button)Adds an existing buttton to the toolbar
    Toolbar.new_button ([name])Adds a new button to the toolbar
    Toolbar.update (player)Updates the player's toolbar with an new buttons or expected change in auth return
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + Toolbar.add_button (button) +
    +
    +
    +
    + +

    Adds an existing buttton to the toolbar

    +

    + + + Parameters: + +
      + + + + + +
    • + + button + + : + + (table) + + the button define for the button to be added + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + 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.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 523bda7b1a..808fc3be62 100644 --- a/doc/modules/expcore.gui.core.html +++ b/doc/modules/expcore.gui.core.html @@ -1,121 +1,179 @@ - - - - - Reference + + + + + + + + expcore.gui.core module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.gui.core

    -

    Core gui file for making element defines and element classes (use require 'expcore.gui') + + + +

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

    expcore.gui.core module

    +

    Core gui file for making element defines and element classes (use require 'expcore.gui') see utils.gui for event handlering see expcore.gui.test for examples for element defines [[

    -

    +

    + + + + + + + + + + -
    -
    +
    + + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.gui.elements.buttons.html b/doc/modules/expcore.gui.elements.buttons.html new file mode 100644 index 0000000000..56c026f6bc --- /dev/null +++ b/doc/modules/expcore.gui.elements.buttons.html @@ -0,0 +1,509 @@ + + + + + + + + expcore.gui.elements.buttons module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.buttons module

    +

    Gui class define for buttons and sprite buttons +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + +
    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
    Button._prototype:set_sprites (sprite[, hovered_sprite][, clicked_sprite])Adds sprites to a button making it a spirte button
    Button.new_button ([name])Creates a new button element define
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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 keyss one after each other + + (optional) +
    • + + +
    + + + + + Returns: +
      +
    • + (self) + returns the button define to allow chaining +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Button._prototype:set_sprites (sprite[, hovered_sprite][, clicked_sprite]) +
    +
    +
    +
    + +

    Adds sprites to a button making it a spirte 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.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 +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.elements.checkboxs.html b/doc/modules/expcore.gui.elements.checkboxs.html new file mode 100644 index 0000000000..65b59b2d83 --- /dev/null +++ b/doc/modules/expcore.gui.elements.checkboxs.html @@ -0,0 +1,827 @@ + + + + + + + + expcore.gui.elements.checkboxs module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.checkboxs module

    +

    Gui class define for checkboxs and radiobuttons +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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.draw_option_set (name, element)Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)
    Checkbox.new_checkbox ([name])Creates a new checkbox element define
    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.new_radiobutton ([name])Creates a new radiobutton element define, has all functions checkbox has
    Checkbox.reset_radiobuttons (element[, exclude][, recursive=false])Sets all radiobutotn in a element to false (unless excluded) and can act recursivly
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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.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.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_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.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.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 0000000000..bfc37a2d7b --- /dev/null +++ b/doc/modules/expcore.gui.elements.dropdown.html @@ -0,0 +1,689 @@ + + + + + + + + expcore.gui.elements.dropdown module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.dropdown module

    +

    Gui class define for dropdowns and list boxs +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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._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:new_static_options (options[, ...], the)Adds new static options to the dropdown which will trigger the general callback
    Dropdown.get_selected_value (element)Returns the currently selected value rather than index
    Dropdown.new_dropdown ([name])Creates a new dropdown element define
    Dropdown.new_list_box ([name])Creates a new list box element define
    Dropdown.select_value (element, value)Selects the option from a dropdown or list box given the value rather than key
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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._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: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.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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.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 +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + 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 0000000000..a692d11087 --- /dev/null +++ b/doc/modules/expcore.gui.elements.elem-button.html @@ -0,0 +1,384 @@ + + + + + + + + expcore.gui.elements.elem-button module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.elem-button module

    +

    Gui class defines for elem buttons +[[

    +

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

    Functions

    + + + + + + + + + + + + +
    ElemButton._prototype:set_default (value)Sets the default value for the elem button, this may be a function or a string
    ElemButton.new_elem_button ([name])Creates a new elem button element define
    + + +

    Fields

    + + + + + + + + +
    ElemButton._prototype.set_typeSets the type of the elem button, the type is required so this must be called at least once
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    +

    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 0000000000..757af5862f --- /dev/null +++ b/doc/modules/expcore.gui.elements.progress-bar.html @@ -0,0 +1,1130 @@ + + + + + + + + expcore.gui.elements.progress-bar module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.progress-bar module

    +

    Gui element define for progess bars +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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: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:event_countdown ([filter])Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented
    ProgressBar._prototype:event_counter ([filter])Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented
    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:reset_element (element)Resets an element, or its store, to be back at the start, either 1 or 0
    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.decrement (element[, amount=1])Decreases the value of the progressbar, if a define is given all of its instances are decresed
    ProgressBar.increment (element[, amount=1])Increases the value of the progressbar, if a define is given all of its instances are incremented
    ProgressBar.new_progressbar ([name])Creates a new progressbar element define
    ProgressBar.set_maximum (element, amount)Sets the maximum value that represents the end value of the progress bar
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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: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:event_countdown ([filter]) +
    +
    +
    +
    + +

    Event handler factory that counts down by 1 every time the event triggeres, can filter which elements are decremented

    +

    + + + Parameters: + +
      + + + + + +
    • + + filter + + : + + (function) + + when given will use filtered decerement + + (optional) +
    • + + +
    + + + + + Returns: +
      +
    • + (function) + the event handler +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + ProgressBar._prototype:event_counter ([filter]) +
    +
    +
    +
    + +

    Event handler factory that counts up by 1 every time the event triggeres, can filter which elements are incremented

    +

    + + + Parameters: + +
      + + + + + +
    • + + filter + + : + + (function) + + when given will use filtered incerement + + (optional) +
    • + + +
    + + + + + Returns: +
      +
    • + (function) + the event handler +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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: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: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.decrement (element[, amount=1]) +
    +
    +
    +
    + +

    Decreases the value of the progressbar, if a define is given all of its instances are decresed

    +

    + + + 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.increment (element[, amount=1]) +
    +
    +
    +
    + +

    Increases the value of the progressbar, if a define is given all of its instances are 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.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 elemente define +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.elements.slider.html b/doc/modules/expcore.gui.elements.slider.html new file mode 100644 index 0000000000..81c07eb932 --- /dev/null +++ b/doc/modules/expcore.gui.elements.slider.html @@ -0,0 +1,460 @@ + + + + + + + + expcore.gui.elements.slider module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.slider module

    +

    Gui class define for silders +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + +
    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
    Slider._prototype:set_range ([min][, max])Sets the range of a slider, if not used will use default values for a slider
    Slider.new_slider ([name])Creates a new slider element define
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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 lable 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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.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 +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.elements.text.html b/doc/modules/expcore.gui.elements.text.html new file mode 100644 index 0000000000..caead90f2c --- /dev/null +++ b/doc/modules/expcore.gui.elements.text.html @@ -0,0 +1,506 @@ + + + + + + + + expcore.gui.elements.text module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.elements.text module

    +

    Gui class define for text fields and text boxs +[[

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + +
    Text._prototype_box:set_read_only ([state=true])Sets the text box to be read only
    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.new_text_box ([name])Creates a new text box element define
    Text.new_text_field ([name])Creates a new text field element define
    + + +
    + + +

    Functions

    +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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.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.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 +
    • +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.html b/doc/modules/expcore.gui.html index 810d6e388c..0f532f4602 100644 --- a/doc/modules/expcore.gui.html +++ b/doc/modules/expcore.gui.html @@ -1,119 +1,177 @@ - - - - - Reference + + + + + + + + expcore.gui module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.gui

    -

    This file is used to require all the different elements of the gui module + + + +

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

    expcore.gui module

    +

    This file is used to require all the different elements of the gui module each module has an outline here but for more details see their seperate files in ./gui

    -

    +

    + + + + + + + + + + -
    -
    +
    + + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.gui.instances.html b/doc/modules/expcore.gui.instances.html index b379c6a822..f59a14e3cf 100644 --- a/doc/modules/expcore.gui.instances.html +++ b/doc/modules/expcore.gui.instances.html @@ -1,119 +1,177 @@ - - - - - Reference + + + + + + + + expcore.gui.instances module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.gui.instances

    -

    This file is a breakout from core which forcues on instance management of defines + + + +

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

    expcore.gui.instances module

    +

    This file is a breakout from core which forcues on instance management of defines [[

    -

    +

    + + + + + + + + + + -
    -
    +
    + + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.gui.prototype.html b/doc/modules/expcore.gui.prototype.html new file mode 100644 index 0000000000..764f364c47 --- /dev/null +++ b/doc/modules/expcore.gui.prototype.html @@ -0,0 +1,1399 @@ + + + + + + + + expcore.gui.prototype module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    expcore.gui.prototype module

    +

    Used to create new gui prototypes see elements and concepts +[[

    +

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

    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.setter (value_type, key[, second_key])Creates a setter function that checks the type when a value is set
    Constructor.store (sync, callback)Creates a new function which adds a store to a gui define
    Prototype:clear_store ([category])Sets the value in this elements store to nil, category needed if categorize function used
    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:raise_event (event_name, ...)Raises a custom event for this define, any number of params can be given
    Prototype:set_embeded_flow (boolean)Sets the element to be drawn inside a nameless flow, can be given a name using a function
    Prototype:set_store (category, value)Sets the value in this elements store, category needed if categorize function used
    Prototype:set_style (style[, function])Sets the style for the element define
    Prototype:uid ()Gets the uid for the element define
    + + +

    Fields

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Prototype.debug_nameSets a debug alias for the define
    Prototype.on_drawRegisters a callback to the on_draw event
    Prototype.on_style_updateRegisters a callback to the on_style_update event
    Prototype.set_captionSets the caption for the element define
    Prototype.set_post_authenticatorSets an authenticator that disables the element if check fails
    Prototype.set_pre_authenticatorSets an authenticator that blocks the draw function if check fails
    Prototype.set_tooltipSets the tooltip for the element define
    + + +
    + + +

    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.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + 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: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:set_embeded_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: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: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:uid () +
    +
    +
    +
    + +

    Gets the uid for the element define

    +

    + + + + + + Returns: +
      +
    • + (string) + the uid of this element define +
    • +
    + + + + + + + + + +
    +
    +

    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.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_caption +
    +
    +
    +
    + +

    Sets the caption for the element define

    +

    + + + +
      + + + + + +
    • + + caption + + : + + (string) + + the caption that will be drawn with the element + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + 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.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_tooltip +
    +
    +
    +
    + +

    Sets the tooltip for the element define

    +

    + + + +
      + + + + + +
    • + + tooltip + + : + + (string) + + the tooltip that will be displayed for this element when drawn + +
    • + + +
    + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/expcore.gui.test.html b/doc/modules/expcore.gui.test.html index be35af419b..ed70b478d0 100644 --- a/doc/modules/expcore.gui.test.html +++ b/doc/modules/expcore.gui.test.html @@ -1,120 +1,178 @@ - - - - - Reference + + + + + + + + expcore.gui.test module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.gui.test

    -

    This file creates a teste gui that is used to test every input method + + + +

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

    expcore.gui.test module

    +

    This file creates a teste gui that is used to test every input method note that this does not cover every permutation only features in indepentance for example store in most cases is just by player name, but other store methods are tested with checkbox

    -

    +

    + + + + + + + + + + -
    -
    +
    + + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.permission_groups.html b/doc/modules/expcore.permission_groups.html index 33781f3f17..8cd698de28 100644 --- a/doc/modules/expcore.permission_groups.html +++ b/doc/modules/expcore.permission_groups.html @@ -1,660 +1,1208 @@ - - - - - Reference + + + + + + + + expcore.permission_groups module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.permission_groups

    -

    Permission group making for factorio so you never have to make one by hand again

    -

    + + + +

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

    expcore.permission_groups module

    +

    Permission group making for factorio so you never have to make one by hand again

    +

    [[

    -

    Info:

    + + +
      -
    • Author: Cooldude2606
    • -
    - - -

    Functions

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Permissions_Groups.new_group (name)Defines a new permission group that can have it actions set in the config
    Permissions_Groups.get_group_by_name (name)Returns the group with the given name, case sensitive
    Permissions_Groups.get_group_from_player (player)Returns the group that a player is in
    Permissions_Groups.reload_permissions ()Reloads/creates all permission groups and sets them to they configured state
    Permissions_Groups.lockdown_permissions (exempt)Removes all permissions from every permission group except for "Default" and any passed as exempt
    Permissions_Groups.set_player_group (player, group)Sets a player's group to the one given, a player can only have one group at a time
    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
    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
    - -
    -
    - - -

    Functions

    - -
    +
  • Author: Cooldude2606
  • + + + + + + + + + + + +

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Permissions_Groups._prototype:add_player (player)Adds a player to this group
    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:allow_all ()Sets the default state for any actions not given to be allowed, useful with :disallow
    Permissions_Groups._prototype:create ()Creates or updates the permission group with the configured actions, used internally
    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:disallow_all ()Sets the default state for any action not given to be disallowed, useful with :allow
    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:get_raw ()Returns the LuaPermissionGroup that was created with this group object, used internally
    Permissions_Groups._prototype:is_allowed (action)Returns if an input action is allowed for this group
    Permissions_Groups._prototype:print (message)Prints a message to every player in this group
    Permissions_Groups._prototype:remove_player (player)Removes a player from this group
    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.get_group_by_name (name)Returns the group with the given name, case sensitive
    Permissions_Groups.get_group_from_player (player)Returns the group that a player is in
    Permissions_Groups.lockdown_permissions (exempt)Removes all permissions from every permission group except for "Default" and any passed as exempt
    Permissions_Groups.new_group (name)Defines a new permission group that can have it actions set in the config
    Permissions_Groups.reload_permissions ()Reloads/creates all permission groups and sets them to they configured state
    Permissions_Groups.set_player_group (player, group)Sets a player's group to the one given, a player can only have one group at a time
    + + +
    + + +

    Functions

    +
    - - Permissions_Groups.new_group (name) +
    +
    + # + Permissions_Groups._prototype:add_player (player) +
    - Defines a new permission group that can have it actions set in the config +
    +

    Adds a player to this group

    +

    + + + Parameters: -

    Parameters:

      -
    • name - string - the name of the new group -
    • + + + + + +
    • + + player + + : + + (LuaPlayer) + + LuaPlayer the player you want to add to this group can be name or index etc + +
    • + +
    -

    Returns:

    -
      + - Permissions_Groups._prototype - the new group made with function to allow and disallow actions -
    + + Returns: +
      +
    • + (boolean) + true if the player was added successfully, false other wise +
    • +
    + + + + + -
    +
    - - Permissions_Groups.get_group_by_name (name) +
    +
    + # + Permissions_Groups._prototype:allow (actions) +
    - Returns the group with the given name, case sensitive +
    + +

    Sets an action or actions to be allowed for this group even with disallow_all triggered, Do not use in runtime

    +

    + + Parameters: -

    Parameters:

      -
    • name - string - the name of the group to get -
    • + + + + + +
    • + + actions + + : + + (string or Array) + + the action or actions that you want to allow for this group + +
    • + +
    -

    Returns:

    -
      + - Permissions_Groups._prototype or nil - the group with that name or nil if non found -
    + + Returns: +
      +
    • + (Permissions_Groups._prototype) + returns self so function can be chained +
    • +
    + + + + + -
    +
    - - Permissions_Groups.get_group_from_player (player) +
    +
    + # + Permissions_Groups._prototype:allow_all () +
    - Returns the group that a player is in +
    +

    Sets the default state for any actions not given to be allowed, useful with :disallow

    +

    -

    Parameters:

    + + + + + Returns:
      -
    • player - LuaPlayer - the player to get the group of can be name index etc -
    • +
    • + (Permissions_Groups._prototype) + returns self so function can be chained +
    + -

    Returns:

    -
      - - Permissions_Groups._prototype or nil - the group with that player or nil if non found -
    + + + + - -
    +
    - - Permissions_Groups.reload_permissions () +
    +
    + # + Permissions_Groups._prototype:create () +
    - Reloads/creates all permission groups and sets them to they configured state +
    +

    Creates or updates the permission group with the configured actions, used internally

    +

    + + + + Returns: + + + + + + -
    +
    - - Permissions_Groups.lockdown_permissions (exempt) +
    +
    + # + Permissions_Groups._prototype:disallow (actions) +
    - Removes all permissions from every permission group except for "Default" and any passed as exempt +
    + +

    Sets an action or actions to be disallowed for this group even with allow_all triggered, Do not use in runtime

    +

    + + Parameters: -

    Parameters:

      -
    • exempt - string or Array - groups that you want to be except, "Default" is always exempt -
    • + + + + + +
    • + + actions + + : + + (string or Array) + + the action or actions that you want to disallow for this group + +
    • + +
    -

    Returns:

    -
      + - number - the number of groups that had they permissions removed -
    + + Returns: +
      +
    • + (Permissions_Groups._prototype) + returns self so function can be chained +
    • +
    + + + + + -
    +
    - - Permissions_Groups.set_player_group (player, group) +
    +
    + # + Permissions_Groups._prototype:disallow_all () +
    - Sets a player's group to the one given, a player can only have one group at a time +
    +

    Sets the default state for any action not given to be disallowed, useful with :allow

    +

    -

    Parameters:

    + + + + + Returns:
      -
    • player - LuaPlayer - the player to effect can be name index etc -
    • -
    • group - string - the name of the group to give to the player -
    • +
    • + (Permissions_Groups._prototype) + returns self so function can be chained +
    + -

    Returns:

    -
      - - boolean - true if the player was added successfully, false other wise -
    + + + + - -
    +
    - - Permissions_Groups._prototype:set_action (action, state) +
    +
    + # + Permissions_Groups._prototype:get_players ([online]) +
    - Sets the allow state of an action for this group, used internally but is safe to use else where +
    + +

    Returns all player that are in this group with the option to filter to online/offline only

    +

    + + Parameters: -

    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 -
    • + + + + + +
    • + + online + + : + + (boolean) + + if nil returns all players, if true online players only, if false returns online players only + + (optional) +
    • + +
    -

    Returns:

    -
      + - Permissions_Groups._prototype - returns self so function can be chained -
    + + Returns: +
      +
    • + (table) + a table of players that are in this group; filtered if online param is given +
    • +
    + + + + + -
    +
    - - Permissions_Groups._prototype:allow (actions) +
    +
    + # + Permissions_Groups._prototype:get_raw () +
    - Sets an action or actions to be allowed for this group even with disallow_all triggered, Do not use in runtime +
    +

    Returns the LuaPermissionGroup that was created with this group object, used internally

    +

    -

    Parameters:

    + + + + + Returns:
      -
    • actions - string or Array - the action or actions that you want to allow for this group -
    • +
    • + (LuaPermissionGroup) + the raw lua permission group +
    + -

    Returns:

    -
      - - Permissions_Groups._prototype - returns self so function can be chained -
    + + + + - -
    +
    - - Permissions_Groups._prototype:disallow (actions) +
    +
    + # + Permissions_Groups._prototype:is_allowed (action) +
    - Sets an action or actions to be disallowed for this group even with allow_all triggered, Do not use in runtime +
    + +

    Returns if an input action is allowed for this group

    +

    + + Parameters: -

    Parameters:

      -
    • actions - string or Array - the action or actions that you want to disallow for this group -
    • + + + + + +
    • + + action + + : + + (string or defines.input_action) + + the action that you want to test for + +
    • + +
    -

    Returns:

    -
      + - Permissions_Groups._prototype - returns self so function can be chained -
    + + Returns: +
      +
    • + (boolean) + true if the group is allowed the action, false other wise +
    • +
    + + + + + -
    +
    - - Permissions_Groups._prototype:allow_all () +
    +
    + # + Permissions_Groups._prototype:print (message) +
    - Sets the default state for any actions not given to be allowed, useful with :disallow +
    +

    Prints a message to every player in this group

    +

    + + Parameters: -

    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 +
  • + + message + + : + + (string) + + the message that you want to send to the players +
  • -

    Returns:

    -
      + + + - Permissions_Groups._prototype - returns self so function can be chained -
    + + Returns: +
      +
    • + (number) + the number of players that received the message +
    • +
    + + + + + -
    +
    - - Permissions_Groups._prototype:is_allowed (action) +
    +
    + # + Permissions_Groups._prototype:remove_player (player) +
    - Returns if an input action is allowed for this group +
    +

    Removes a player from this group

    +

    + + + Parameters: -

    Parameters:

      -
    • action - string or defines.input_action - the action that you want to test for -
    • + + + + + +
    • + + player + + : + + (LuaPlayer) + + LuaPlayer the player you want to remove from this group can be name or index etc + +
    • + +
    -

    Returns:

    -
      + - boolean - true if the group is allowed the action, false other wise -
    + + Returns: +
      +
    • + (boolean) + true if the player was removed successfully, false other wise +
    • +
    + + + + + -
    +
    - - Permissions_Groups._prototype:get_raw () +
    +
    + # + Permissions_Groups._prototype:set_action (action, state) +
    - Returns the LuaPermissionGroup that was created with this group object, used internally +
    + +

    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 +
    • -

      Returns:

      -
        - LuaPermissionGroup - the raw lua permission group -
      +
    • + 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:create () +
    +
    + # + Permissions_Groups.get_group_by_name (name) +
    - Creates or updates the permission group with the configured actions, used internally +
    + +

    Returns the group with the given name, case sensitive

    +

    + + + Parameters: +
      + + + + + +
    • + + name + + : + (string) -

      Returns:

      -
        + the name of the group to get - LuaPermissionGroup - the permission group that was created -
      +
    • +
    + + + + + Returns: +
      +
    • + (Permissions_Groups._prototype or nil) + the group with that name or nil if non found +
    • +
    + + + + -
    + + + +
    - - Permissions_Groups._prototype:add_player (player) +
    +
    + # + Permissions_Groups.get_group_from_player (player) +
    - Adds a player to this group +
    + +

    Returns the group that a player is in

    +

    + + Parameters: -

    Parameters:

      -
    • player - LuaPlayer - LuaPlayer the player you want to add to this group can be name or index etc -
    • + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to get the group of can be name index etc + +
    • + +
    -

    Returns:

    -
      + - boolean - true if the player was added successfully, false other wise -
    + + Returns: +
      +
    • + (Permissions_Groups._prototype or nil) + the group with that player or nil if non found +
    • +
    + + + + + -
    +
    - - Permissions_Groups._prototype:remove_player (player) +
    +
    + # + Permissions_Groups.lockdown_permissions (exempt) +
    - Removes a player from this group +
    +

    Removes all permissions from every permission group except for "Default" and any passed as exempt

    +

    + + + Parameters: -

    Parameters:

      -
    • player - LuaPlayer - LuaPlayer the player you want to remove from this group can be name or index etc -
    • + + + + + +
    • + + exempt + + : + + (string or Array) + + groups that you want to be except, "Default" is always exempt + +
    • + +
    -

    Returns:

    -
      + - boolean - true if the player was removed successfully, false other wise -
    + + Returns: +
      +
    • + (number) + the number of groups that had they permissions removed +
    • +
    + + + + + -
    +
    - - Permissions_Groups._prototype:get_players ([online]) +
    +
    + # + Permissions_Groups.new_group (name) +
    - Returns all player that are in this group with the option to filter to online/offline only +
    + +

    Defines a new permission group that can have it actions set in the config

    +

    + + + Parameters: + +
      + + + + + +
    • + + name + + : + (string) -

      Parameters:

      + the name of the new group + +
    • + + +
    + + + + + Returns:
      -
    • online - boolean - if nil returns all players, if true online players only, if false returns online players only - (optional) -
    • +
    • + (Permissions_Groups._prototype) + the new group made with function to allow and disallow actions +
    + + + + + -

    Returns:

    -
      + + - table - a table of players that are in this group; filtered if online param is given -
    +
    +
    +
    +
    + # + Permissions_Groups.reload_permissions () +
    +
    +
    +
    + +

    Reloads/creates all permission groups and sets them to they configured state

    +

    + + + + -
    + + + + + + +
    - - Permissions_Groups._prototype:print (message) +
    +
    + # + Permissions_Groups.set_player_group (player, group) +
    - Prints a message to every player in this group +
    +

    Sets a player's group to the one given, a player can only have one group at a time

    +

    + + + Parameters: -

    Parameters:

      -
    • message - string - the message that you want to send to the players -
    • + + + + + +
    • + + player + + : + + (LuaPlayer) + + the player to effect can be name index etc + +
    • + + + + + +
    • + + group + + : + + (string) + + the name of the group to give to the player + +
    • + +
    -

    Returns:

    -
      + + + + Returns: +
        +
      • + (boolean) + true if the player was added successfully, false other wise +
      • +
      + - number - the number of players that received the message -
    + + + + +
    +
    - -
    + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.roles.html b/doc/modules/expcore.roles.html index 493741d186..62196b2463 100644 --- a/doc/modules/expcore.roles.html +++ b/doc/modules/expcore.roles.html @@ -1,1307 +1,2680 @@ - - - - - Reference + + + + + + + + expcore.roles module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.roles

    -

    Factorio role system to manage custom permissions

    -

    + + + +

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

    expcore.roles module

    +

    Factorio role system to manage custom permissions

    +

    [[

    -

    Info:

    + + +
      -
    • Author: Cooldude2606
    • -
    - - -

    Functions

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Roles.debug ()Returns a string which contains all roles in index order displaying all data for them
    Roles.print_to_roles (roles, message)Prints a message to all players in the given roles, may send duplicate message however factorio blocks spam
    Roles.print_to_roles_higher (role, message)Prints a message to all players who have the given role or one which is higher (excluding default)
    Roles.print_to_roles_lower (role, message)Prints a message to all players who have the given role or one which is lower (excluding default)
    Roles.get_role_by_name (name)Get a role for the given name
    Roles.get_role_by_order (index)Get a role with the given order index
    Roles.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
    Roles.get_player_roles (player)Gets all the roles of the given player, this will always contain the default role
    Roles.get_player_highest_role (player)Gets the highest role which the player has, can be used to compeer one player to another
    Roles.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
    Roles.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
    Roles.override_player_roles (roles)Overrides all player roles with the given table of roles, useful to mass set roles on game start
    Roles.player_has_role (player, search_role)A test for weather a player has the given role
    Roles.player_has_flag (player, flag_name)A test for weather a player has the given flag true for at least one of they roles
    Roles.player_allowed (player, action)A test for weather a player has at least one role which is allowed the given action
    Roles.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
    Roles.define_flag_trigger (name, callback)Defines a new trigger for when a tag is added or removed from a player
    Roles.set_default (name)Sets the default role which every player will have, this needs to be called at least once
    Roles.set_root (name)Sets the root role which will always have all permissions, any server actions act from this role
    Roles.new_role (name[, short_hand=name])Defines a new role and returns the prototype to allow configuration
    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
    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
    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 recive the role +
  • Author: Cooldude2606
  • + + + + + + + + + + + +

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - -
    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:allow (actions)Sets the allow actions for this role, actions in this list will be allowed for this role
    Roles._prototype:clear_flags ()Clears all flags from this role, individual flags can be removed with set_flag(name,false)
    Roles._prototype:disallow (actions)Sets the disallow actions for this role, will prevent actions from being allowed regardless of inheritance
    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:has_flag (name)A test for if the role has a flag set
    Roles._prototype:is_allowed (action)Test for if a role is allowed the given action, mostly internal see Roles.player_allowed
    Roles._prototype:print (message)Will print a message to all players with this role
    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:set_allow_all ([state=true])Sets the default allow state of the role, true will allow all actions
    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 recive 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
    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
    - -
    -
    - - -

    Functions

    - -
    +
    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
    Roles._prototype:set_custom_color (color)Sets a custom colour for the role, can be accessed by other code
    Roles._prototype:set_custom_tag (tag)Sets a custom player tag for the role, can be accessed by other code
    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: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_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.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
    Roles.debug ()Returns a string which contains all roles in index order displaying all data for them
    Roles.define_flag_trigger (name, callback)Defines a new trigger for when a tag is added or removed from a player
    Roles.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
    Roles.get_player_highest_role (player)Gets the highest role which the player has, can be used to compeer one player to another
    Roles.get_player_roles (player)Gets all the roles of the given player, this will always contain the default role
    Roles.get_role_by_name (name)Get a role for the given name
    Roles.get_role_by_order (index)Get a role with the given order index
    Roles.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
    Roles.new_role (name[, short_hand=name])Defines a new role and returns the prototype to allow configuration
    Roles.override_player_roles (roles)Overrides all player roles with the given table of roles, useful to mass set roles on game start
    Roles.player_allowed (player, action)A test for weather a player has at least one role which is allowed the given action
    Roles.player_has_flag (player, flag_name)A test for weather a player has the given flag true for at least one of they roles
    Roles.player_has_role (player, search_role)A test for weather a player has the given role
    Roles.print_to_roles (roles, message)Prints a message to all players in the given roles, may send duplicate message however factorio blocks spam
    Roles.print_to_roles_higher (role, message)Prints a message to all players who have the given role or one which is higher (excluding default)
    Roles.print_to_roles_lower (role, message)Prints a message to all players who have the given role or one which is lower (excluding default)
    Roles.set_default (name)Sets the default role which every player will have, this needs to be called at least once
    Roles.set_root (name)Sets the root role which will always have all permissions, any server actions act from this role
    Roles.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
    + + +
    + + +

    Functions

    +
    - - Roles.debug () +
    +
    + # + Roles._prototype:add_player (player, skip_check, skip_event) +
    - Returns a string which contains all roles in index order displaying all data for them +
    +

    Adds a player to this role, players can have more than one role at a time, used internally see Roles.assign

    +

    + + Parameters: -

    Returns:

    -
      +
        - string - the debug output string -
    -
    -
    - - Roles.print_to_roles (roles, message) -
    -
    - Prints a message to all players in the given roles, may send duplicate message however factorio blocks spam +
  • + player -

    Parameters:

    -
      -
    • roles - table - table a of roles which to send the message to -
    • -
    • message - string - the message to send to the players -
    • -
    + : + (LuaPlayer) + the player that will be given this role +
  • -
    -
    - - Roles.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 -
    • -
    +
  • + skip_check + : + (boolean) -
  • -
    - - Roles.print_to_roles_lower (role, message) -
    -
    - Prints a message to all players who have the given role or one which is lower (excluding default) + when true player will be taken as the player name (use when player has not yet joined) + -

    Parameters:

    -
      -
    • role - string - the name of the role to send the message to -
    • -
    • message - string - the message to send to the players -
    • -
    +
  • -
  • -
    - - Roles.get_role_by_name (name) -
    -
    - Get a role for the given name + skip_event + + : + + (boolean) + + when true the event emit will be skipped, this is used internally with Roles.assign + + -

    Parameters:

    -
      -
    • name - string - the name of the role to get -
    -

    Returns:

    -
      + - Roles._prototype - the role with that name or nil -
    + + Returns: +
      +
    • + (boolean) + true if the player was added successfully +
    • +
    + + + + + -
    +
    - - Roles.get_role_by_order (index) +
    +
    + # + Roles._prototype:allow (actions) +
    - Get a role with the given order index +
    + +

    Sets the allow actions for this role, actions in this list will be allowed for this role

    +

    + + Parameters: -

    Parameters:

      -
    • index - number - the place in the oder list of the role to get -
    • -
    -

    Returns:

    -
      - Roles._prototype - the role with that index in the order list or nil -
    +
  • -
  • -
    - - Roles.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 + actions + + : + + (table) + + indexed with numbers and is an array of action names, order has no effect + + -

    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 -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles.get_player_roles (player) +
    +
    + # + Roles._prototype:clear_flags () +
    - Gets all the roles of the given player, this will always contain the default role +
    + +

    Clears all flags from this role, individual flags can be removed with set_flag(name,false)

    +

    + + -

    Parameters:

    + + Returns:
      -
    • player - LuaPlayer - the player to get the roles of -
    • +
    • + (Roles._prototype) + allows chaining +
    + -

    Returns:

    -
      - table - a table where the values are the roles which the player has -
    + + + + - - -
    +
    - - Roles.get_player_highest_role (player) +
    +
    + # + Roles._prototype:disallow (actions) +
    - Gets the highest role which the player has, can be used to compeer one player to another +
    +

    Sets the disallow actions for this role, will prevent actions from being allowed regardless of inheritance

    +

    + + + Parameters: -

    Parameters:

      -
    • player - LuaPlayer - the player to get the highest role of -
    • -
    -

    Returns:

    -
      - the - role with the highest order index which this player has -
    +
  • -
  • -
    - - Roles.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 + actions + + : + + (table) + + indexed with numbers and is an array of action names, order has no effect + + -

    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) -
    + + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + -
    + + + +
    - - Roles.unassign_player (player, roles[, by_player_name=[, silent=false]]) +
    +
    + # + Roles._prototype:get_players ([online=nil]) +
    - Removes a player from the given role(s) with an option to pass a by player name used in the log +
    + +

    Returns an array of all the players who have this role, can be filtered by online status

    +

    + + Parameters: -

    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) -
    • -
    -
    -
    - - Roles.override_player_roles (roles) -
    -
    - Overrides all player roles with the given table of roles, useful to mass set roles on game start +
  • + + online + + : + + (boolean) + + when given will filter by this online state, nil will return all players + + (default: nil) +
  • -

    Parameters:

    -
      -
    • roles - table - table a which is indexed by case sensitive player names and has the value of a table of role names -
    + + + + Returns: +
      +
    • + (table) + all the players who have this role, indexed order is meaningless +
    • +
    + + + + + -
    +
    - - Roles.player_has_role (player, search_role) +
    +
    + # + Roles._prototype:has_flag (name) +
    - A test for weather a player has the given role +
    + +

    A test for if the role has a flag set

    +

    + + Parameters: -

    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 -
    +
  • -
  • -
    - - Roles.player_has_flag (player, flag_name) -
    -
    - A test for weather a player has the given flag true for at least one of they roles + name + + : + + (string) + + the name of the flag to test for + + -

    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 -
    + + Returns: +
      +
    • + (boolean) + true if the flag is set, false otherwise +
    • +
    + + + + + -
    +
    - - Roles.player_allowed (player, action) +
    +
    + # + Roles._prototype:is_allowed (action) +
    - A test for weather a player has at least one role which is allowed the given action +
    + +

    Test for if a role is allowed the given action, mostly internal see Roles.player_allowed

    +

    + + Parameters: -

    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 -
    +
  • -
  • -
    - - Roles.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 + action + + : + + (string) + + the name of the action to test if it is allowed + + -

    Parameters:

    -
      -
    • order - table - table a which is keyed only by numbers (start 1) and values are roles in order with highest first -
    + + + + Returns: +
      +
    • + (boolean) + true if action is allowed, false otherwise +
    • +
    + + + + + -
    +
    - - Roles.define_flag_trigger (name, callback) +
    +
    + # + Roles._prototype:print (message) +
    - Defines a new trigger for when a tag is added or removed from a player +
    +

    Will print a message to all players with this role

    +

    + + + Parameters: -

    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 -
    • -
    -
    -
    - - Roles.set_default (name) -
    -
    - Sets the default role which every player will have, this needs to be called at least once +
  • + message -

    Parameters:

    -
      -
    • name - string - the name of the default role -
    • -
    + : + (string) + the message that will be printed to the players +
  • -
    -
    - - Roles.set_root (name) -
    -
    - Sets the root role which will always have all permissions, any server actions act from this role + + -

    Parameters:

    + + Returns:
      -
    • name - string - the name of the root role -
    • +
    • + (number) + the number of players who received the message +
    + + + + + - -
    +
    - - Roles.new_role (name[, short_hand=name]) +
    +
    + # + Roles._prototype:remove_player (player, skip_check, skip_event) +
    - Defines a new role and returns the prototype to allow configuration +
    +

    Removes a player from this role, players can have more than one role at a time, used internally see Roles.unassign

    +

    + + + Parameters: -

    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 -
    +
  • -
  • -
    - - Roles._prototype:set_allow_all ([state=true]) -
    -
    - Sets the default allow state of the role, true will allow all actions + player + : -

    Parameters:

    -
      -
    • state - boolean - true will allow all actions - (default true) -
    • -
    + (LuaPlayer) -

    Returns:

    -
      + the player that will lose this role - 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 -
    • -
    + skip_check -

    Returns:

    -
      + : - Roles._prototype - allows chaining -
    + (boolean) + when true player will be taken as the player name (use when player has not yet joined) +
  • -
    -
    - - 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:

    -
      +
    1. - Roles._prototype - allows chaining -
    + skip_event + : + (boolean) + when true the event emit will be skipped, this is used internally with Roles.unassign -
    -
    - - 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 -
    + + Returns: +
      +
    • + (boolean) + true if the player was removed successfully +
    • +
    + + + + + -
    +
    - - Roles._prototype:set_flag (name[, value=true]) +
    +
    + # + Roles._prototype:set_allow_all ([state=true]) +
    - Sets the state of a flag for a role, flags can be used to apply effects to players +
    + +

    Sets the default allow state of the role, true will allow all actions

    +

    + + Parameters: -

    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) + state + : + (boolean) -

    Returns:

    -
      + true will allow all actions - Roles._prototype - allows chaining -
    + (default: true) + + + + + + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + -
    + + + +
    - - Roles._prototype:has_flag (name) +
    +
    + # + Roles._prototype:set_auto_promote_condition (callback) +
    - A test for if the role has a flag set +
    + +

    Sets an auto promote condition that is checked every 5 seconds, if true is returned then the player will recive the role + nb: this is one way, failing false after already gaining the role will not revoke the role

    +

    + + Parameters: -

    Parameters:

      -
    • name - string - the name of the flag to test for -
    • -
    -

    Returns:

    -
      - boolean - true if the flag is set, false otherwise -
    +
  • -
  • -
    - - Roles._prototype:set_custom_tag (tag) -
    -
    - Sets a custom player tag for the role, can be accessed by other code + callback + + : + + (function) + + receives only one param which is player to promote, return true to promote the player + + -

    Parameters:

    -
      -
    • tag - string - the value that the tag will be -
    -

    Returns:

    -
      + - Roles._prototype - allows chaining -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles._prototype:set_custom_color (color) +
    +
    + # + Roles._prototype:set_block_auto_promote ([state=true]) +
    - Sets a custom colour for the role, can be accessed by other code +
    + +

    Sets the role to not allow players to have auto promote effect them, useful to keep people locked to a punishment

    +

    + + Parameters: -

    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 + state + + : + + (boolean) + + when true the players with this role will not be auto promoted + + (default: true) + -

    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 -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles._prototype:set_parent (role) +
    +
    + # + Roles._prototype:set_custom_color (color) +
    - 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 +
    + +

    Sets a custom colour for the role, can be accessed by other code

    +

    + + Parameters: -

    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 recive the role - nb: this is one way, failing false after already gaining the role will not revoke the role + color + + : + + (table) + + ?string|table can either be and rgb colour or the name of a colour defined in the presets + + -

    Parameters:

    -
      -
    • callback - function - receives only one param which is player to promote, return true to promote the player -
    -

    Returns:

    -
      + - Roles._prototype - allows chaining -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles._prototype:set_block_auto_promote ([state=true]) +
    +
    + # + Roles._prototype:set_custom_tag (tag) +
    - Sets the role to not allow players to have auto promote effect them, useful to keep people locked to a punishment +
    + +

    Sets a custom player tag for the role, can be accessed by other code

    +

    + + Parameters: -

    Parameters:

      -
    • state - boolean - when true the players with this role will not be auto promoted - (default true) -
    • -
    -

    Returns:

    -
      - Roles._prototype - allows chaining -
    +
  • -
  • -
    - - 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 + tag + + : + + (string) + + the value that the tag will be + + -

    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 -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles._prototype:remove_player (player, skip_check, skip_event) +
    +
    + # + Roles._prototype:set_flag (name[, value=true]) +
    - Removes a player from this role, players can have more than one role at a time, used internally see Roles.unassign +
    + +

    Sets the state of a flag for a role, flags can be used to apply effects to players

    +

    + + Parameters: -

    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 -
    • + + + + + +
    • + + name + + : + + (string) + + the name of the flag to set the value of + +
    • + + + + + +
    • + + value + + : + + (boolean) + + the state to set the flag to + + (default: true) +
    • + +
    -

    Returns:

    -
      + - boolean - true if the player was removed successfully -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles._prototype:get_players ([online=nil]) +
    +
    + # + Roles._prototype:set_parent (role) +
    - Returns an array of all the players who have this role, can be filtered by online status +
    +

    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: -

    Parameters:

      -
    • online - boolean - when given will filter by this online state, nil will return all players - (default nil) -
    • + + + + + +
    • + + role + + : + + (string) + + the name of the role that will be the parent; has imminent effect if role is already defined + +
    • + +
    -

    Returns:

    -
      + - table - all the players who have this role, indexed order is meaningless -
    + + Returns: +
      +
    • + (Roles._prototype) + allows chaining +
    • +
    + + + + + -
    +
    - - Roles._prototype:print (message) +
    +
    + # + Roles._prototype:set_permission_group (name[, use_factorio_api=false]) +
    - Will print a message to all players with this role +
    + +

    Sets the permission group for this role, players will be moved to the group of they highest role

    +

    + + Parameters: -

    Parameters:

      -
    • message - string - the message that will be printed to the players -
    • + + + + + +
    • + + 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.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) +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.debug () +
    +
    +
    +
    + +

    Returns a string which contains all roles in index order displaying all data for them

    +

    + + + + + + Returns: +
      +
    • + (string) + the debug output string +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.get_role_by_order (index) +
    +
    +
    +
    + +

    Get a role with the given order index

    +

    + + + Parameters: + +
      + + + + + +
    • + + index + + : + + (number) + + the place in the oder list of the role to get + +
    • + + +
    + + + + + Returns: +
      +
    • + (Roles._prototype) + the role with that index in the order list or nil +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 +
    • +
    + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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 + +
    • + + +
    + + + + + + + + + + + + + +
    +
    +
    +
    + # + Roles.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) +
    • + +
    -

    Returns:

    -
      + + + + - number - the number of players who received the message -
    + + + + +
    +
    - - + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/expcore.store.html b/doc/modules/expcore.store.html index 57e11bed1d..2da3fcf528 100644 --- a/doc/modules/expcore.store.html +++ b/doc/modules/expcore.store.html @@ -1,464 +1,755 @@ - - - - - Reference + + + + + + + + expcore.store module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module expcore.store

    -

    Adds an easy way to store and watch for updates to a value + + + +

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

    expcore.store module

    +

    Adds an easy way to store and watch for updates to a value [[

    -

    - - -

    Functions

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
    Store.is_registered (location)Check for if a lcoation is registered
    Store.uid_location ()Returns a unqiue name that can be used for a store
    Store.register (location, callback[, start_value])Registers a new location with an update callback which is triggered when the value updates
    Store.register_synced (location, callback[, start_value])Registers a new cross server synced location with an update callback, and external script is required for cross server
    Store.add_watch (location, callback)Adds a function that will be checked every tick for a change in the returned value, when the value changes it will be saved in the store
    Store.get (location[, no_error=false])Gets the value stored at a location, this location must be registered
    Store.set (location, value)Sets the value at a location, this location must be registered, if server synced it will emit the change to file
    Store.get_children (location)Gets all non nil children at a location, children can be added and removed during runtime +

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

    Functions

    + + + + + + + + + + + + + + - - - - - - - - - -
    Store.clear (location[, child][, from_sync])Sets the value at a location to nil, this location must be registered
    Store.get (location[, child][, allow_unregistered=false])Gets the value stored at a location, this location must be registered
    Store.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
    Store.get_child (location, child)Gets the value of the child to a location, children can be added and removed during runtime
    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
    - -
    -
    - - -

    Functions

    - -
    +
    Store.is_registered (location)Check for if a lcoation is registered
    Store.register ([location][, synced][, callback])Registers a new location with an update callback which is triggered when the value updates
    Store.set (location[, child], value[, from_sync])Sets the value at a location, this location must be registered
    Store.uid_location ()Returns a unqiue name that can be used for a store
    + + +
    + + +

    Functions

    +
    - - Store.is_registered (location) +
    +
    + # + Store.clear (location[, child][, from_sync]) +
    - Check for if a lcoation is registered +
    + +

    Sets the value at a location to nil, this location must be registered

    +

    + + Parameters: -

    Parameters:

      -
    • location - string - the location to test for -
    • -
    -

    Returns:

    -
      - boolean - true if registered -
    +
  • -
  • -
    - - Store.uid_location () -
    -
    - Returns a unqiue name that can be used for a store + location + : + (string) -

    Returns:

    -
      + the location to set the data to - string - a unqiue name -
    + -
    -
    - - Store.register (location, callback[, start_value]) -
    -
    - 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 -
    • -
    • callback - function - this callback will be called when the stored value is set to a new value -
    • -
    • start_value - any - this value will be the inital value that is stored at this location - (optional) -
    • -
    + child + : + (string) + the child location if required + (optional) +
  • -
    -
    - - Store.register_synced (location, callback[, start_value]) -
    -
    - Registers a new cross server synced location with an update callback, and external script is required for cross server -

    Parameters:

    -
      -
    • location - string - string a unique that points to the data, string used rather than token to allow migration -
    • -
    • callback - function - this callback will be called when the stored value is set to a new value -
    • -
    • start_value - any - this value will be the inital value that is stored at this location - (optional) -
    • + + +
    • + + from_sync + + : + + (boolean) + + set this true to avoid an output to the sync file + + (optional) +
    • + +
    + + + + Returns: +
      +
    • + (boolean) + true if it was successful +
    • +
    + + + + + -
    +
    - - Store.add_watch (location, callback) +
    +
    + # + Store.get (location[, child][, allow_unregistered=false]) +
    - Adds a function that will be checked every tick for a change in the returned value, when the value changes it will be saved in the store +
    +

    Gets the value stored at a location, this location must be registered

    +

    + + + Parameters: -

    Parameters:

      -
    • location - string - the location where the data will be saved and compeared to, must already be a registered location -
    • -
    • callback - function - this function will be called every tick to check for a change in value -
    • + + + + + +
    • + + 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 +
    • +
    + + + + + -
    +
    - - Store.get (location[, no_error=false]) +
    +
    + # + Store.get_children (location) +
    - Gets the value stored at a location, this location must be registered +
    +

    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: -

    Parameters:

      -
    • location - string - the location to get the data from -
    • -
    • no_error - boolean - when true no error is returned if the location is not registered - (default false) -
    • + + + + + +
    • + + location + + : + + (string) + + the location to get the children of + +
    • + +
    -

    Returns:

    -
      + - any - the data which was stored at the location -
    + + Returns: +
      +
    • + (table) + a table containg all the children names +
    • +
    + + + + + -
    +
    - - Store.set (location, value) +
    +
    + # + Store.is_registered (location) +
    - Sets the value at a location, this location must be registered, if server synced it will emit the change to file +
    +

    Check for if a lcoation is registered

    +

    + + + Parameters: -

    Parameters:

      -
    • location - string - the location to set the data to -
    • -
    • value - any - the new value to set at the location, value may be reverted if there is a watch callback -
    • + + + + + +
    • + + location + + : + + (string) + + the location to test for + +
    • + +
    -

    Returns:

    -
      + - boolean - true if it was successful -
    + + Returns: +
      +
    • + (boolean) + true if registered +
    • +
    + + + + + -
    +
    - - Store.get_children (location) +
    +
    + # + Store.register ([location][, synced][, callback]) +
    - 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 +
    + +

    Registers a new location with an update callback which is triggered when the value updates

    +

    + + Parameters: -

    Parameters:

      -
    • location - string - the location to get the children of -
    • + + + + + +
    • + + 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:

    -
      + - table - a table containg all the children and they values -
    + + Returns: +
      +
    • + (string) + the lcoation that is being used +
    • +
    + + + + + -
    +
    - - Store.get_child (location, child) +
    +
    + # + Store.set (location[, child], value[, from_sync]) +
    - Gets the value of the child to a location, children can be added and removed during runtime +
    +

    Sets the value at a location, this location must be registered

    +

    + + + Parameters: -

    Parameters:

      -
    • location - string - the location of which the child is located -
    • -
    • child - string - the child element to get the value of -
    • + + + + + +
    • + + 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:

    -
      + - any - the value which was stored at that location -
    + + Returns: +
      +
    • + (boolean) + true if it was successful +
    • +
    + + + + + -
    +
    - - Store.set_child (location, child, value) +
    +
    + # + Store.uid_location () +
    - 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 +
    +

    Returns a unqiue name that can be used for a store

    +

    -

    Parameters:

    + + + + + Returns:
      -
    • 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 -
    • +
    • + (string) + a unqiue name +
    + -

    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 0000000000..3ad7619349 --- /dev/null +++ b/doc/modules/expcore.sudo.html @@ -0,0 +1,177 @@ + + + + + + + + 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 0000000000..496ec30afe --- /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 0000000000..70702c2a42 --- /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 0000000000..105102cd2a --- /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 0000000000..8af36bc851 --- /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 771f461137..7ec422f5dc 100644 --- a/doc/modules/modules.addons.advanced-start.html +++ b/doc/modules/modules.addons.advanced-start.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + modules.addons.advanced-start module + + + - - - -
    - -
    - -
    -
    -
    - - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.addons.advanced-start module

    +

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

    +

    + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.addons.chat-popups.html b/doc/modules/modules.addons.chat-popups.html index b7f53d3286..43d9bc8356 100644 --- a/doc/modules/modules.addons.chat-popups.html +++ b/doc/modules/modules.addons.chat-popups.html @@ -1,119 +1,177 @@ - - - - - Reference + + + + + + + + modules.addons.chat-popups module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module modules.addons.chat-popups

    -

    Creates flying text entities when a player sends a message in chat + + + +

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

    modules.addons.chat-popups module

    +

    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-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/modules.addons.damage-popups.html b/doc/modules/modules.addons.damage-popups.html index 7789ebd548..a3b0e92f2e 100644 --- a/doc/modules/modules.addons.damage-popups.html +++ b/doc/modules/modules.addons.damage-popups.html @@ -1,119 +1,177 @@ - - - - - Reference + + + + + + + + modules.addons.damage-popups module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module modules.addons.damage-popups

    -

    Displays the amount of dmg that is done by players to entities + + + +

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

    modules.addons.damage-popups module

    +

    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-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/modules.gui.player-list.html b/doc/modules/modules.gui.player-list.html index 7fc8957c75..adb53e5d82 100644 --- a/doc/modules/modules.gui.player-list.html +++ b/doc/modules/modules.gui.player-list.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + modules.gui.player-list module + + + - - - -
    - -
    - -
    -
    -
    - - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.gui.player-list module

    +

    Gui left frame define for a player list

    +

    + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.gui.rocket-info.html b/doc/modules/modules.gui.rocket-info.html index 310b86a00e..36b0593611 100644 --- a/doc/modules/modules.gui.rocket-info.html +++ b/doc/modules/modules.gui.rocket-info.html @@ -1,118 +1,226 @@ - - - - - Reference + + + + + + + + modules.gui.rocket-info module + + + - - - -
    - -
    - -
    -
    -
    - - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.gui.rocket-info module

    +

    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

    +

    + + + + + + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.gui.science-info.html b/doc/modules/modules.gui.science-info.html index 8df96f38a5..6b35c79041 100644 --- a/doc/modules/modules.gui.science-info.html +++ b/doc/modules/modules.gui.science-info.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + modules.gui.science-info module + + + - - - -
    - -
    - -
    -
    -
    - - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.gui.science-info module

    +

    Adds a science info gui that shows production usage and net for the different science packs as well as an eta

    +

    + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + diff --git a/doc/modules/modules.gui.task-list.html b/doc/modules/modules.gui.task-list.html index a14412dad1..ff536f07fb 100644 --- a/doc/modules/modules.gui.task-list.html +++ b/doc/modules/modules.gui.task-list.html @@ -1,118 +1,176 @@ - - - - - Reference + + + + + + + + modules.gui.task-list module + + + - - - -
    - -
    - -
    -
    -
    - - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    modules.gui.task-list module

    +

    Adds a task list to the game which players can add remove and edit items on

    +

    + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + diff --git a/doc/modules/utils.alien_evolution_progress.html b/doc/modules/utils.alien_evolution_progress.html index a26633eea0..debefdec37 100644 --- a/doc/modules/utils.alien_evolution_progress.html +++ b/doc/modules/utils.alien_evolution_progress.html @@ -1,158 +1,253 @@ - - - - - Reference + + + + + + + + utils.alien_evolution_progress module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.alien_evolution_progress

    -

    info + + + +

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

    utils.alien_evolution_progress module

    +

    info Original (javascript) version: https://hastebin.com/udakacavap.js Can be tested against: https://wiki.factorio.com/Enemies#Spawn_chances_by_evolution_factor

    -

    +

    -

    Functions

    - - - - - -
    AlienEvolutionProgress.create_spawner_request (total_aliens)Creates the spawner_request structure required for AlienEvolutionProgress.get_aliens for all -available spawners.
    + + -
    -
    + + + -

    Functions

    + + + +

    Functions

    + + + + + + + + +
    AlienEvolutionProgress.create_spawner_request (total_aliens)Creates the spawner_request structure required for AlienEvolutionProgress.get_aliens for all +available spawners.
    + + +
    -
    + +

    Functions

    +
    - - AlienEvolutionProgress.create_spawner_request (total_aliens) +
    +
    + # + AlienEvolutionProgress.create_spawner_request (total_aliens) +
    - Creates the spawner_request structure required for AlienEvolutionProgress.get_aliens for all -available spawners. If dividing the total spawners by the total aliens causes a fraction, the -fraction will decide a chance to spawn. 1 alien for 2 spawners will have 50% on both. +
    + +

    Creates the spawner_request structure required for AlienEvolutionProgress.get_aliens for all +available spawners.

    +

    If dividing the total spawners by the total aliens causes a fraction, the +fraction will decide a chance to spawn. 1 alien for 2 spawners will have 50% on both.

    + + Parameters: -

    Parameters:

      -
    • total_aliens - table -
    • + + + + + +
    • + + total_aliens + + : + + + table + +
    • + +
    + + + + + + + + + +
    +
    - -
    + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/utils.core.html b/doc/modules/utils.core.html index 41b857d226..4283726ed6 100644 --- a/doc/modules/utils.core.html +++ b/doc/modules/utils.core.html @@ -1,452 +1,959 @@ - - - - - Reference - - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.core

    -

    Measures distance between pos1 and pos2

    -

    - - -

    Functions

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Module.print_except (msg, player, color)Takes msg and prints it to all players except provided player
    Module.print_admins (msg, source)Prints a message to all online admins
    Module.get_actor ()Returns a valid string with the name of the actor of a command.
    Module.format_time (ticks)Takes a time in ticks and returns a string with the time in format "x hour(s) x minute(s)"
    Module.cant_run (name)Prints a message letting the player know they cannot run a command
    Module.log_command (actor, command, parameters)Logs the use of a command and its user
    Module.verify_mult_types (arg, arg_types)Asserts the argument is one of type arg_types
    Module.random_RGB ()Returns a random RGB color as a table
    Module.set_and_return (tbl, key, value)Sets a table element to value while also returning value.
    -

    Fields

    - - - - - - - - - - - - - -
    Module.move_positionMoves a position according to the parameters given - Notice: only accepts cardinal directions as direction
    Module.opposite_directionTakes a direction and gives you the opposite
    Module.is_module_availableTakes the string of a module and returns whether is it available or not
    -
    -
    + + + + + + utils.core module + + + + + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    utils.core module

    +

    Measures distance between pos1 and pos2

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Module.cant_run (name)Prints a message letting the player know they cannot run a command
    Module.format_time (ticks)Takes a time in ticks and returns a string with the time in format "x hour(s) x minute(s)"
    Module.get_actor ()Returns a valid string with the name of the actor of a command.
    Module.log_command (actor, command, parameters)Logs the use of a command and its user
    Module.print_admins (msg, source)Prints a message to all online admins
    Module.print_except (msg, player, color)Takes msg and prints it to all players except provided player
    Module.random_RGB ()Returns a random RGB color as a table
    Module.set_and_return (tbl, key, value)Sets a table element to value while also returning value.
    Module.verify_mult_types (arg, arg_types)Asserts the argument is one of type arg_types
    + + +

    Fields

    + + + + + + + + + + + + + + + + +
    Module.is_module_availableTakes the string of a module and returns whether is it available or not
    Module.move_positionMoves a position according to the parameters given + Notice: only accepts cardinal directions as direction
    Module.opposite_directionTakes a direction and gives you the opposite
    + + +
    + + +

    Functions

    +
    - - Module.print_except (msg, player, color) +
    +
    + # + Module.cant_run (name) +
    - Takes msg and prints it to all players except provided player +
    +

    Prints a message letting the player know they cannot run a command

    +

    + + + Parameters: -

    Parameters:

    - - Debug.get_meta_value (object, key) +
    +
    + # + Debug.get_meta_value (object, key) +
    - Returns the value of the key inside the object - or 'InvalidLuaObject' if the LuaObject is invalid. - or 'InvalidLuaObjectKey' if the LuaObject does not have an entry at that key +
    + +

    Returns the value of the key inside the object + or 'InvalidLuaObject' if the LuaObject is invalid.

    +

    + or 'InvalidLuaObjectKey' if the LuaObject does not have an entry at that key

    + + Parameters: -

    Parameters:

    - - Event.on_init (handler) +
    +
    + # + Event.add_removable (event_name, token) +
    - Register a handler for the script.on_init event. - This function must be called in the control stage or in Event.on_init or Event.on_load - See documentation at top of file for details on using events. +
    +

    Register a token handler that can be safely added and removed at runtime.

    +

    + Do NOT call this method during on_load. + See documentation at top of file for details on using events.

    + + + Parameters: -

    Parameters:

      -
    • handler - -
    • + + + + + +
    • + + event_name + + : + + + + +
    • + + + + + +
    • + + token + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.on_load (handler) +
    +
    + # + Event.add_removable_function (event_name, func) +
    - Register a handler for the script.on_load event. - This function must be called in the control stage or in Event.on_init or Event.on_load - See documentation at top of file for details on using events. +
    + +

    Register a handler that can be safely added and removed at runtime.

    +

    + The handler must not be a closure, as that is a desync risk. + Do NOT call this method during on_load. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • handler - -
    • + + + + + +
    • + + event_name + + : + + + + +
    • + + + + + +
    • + + func + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.on_nth_tick (tick, handler) +
    +
    + # + Event.add_removable_nth_tick (tick, token) +
    - Register a handler for the nth_tick event. - This function must be called in the control stage or in Event.on_init or Event.on_load. - See documentation at top of file for details on using events. +
    + +

    Register a token handler for the nth tick that can be safely added and removed at runtime.

    +

    + Do NOT call this method during on_load. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • tick - The handler will be called every nth tick -
    • -
    • handler - -
    • + + + + + +
    • + + tick + + : + + + + +
    • + + + + + +
    • + + token + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.add_removable (event_name, token) +
    +
    + # + Event.add_removable_nth_tick_function (tick, func) +
    - Register a token handler that can be safely added and removed at runtime. +
    + +

    Register a handler for the nth tick that can be safely added and removed at runtime.

    +

    + The handler must not be a closure, as that is a desync risk. Do NOT call this method during on_load. - See documentation at top of file for details on using events. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • event_name - -
    • -
    • token - -
    • + + + + + +
    • + + tick + + : + + + + +
    • + + + + + +
    • + + func + + : + + + + +
    • + +
    + + + + + -
    + + + +
    - - Event.remove_removable (event_name, token) +
    +
    + # + Event.on_init (handler) +
    - Removes a token handler for the given event_name. - Do NOT call this method during on_load. - See documentation at top of file for details on using events. +
    + +

    Register a handler for the script.on_init event.

    +

    + This function must be called in the control stage or in Event.on_init or Event.on_load + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • event_name - -
    • -
    • token - -
    • + + + + + +
    • + + handler + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.add_removable_function (event_name, func) +
    +
    + # + Event.on_load (handler) +
    - Register a handler that can be safely added and removed at runtime. - The handler must not be a closure, as that is a desync risk. - Do NOT call this method during on_load. - See documentation at top of file for details on using events. +
    +

    Register a handler for the script.on_load event.

    +

    + This function must be called in the control stage or in Event.on_init or Event.on_load + See documentation at top of file for details on using events.

    + + + Parameters: -

    Parameters:

      -
    • event_name - -
    • -
    • func - -
    • + + + + + +
    • + + handler + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.remove_removable_function (event_name, func) +
    +
    + # + Event.on_nth_tick (tick, handler) +
    - Removes a handler for the given event_name. - Do NOT call this method during on_load. - See documentation at top of file for details on using events. +
    + +

    Register a handler for the nth_tick event.

    +

    + This function must be called in the control stage or in Event.on_init or Event.on_load. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • event_name - -
    • -
    • func - -
    • + + + + + +
    • + + tick + + : + + + The handler will be called every nth tick + +
    • + + + + + +
    • + + handler + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.add_removable_nth_tick (tick, token) +
    +
    + # + Event.remove_removable (event_name, token) +
    - Register a token handler for the nth tick that can be safely added and removed at runtime. +
    + +

    Removes a token handler for the given event_name.

    +

    Do NOT call this method during on_load. - See documentation at top of file for details on using events. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • tick - -
    • -
    • token - -
    • + + + + + +
    • + + event_name + + : + + + + +
    • + + + + + +
    • + + token + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.remove_removable_nth_tick (tick, token) +
    +
    + # + Event.remove_removable_function (event_name, func) +
    - Removes a token handler for the nth tick. +
    + +

    Removes a handler for the given event_name.

    +

    Do NOT call this method during on_load. - See documentation at top of file for details on using events. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • tick - -
    • -
    • token - -
    • + + + + + +
    • + + event_name + + : + + + + +
    • + + + + + +
    • + + func + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.add_removable_nth_tick_function (tick, func) +
    +
    + # + Event.remove_removable_nth_tick (tick, token) +
    - Register a handler for the nth tick that can be safely added and removed at runtime. - The handler must not be a closure, as that is a desync risk. +
    + +

    Removes a token handler for the nth tick.

    +

    Do NOT call this method during on_load. - See documentation at top of file for details on using events. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • tick - -
    • -
    • func - -
    • + + + + + +
    • + + tick + + : + + + + +
    • + + + + + +
    • + + token + + : + + + + +
    • + +
    + + + + + + + + -
    +
    - - Event.remove_removable_nth_tick_function (tick, func) +
    +
    + # + Event.remove_removable_nth_tick_function (tick, func) +
    - Removes a handler for the nth tick. +
    + +

    Removes a handler for the nth tick.

    +

    Do NOT call this method during on_load. - See documentation at top of file for details on using events. + See documentation at top of file for details on using events.

    + + Parameters: -

    Parameters:

      -
    • tick - -
    • -
    • func - -
    • + + + + + +
    • + + tick + + : + + + + +
    • + + + + + +
    • + + func + + : + + + + +
    • + +
    + + + + + + + + + +
    +
    - - + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/utils.event_core.html b/doc/modules/utils.event_core.html index c0f4532235..014b67d421 100644 --- a/doc/modules/utils.event_core.html +++ b/doc/modules/utils.event_core.html @@ -1,204 +1,365 @@ - - - - - Reference + + + + + + + + utils.event_core module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.event_core

    -

    Do not use this function, use Event.add instead as it has safety checks.

    -

    - - -

    Functions

    - - - - - - - - - - - - - -
    Public.on_init (handler)Do not use this function, use Event.on_init instead as it has safety checks.
    Public.on_load (handler)Do not use this function, use Event.on_load instead as it has safety checks.
    Public.on_nth_tick (tick, handler)Do not use this function, use Event.on_nth_tick instead as it has safety checks.
    - -
    -
    - - -

    Functions

    - -
    + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    utils.event_core module

    +

    Do not use this function, use Event.add instead as it has safety checks.

    +

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

    Functions

    + + + + + + + + + + + + + + + + +
    Public.on_init (handler)Do not use this function, use Event.on_init instead as it has safety checks.
    Public.on_load (handler)Do not use this function, use Event.on_load instead as it has safety checks.
    Public.on_nth_tick (tick, handler)Do not use this function, use Event.on_nth_tick instead as it has safety checks.
    + + +
    + + +

    Functions

    +
    - - Public.on_init (handler) +
    +
    + # + Public.on_init (handler) +
    - Do not use this function, use Event.on_init instead as it has safety checks. +
    + +

    Do not use this function, use Event.on_init instead as it has safety checks.

    +

    + + Parameters: -

    Parameters:

      -
    • handler -
    • + + + + +
    • + + handler + + + + + +
    • + +
    + + + + + -
    + + + +
    - - Public.on_load (handler) +
    +
    + # + Public.on_load (handler) +
    - Do not use this function, use Event.on_load instead as it has safety checks. +
    + +

    Do not use this function, use Event.on_load instead as it has safety checks.

    +

    + + Parameters: -

    Parameters:

      -
    • handler -
    • + + + + +
    • + + handler + + + + + +
    • + +
    + + + + + -
    + + + +
    - - Public.on_nth_tick (tick, handler) +
    +
    + # + Public.on_nth_tick (tick, handler) +
    - Do not use this function, use Event.on_nth_tick instead as it has safety checks. +
    + +

    Do not use this function, use Event.on_nth_tick instead as it has safety checks.

    +

    + + Parameters: -

    Parameters:

      -
    • tick -
    • -
    • handler -
    • + + + +
    • + + tick + + + + + +
    • + + + + + +
    • + + handler + + + + + +
    • + +
    + + + + + + + + + +
    +
    - -
    + +
    +
    +
    - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    - - - + + + diff --git a/doc/modules/utils.math.html b/doc/modules/utils.math.html index 2760964b83..9344ce7af1 100644 --- a/doc/modules/utils.math.html +++ b/doc/modules/utils.math.html @@ -1,161 +1,269 @@ - - - - - Reference + + + + + + + + utils.math module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.math

    -

    Takes two points and calculates the slope of a line

    -

    - - -

    Functions

    - - - - - -
    calculate_y_intercept (x, slope)Calculates the y-intercept of a line
    - -
    -
    - - -

    Functions

    - -
    + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    utils.math module

    +

    Takes two points and calculates the slope of a line

    +

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

    Functions

    + + + + + + + + +
    calculate_y_intercept (x, slope)Calculates the y-intercept of a line
    + + +
    + + +

    Functions

    +
    - - calculate_y_intercept (x, slope) +
    +
    + # + calculate_y_intercept (x, slope) +
    - Calculates the y-intercept of a line +
    +

    Calculates the y-intercept of a line

    +

    + + + Parameters: -

    Parameters:

      -
    • x - , y numbers - coordinates of point on line -
    • -
    • slope - number - the slope of a line -
    • + + + + + +
    • + + x + + : + + + , y numbers - coordinates of point on line + +
    • + + + + + +
    • + + slope + + : + + + number - the slope of a line + +
    • + +
    -

    Returns:

    -
      + + + + Returns: +
        +
      • + number - the y-intercept of a line +
      • +
      + - number - the y-intercept of a line -
    + + + + +
    +
    - -
    + +
    +
    +
    - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    - - - + + + diff --git a/doc/modules/utils.recipe_locker.html b/doc/modules/utils.recipe_locker.html index 756989d672..8ab1a07976 100644 --- a/doc/modules/utils.recipe_locker.html +++ b/doc/modules/utils.recipe_locker.html @@ -1,155 +1,250 @@ - - - - - Reference + + + + + + + + utils.recipe_locker module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.recipe_locker

    -

    Locks recipes, preventing them from being enabled by research.

    -

    + + + +

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

    utils.recipe_locker module

    +

    Locks recipes, preventing them from being enabled by research.

    +

    Does not check if they should be enabled/disabled by existing research.

    -

    Functions

    - - - - - -
    Public.unlock_recipes (tbl)Unlocks recipes, allowing them to be enabled by research.
    + + + + + -
    -
    + + + + +

    Functions

    + + + + + + + + +
    Public.unlock_recipes (tbl)Unlocks recipes, allowing them to be enabled by research.
    + -

    Functions

    +
    -
    + +

    Functions

    +
    - - Public.unlock_recipes (tbl) +
    +
    + # + Public.unlock_recipes (tbl) +
    - Unlocks recipes, allowing them to be enabled by research. - Does not check if they should be enabled/disabled by existing research. +
    +

    Unlocks recipes, allowing them to be enabled by research.

    +

    + Does not check if they should be enabled/disabled by existing research.

    + + + Parameters: -

    Parameters:

    - - Module.in_state (self, state) +
    +
    + # + Module.machine_tick (self) +
    - Is this machine in this state? +
    + +

    Invoke a machine tick.

    +

    Will execute all in_state_callbacks of the given machine

    + + Parameters: -

    Parameters:

      -
    • self - StateMachine -
    • -
    • state - number/string -
    • + + + + + +
    • + + self + + : + + + StateMachine the machine, whose handlers will be invoked + +
    • + +
    -

    Returns:

    -
      + - boolean -
    + + + + + + -
    +
    - - Module.machine_tick (self) +
    +
    + # + Module.new (init_state) +
    - Invoke a machine tick. Will execute all in_state_callbacks of the given machine +
    +

    Constructs a new state machine

    +

    + + + Parameters: -

    Parameters:

      -
    • self - StateMachine the machine, whose handlers will be invoked -
    • + + + + + +
    • + + init_state + + : + + + number/string The starting state of the machine + +
    • + +
    + + + + Returns: +
      +
    • + StateMachine The constructed state machine object +
    • +
    + + + + + -
    +
    - - Module.register_state_tick_callback (self, state, callback) +
    +
    + # + Module.register_state_tick_callback (self, state, callback) +
    - Register a handler that will be invoked by StateMachine.machine_tick +
    + +

    Register a handler that will be invoked by StateMachine.machine_tick You may register multiple handlers for the same transition - NOTICE: This function will invoke an error if called after init. Dynamic machine changes are currently unsupported + NOTICE: This function will invoke an error if called after init.

    +

    Dynamic machine changes are currently unsupported

    + + Parameters: -

    Parameters:

      -
    • self - StateMachine the machine -
    • -
    • state - number/string The state, that the machine will be in, when callback is invoked -
    • -
    • callback - function -
    • + + + + + +
    • + + self + + : + + + StateMachine the machine + +
    • + + + + + +
    • + + state + + : + + + number/string The state, that the machine will be in, when callback is invoked + +
    • + + + + + +
    • + + callback + + : + + + function + +
    • + +
    + + + + + + + + -
    +
    - - Module.register_transition_callback (self, state, state, callback) +
    +
    + # + Module.register_transition_callback (self, state, state, callback) +
    - Register a handler that will be invoked by StateMachine.transition +
    + +

    Register a handler that will be invoked by StateMachine.transition You may register multiple handlers for the same transition - NOTICE: This function will invoke an error if called after init. Dynamic machine changes are currently unsupported + NOTICE: This function will invoke an error if called after init.

    +

    Dynamic machine changes are currently unsupported

    + + Parameters: -

    Parameters:

      -
    • self - StateMachine the machine -
    • -
    • state - number/string entering state -
    • -
    • state - number/string entering state -
    • -
    • callback - function -
    • + + + + + +
    • + + self + + : + + + StateMachine the machine + +
    • + + + + + +
    • + + state + + : + + + number/string entering state + +
    • + + + + + +
    • + + state + + : + + + number/string entering state + +
    • + + + + + +
    • + + callback + + : + + + function + +
    • + +
    + + + + + + + + -
    +
    - - Module.new (init_state) +
    +
    + # + Module.transition (self, new_state) +
    - Constructs a new state machine +
    +

    Transitions the supplied machine into a given state and executes all transaction_callbacks

    +

    + + + Parameters: -

    Parameters:

      -
    • init_state - number/string The starting state of the machine -
    • + + + + + +
    • + + self + + : + + + StateMachine + +
    • + + + + + +
    • + + new_state + + : + + + number/string The new state to transition to + +
    • + +
    -

    Returns:

    -
      + + + + - StateMachine The constructed state machine object -
    + + + + +
    +
    - -
    + +
    +
    +
    -
    -
    -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    -
    - - + + + diff --git a/doc/modules/utils.table.html b/doc/modules/utils.table.html index cfe0c528fa..40a68aeeba 100644 --- a/doc/modules/utils.table.html +++ b/doc/modules/utils.table.html @@ -1,583 +1,1271 @@ - - - - - Reference + + + + + + + + utils.table module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.table

    -

    Searches a table to remove a specific element without an index

    -

    - - -

    Functions

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    fast_remove (tbl, index)Removes an item from an array in O(1) time.
    add_all (t1, t2)Adds the contents of table t2 to table t1
    index_of (t, e)Checks if a table contains an element
    index_of_in_array (t, e)Checks if the arrayed portion of a table contains an element
    contains (t, e)Checks if a table contains an element
    array_contains (t, e)Checks if the arrayed portion of a table contains an element
    set (t, index, element)Adds an element into a specific index position while shuffling the rest down
    get_random_dictionary_entry (t, key)Chooses a random entry from a table + + + +
    +
    + + + + + + + +
    + + + + + + + + +

    utils.table module

    +

    Searches a table to remove a specific element without an index

    +

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

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - + + + + + + + + + + + + + + + - - - - - -
    add_all (t1, t2)Adds the contents of table t2 to table t1
    array_contains (t, e)Checks if the arrayed portion of a table contains an element
    clear_table (t, array)Clears all existing entries in a table
    contains (t, e)Checks if a table contains an element
    fast_remove (tbl, index)Removes an item from an array in O(1) time.
    get_random_dictionary_entry (t, key)Chooses a random entry from a table because this uses math.random, it cannot be used outside of events
    get_random_weighted (weight_table, item_index, weight_index)Chooses a random entry from a weighted table +
    get_random_weighted (weight_table, item_index, weight_index)Chooses a random entry from a weighted table because this uses math.random, it cannot be used outside of events
    shuffle_table (t)Creates a fisher-yates shuffle of a sequential number-indexed table +
    index_of (t, e)Checks if a table contains an element
    index_of_in_array (t, e)Checks if the arrayed portion of a table contains an element
    set (t, index, element)Adds an element into a specific index position while shuffling the rest down
    shuffle_table (t)Creates a fisher-yates shuffle of a sequential number-indexed table because this uses math.random, it cannot be used outside of events if no rng is supplied from: http://www.sdknews.com/cross-platform/corona/tutorial-how-to-shuffle-table-items
    clear_table (t, array)Clears all existing entries in a table
    -

    Fields

    - - - - - - - - - - - - - - - - - - - - - -
    inspectSimilar to serpent.block, returns a string with a pretty representation of a table.
    sizeTakes a table and returns the number of entries in the table.
    deep_copyCreates a deepcopy of a table.
    mergeMerges multiple tables.
    equalsDetermines if two tables are structurally equal.
    - -
    -
    - - -

    Functions

    - -
    +
    + + +

    Fields

    + + + + + + + + + + + + + + + + + + + + + + + + +
    deep_copyCreates a deepcopy of a table.
    equalsDetermines if two tables are structurally equal.
    inspectSimilar to serpent.block, returns a string with a pretty representation of a table.
    mergeMerges multiple tables.
    sizeTakes a table and returns the number of entries in the table.
    + + +
    + + +

    Functions

    +
    - - fast_remove (tbl, index) +
    +
    + # + add_all (t1, t2) +
    - Removes an item from an array in O(1) time. - The catch is that fast_remove doesn't guarantee to maintain the order of items in the array. +
    + +

    Adds the contents of table t2 to table t1

    +

    + + Parameters: -

    Parameters:

    +
    + Top +
    +
    + + + +
    + + + + -

    Functions

    + -
    +

    utils.task module

    +

    Allows you to set a timer (in ticks) after which the tokened function will be run with params given as an argument + Cannot be called before init

    +

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

    Functions

    + + + + + + + + + + + + +
    Task.queue_task (func_token, params, weight)Queueing allows you to split up heavy tasks which don't need to be completed in the same tick.
    Task.set_timeout (sec, func_token, params)Allows you to set a timer (in seconds) after which the tokened function will be run with params given as an argument + Cannot be called before init
    + + +
    + + +

    Functions

    +
    - - Task.set_timeout (sec, func_token, params) +
    +
    + # + Task.queue_task (func_token, params, weight) +
    - Allows you to set a timer (in seconds) after which the tokened function will be run with params given as an argument - Cannot be called before init +
    + +

    Queueing allows you to split up heavy tasks which don't need to be completed in the same tick.

    +

    + Queued tasks are generally run 1 per tick. If the queue backs up, more tasks will be processed per tick. + Ex. if the task is expected to repeat multiple times (ie. the function returns true and loops several ticks)

    + + Parameters: -

    Parameters:

      -
    • sec - -
    • -
    • func_token - a token for a function store via the token system -
    • -
    • params - the argument to send to the tokened function -
    • + + + + + +
    • + + func_token + + : + + + a token for a function stored via the token system + If this function returns `true` it will run again the next tick, delaying other queued tasks (see weight) + +
    • + + + + + +
    • + + params + + : + + + the argument to send to the tokened function + +
    • + + + + + +
    • + + weight + + : + + + (defaults to 1) weight is the number of ticks a task is expected to take. + +
    • + +
    + + + + + -
    + + + +
    - - Task.queue_task (func_token, params, weight) +
    +
    + # + Task.set_timeout (sec, func_token, params) +
    - Queueing allows you to split up heavy tasks which don't need to be completed in the same tick. - Queued tasks are generally run 1 per tick. If the queue backs up, more tasks will be processed per tick. - Ex. if the task is expected to repeat multiple times (ie. the function returns true and loops several ticks) +
    + +

    Allows you to set a timer (in seconds) after which the tokened function will be run with params given as an argument + Cannot be called before init

    +

    + + Parameters: -

    Parameters:

      -
    • func_token - a token for a function stored via the token system - If this function returns `true` it will run again the next tick, delaying other queued tasks (see weight) -
    • -
    • params - the argument to send to the tokened function -
    • -
    • weight - (defaults to 1) weight is the number of ticks a task is expected to take. -
    • + + + + + +
    • + + sec + + : + + + + +
    • + + + + + +
    • + + func_token + + : + + + a token for a function store via the token system + +
    • + + + + + +
    • + + params + + : + + + the argument to send to the tokened function + +
    • + +
    + + + + + + + + + +
    +
    - -
    + +
    +
    +
    - - -
    -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
    - - - + + + diff --git a/doc/modules/utils.timestamp.html b/doc/modules/utils.timestamp.html index e2b2a7817b..c8029390f2 100644 --- a/doc/modules/utils.timestamp.html +++ b/doc/modules/utils.timestamp.html @@ -1,217 +1,373 @@ - - - - - Reference + + + + + + + + utils.timestamp module + + + - - - -
    - -
    - -
    -
    -
    - - -
    - - - - - - -
    - -

    Module utils.timestamp

    -

    source https://github.com/daurnimator/luatz/blob/master/luatz/timetable.lua - edited down to just what is needed.

    -

    + + + +
    +
    + + + + + + + +
    + + -

    Functions

    + -
    + + +

    utils.timestamp module

    +

    source https://github.com/daurnimator/luatz/blob/master/luatz/timetable.lua + edited down to just what is needed.

    +

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

    Functions

    + + + + + + + + + + + + + + + + +
    Public.from_timetable (timetable)Converts timetable into unix epoch timestamp
    Public.to_string (secs)Converts unix epoch timestamp into human readable string.
    Public.to_timetable (sec)Converts unix epoch timestamp into table {year: number, month: number, day: number, hour: number, min: number, sec: number}
    + + +
    + + +

    Functions

    +
    - - Public.to_timetable (sec) +
    +
    + # + Public.from_timetable (timetable) +
    - Converts unix epoch timestamp into table {year: number, month: number, day: number, hour: number, min: number, sec: number} +
    +

    Converts timetable into unix epoch timestamp

    +

    + + + Parameters: -

    Parameters:

      -
    • sec - unix epoch timestamp -
    • + + + + + +
    • + + timetable + + : + + + {year: number, month: number, day: number, hour: number, min: number, sec: number} + + + + -

      Returns:

      -
        + - {year: number, month: number, day: number, hour: number, min: number, sec: number} -
      + + Returns: +
        +
      • + number +
      • +
      + + + + + - +
      - - Public.from_timetable (timetable) +
      +
      + # + Public.to_string (secs) +
      - Converts timetable into unix epoch timestamp +
      + +

      Converts unix epoch timestamp into human readable string.

      +

      + + Parameters: -

      Parameters:

        -
      • timetable -
      {year: number, month: number, day: number, hour: number, min: number, sec: number} - + + + + + +
    • + + secs + + : + + + unix epoch timestamp + +
    • + + -

      Returns:

      -
        + - number -
      + + Returns: +
        +
      • + string +
      • +
      + + + + + - +
      - - Public.to_string (secs) +
      +
      + # + Public.to_timetable (sec) +
      - Converts unix epoch timestamp into human readable string. +
      + +

      Converts unix epoch timestamp into table {year: number, month: number, day: number, hour: number, min: number, sec: number}

      +

      + + Parameters: -

      Parameters:

        -
      • secs - unix epoch timestamp -
      • + + + + + +
      • + + sec + + : + + + unix epoch timestamp + +
      • + +
      -

      Returns:

      -
        + + + + Returns: +
          +
        • + {year: number, month: number, day: number, hour: number, min: number, sec: number} +
        • +
        + - string -
      + + + + +
      + - - + + + + - - -
      -generated by LDoc 1.4.3 -Last updated 2019-05-29 22:30:49 -
      - - - + + + diff --git a/doc/spectre-icons.min.css b/doc/spectre-icons.min.css new file mode 100644 index 0000000000..b8de316178 --- /dev/null +++ b/doc/spectre-icons.min.css @@ -0,0 +1,568 @@ +/*! Spectre.css Icons | MIT License | github.com/picturepan2/spectre */.icon { + box-sizing:border-box; + display:inline-block; + font-size:inherit; + font-style:normal; + height:1em; + position:relative; + text-indent:-999rem; + vertical-align:middle; + width:1em +} +.icon::after, +.icon::before { + display:block; + left:50%; + position:absolute; + top:50%; + -webkit-transform:translate(-50%,-50%); + -ms-transform:translate(-50%,-50%); + transform:translate(-50%,-50%) +} +.icon-arrow-down::before, +.icon-arrow-left::before, +.icon-arrow-right::before, +.icon-arrow-up::before, +.icon-back::before, +.icon-downward::before, +.icon-forward::before, +.icon-upward::before { + border:.2rem solid currentColor; + border-bottom:0; + border-right:0; + content:""; + height:.65em; + -webkit-transform:translate(-25%,-50%) rotate(-45deg); + -ms-transform:translate(-25%,-50%) rotate(-45deg); + transform:translate(-25%,-50%) rotate(-45deg); + width:.65em +} +.icon-arrow-down, +.icon-downward { + -webkit-transform:rotate(-90deg); + -ms-transform:rotate(-90deg); + transform:rotate(-90deg) +} +.icon-arrow-right, +.icon-forward { + -webkit-transform:rotate(180deg); + -ms-transform:rotate(180deg); + transform:rotate(180deg) +} +.icon-arrow-up, +.icon-upward { + -webkit-transform:rotate(90deg); + -ms-transform:rotate(90deg); + transform:rotate(90deg) +} +.icon-back::before, +.icon-downward::before, +.icon-forward::before, +.icon-upward::before { + -webkit-transform:translate(-50%,-50%) rotate(-45deg); + -ms-transform:translate(-50%,-50%) rotate(-45deg); + transform:translate(-50%,-50%) rotate(-45deg) +} +.icon-back::after, +.icon-downward::after, +.icon-forward::after, +.icon-upward::after { + background:currentColor; + content:""; + height:.2rem; + left:55%; + width:.8em +} +.icon-caret::before { + border-left:.3em solid transparent; + border-right:.3em solid transparent; + border-top:.3em solid currentColor; + content:""; + height:0; + -webkit-transform:translate(-50%,-25%); + -ms-transform:translate(-50%,-25%); + transform:translate(-50%,-25%); + width:0 +} +.icon-menu::before { + background:currentColor; + box-shadow:0 -.35em,0 .35em; + content:""; + height:.2rem; + width:100% +} +.icon-apps::before { + background:currentColor; + box-shadow:-.35em -.35em,-.35em 0,-.35em .35em,0 -.35em,0 .35em,.35em -.35em,.35em 0,.35em .35em; + content:""; + height:.3rem; + width:.3rem +} +.icon-resize-horiz::after, +.icon-resize-horiz::before, +.icon-resize-vert::after, +.icon-resize-vert::before { + border:.2rem solid currentColor; + border-bottom:0; + border-right:0; + content:""; + height:.45em; + width:.45em +} +.icon-resize-horiz::before, +.icon-resize-vert::before { + -webkit-transform:translate(-50%,-90%) rotate(45deg); + -ms-transform:translate(-50%,-90%) rotate(45deg); + transform:translate(-50%,-90%) rotate(45deg) +} +.icon-resize-horiz::after, +.icon-resize-vert::after { + -webkit-transform:translate(-50%,-10%) rotate(225deg); + -ms-transform:translate(-50%,-10%) rotate(225deg); + transform:translate(-50%,-10%) rotate(225deg) +} +.icon-resize-horiz::before { + -webkit-transform:translate(-90%,-50%) rotate(-45deg); + -ms-transform:translate(-90%,-50%) rotate(-45deg); + transform:translate(-90%,-50%) rotate(-45deg) +} +.icon-resize-horiz::after { + -webkit-transform:translate(-10%,-50%) rotate(135deg); + -ms-transform:translate(-10%,-50%) rotate(135deg); + transform:translate(-10%,-50%) rotate(135deg) +} +.icon-more-horiz::before, +.icon-more-vert::before { + background:currentColor; + border-radius:50%; + box-shadow:-.4em 0,.4em 0; + content:""; + height:.3rem; + width:.3rem +} +.icon-more-vert::before { + box-shadow:0 -.4em,0 .4em +} +.icon-cross::before, +.icon-minus::before, +.icon-plus::before { + background:currentColor; + content:""; + height:.2rem; + width:100% +} +.icon-cross::after, +.icon-plus::after { + background:currentColor; + content:""; + height:100%; + width:.2rem +} +.icon-cross::before { + width:100% +} +.icon-cross::after { + height:100% +} +.icon-cross::after, +.icon-cross::before { + -webkit-transform:translate(-50%,-50%) rotate(45deg); + -ms-transform:translate(-50%,-50%) rotate(45deg); + transform:translate(-50%,-50%) rotate(45deg) +} +.icon-check::before { + border:.2rem solid currentColor; + border-right:0; + border-top:0; + content:""; + height:.5em; + -webkit-transform:translate(-50%,-75%) rotate(-45deg); + -ms-transform:translate(-50%,-75%) rotate(-45deg); + transform:translate(-50%,-75%) rotate(-45deg); + width:.9em +} +.icon-stop { + border:.2rem solid currentColor; + border-radius:50% +} +.icon-stop::before { + background:currentColor; + content:""; + height:.2rem; + -webkit-transform:translate(-50%,-50%) rotate(45deg); + -ms-transform:translate(-50%,-50%) rotate(45deg); + transform:translate(-50%,-50%) rotate(45deg); + width:1em +} +.icon-shutdown { + border:.2rem solid currentColor; + border-radius:50%; + border-top-color:transparent +} +.icon-shutdown::before { + background:currentColor; + content:""; + height:.5em; + top:.1em; + width:.2rem +} +.icon-refresh::before { + border:.2rem solid currentColor; + border-radius:50%; + border-right-color:transparent; + content:""; + height:1em; + width:1em +} +.icon-refresh::after { + border:.2em solid currentColor; + border-left-color:transparent; + border-top-color:transparent; + content:""; + height:0; + left:80%; + top:20%; + width:0 +} +.icon-search::before { + border:.2rem solid currentColor; + border-radius:50%; + content:""; + height:.75em; + left:5%; + top:5%; + -webkit-transform:translate(0,0) rotate(45deg); + -ms-transform:translate(0,0) rotate(45deg); + transform:translate(0,0) rotate(45deg); + width:.75em +} +.icon-search::after { + background:currentColor; + content:""; + height:.2rem; + left:80%; + top:80%; + -webkit-transform:translate(-50%,-50%) rotate(45deg); + -ms-transform:translate(-50%,-50%) rotate(45deg); + transform:translate(-50%,-50%) rotate(45deg); + width:.4em +} +.icon-edit::before { + border:.2rem solid currentColor; + content:""; + height:.4em; + -webkit-transform:translate(-40%,-60%) rotate(-45deg); + -ms-transform:translate(-40%,-60%) rotate(-45deg); + transform:translate(-40%,-60%) rotate(-45deg); + width:.85em +} +.icon-edit::after { + border:.15em solid currentColor; + border-right-color:transparent; + border-top-color:transparent; + content:""; + height:0; + left:5%; + top:95%; + -webkit-transform:translate(0,-100%); + -ms-transform:translate(0,-100%); + transform:translate(0,-100%); + width:0 +} +.icon-delete::before { + border:.2rem solid currentColor; + border-bottom-left-radius:.2rem; + border-bottom-right-radius:.2rem; + border-top:0; + content:""; + height:.75em; + top:60%; + width:.75em +} +.icon-delete::after { + background:currentColor; + box-shadow:-.25em .2em,.25em .2em; + content:""; + height:.2rem; + top:.1rem; + width:.5em +} +.icon-share { + border:.2rem solid currentColor; + border-radius:.2rem; + border-right:0; + border-top:0 +} +.icon-share::before { + border:.2rem solid currentColor; + border-left:0; + border-top:0; + content:""; + height:.4em; + left:100%; + top:.25em; + -webkit-transform:translate(-125%,-50%) rotate(-45deg); + -ms-transform:translate(-125%,-50%) rotate(-45deg); + transform:translate(-125%,-50%) rotate(-45deg); + width:.4em +} +.icon-share::after { + border:.2rem solid currentColor; + border-bottom:0; + border-radius:75% 0; + border-right:0; + content:""; + height:.5em; + width:.6em +} +.icon-flag::before { + background:currentColor; + content:""; + height:1em; + left:15%; + width:.2rem +} +.icon-flag::after { + border:.2rem solid currentColor; + border-bottom-right-radius:.2rem; + border-left:0; + border-top-right-radius:.2rem; + content:""; + height:.65em; + left:60%; + top:35%; + width:.8em +} +.icon-bookmark::before { + border:.2rem solid currentColor; + border-bottom:0; + border-top-left-radius:.2rem; + border-top-right-radius:.2rem; + content:""; + height:.9em; + width:.8em +} +.icon-bookmark::after { + border:.2rem solid currentColor; + border-bottom:0; + border-left:0; + border-radius:.2rem; + content:""; + height:.5em; + -webkit-transform:translate(-50%,35%) rotate(-45deg) skew(15deg,15deg); + -ms-transform:translate(-50%,35%) rotate(-45deg) skew(15deg,15deg); + transform:translate(-50%,35%) rotate(-45deg) skew(15deg,15deg); + width:.5em +} +.icon-download, +.icon-upload { + border-bottom:.2rem solid currentColor +} +.icon-download::before, +.icon-upload::before { + border:.2rem solid currentColor; + border-bottom:0; + border-right:0; + content:""; + height:.5em; + -webkit-transform:translate(-50%,-60%) rotate(-135deg); + -ms-transform:translate(-50%,-60%) rotate(-135deg); + transform:translate(-50%,-60%) rotate(-135deg); + width:.5em +} +.icon-download::after, +.icon-upload::after { + background:currentColor; + content:""; + height:.6em; + top:40%; + width:.2rem +} +.icon-upload::before { + -webkit-transform:translate(-50%,-60%) rotate(45deg); + -ms-transform:translate(-50%,-60%) rotate(45deg); + transform:translate(-50%,-60%) rotate(45deg) +} +.icon-upload::after { + top:50% +} +.icon-time { + border:.2rem solid currentColor; + border-radius:50% +} +.icon-time::before { + background:currentColor; + content:""; + height:.4em; + -webkit-transform:translate(-50%,-75%); + -ms-transform:translate(-50%,-75%); + transform:translate(-50%,-75%); + width:.2rem +} +.icon-time::after { + background:currentColor; + content:""; + height:.3em; + -webkit-transform:translate(-50%,-75%) rotate(90deg); + -ms-transform:translate(-50%,-75%) rotate(90deg); + transform:translate(-50%,-75%) rotate(90deg); + -webkit-transform-origin:50% 90%; + -ms-transform-origin:50% 90%; + transform-origin:50% 90%; + width:.2rem +} +.icon-mail::before { + border:.2rem solid currentColor; + border-radius:.2rem; + content:""; + height:.8em; + width:1em +} +.icon-mail::after { + border:.2rem solid currentColor; + border-right:0; + border-top:0; + content:""; + height:.5em; + -webkit-transform:translate(-50%,-90%) rotate(-45deg) skew(10deg,10deg); + -ms-transform:translate(-50%,-90%) rotate(-45deg) skew(10deg,10deg); + transform:translate(-50%,-90%) rotate(-45deg) skew(10deg,10deg); + width:.5em +} +.icon-people::before { + border:.2rem solid currentColor; + border-radius:50%; + content:""; + height:.45em; + top:25%; + width:.45em +} +.icon-people::after { + border:.2rem solid currentColor; + border-radius:50% 50% 0 0; + content:""; + height:.4em; + top:75%; + width:.9em +} +.icon-message { + border:.2rem solid currentColor; + border-bottom:0; + border-radius:.2rem; + border-right:0 +} +.icon-message::before { + border:.2rem solid currentColor; + border-bottom-right-radius:.2rem; + border-left:0; + border-top:0; + content:""; + height:.8em; + left:65%; + top:40%; + width:.7em +} +.icon-message::after { + background:currentColor; + border-radius:.2rem; + content:""; + height:.3em; + left:10%; + top:100%; + -webkit-transform:translate(0,-90%) rotate(45deg); + -ms-transform:translate(0,-90%) rotate(45deg); + transform:translate(0,-90%) rotate(45deg); + width:.2rem +} +.icon-photo { + border:.2rem solid currentColor; + border-radius:.2rem +} +.icon-photo::before { + border:.2rem solid currentColor; + border-radius:50%; + content:""; + height:.25em; + left:35%; + top:35%; + width:.25em +} +.icon-photo::after { + border:.2rem solid currentColor; + border-bottom:0; + border-left:0; + content:""; + height:.5em; + left:60%; + -webkit-transform:translate(-50%,25%) rotate(-45deg); + -ms-transform:translate(-50%,25%) rotate(-45deg); + transform:translate(-50%,25%) rotate(-45deg); + width:.5em +} +.icon-link::after, +.icon-link::before { + border:.2rem solid currentColor; + border-radius:5em 0 0 5em; + border-right:0; + content:""; + height:.5em; + width:.75em +} +.icon-link::before { + -webkit-transform:translate(-70%,-45%) rotate(-45deg); + -ms-transform:translate(-70%,-45%) rotate(-45deg); + transform:translate(-70%,-45%) rotate(-45deg) +} +.icon-link::after { + -webkit-transform:translate(-30%,-55%) rotate(135deg); + -ms-transform:translate(-30%,-55%) rotate(135deg); + transform:translate(-30%,-55%) rotate(135deg) +} +.icon-location::before { + border:.2rem solid currentColor; + border-radius:50% 50% 50% 0; + content:""; + height:.8em; + -webkit-transform:translate(-50%,-60%) rotate(-45deg); + -ms-transform:translate(-50%,-60%) rotate(-45deg); + transform:translate(-50%,-60%) rotate(-45deg); + width:.8em +} +.icon-location::after { + border:.2rem solid currentColor; + border-radius:50%; + content:""; + height:.2em; + -webkit-transform:translate(-50%,-80%); + -ms-transform:translate(-50%,-80%); + transform:translate(-50%,-80%); + width:.2em +} +.icon-emoji { + border:.2rem solid currentColor; + border-radius:50% +} +.icon-emoji::before { + border-radius:50%; + box-shadow:-.17em -.15em,.17em -.15em; + content:""; + height:.1em; + width:.1em +} +.icon-emoji::after { + border:.2rem solid currentColor; + border-bottom-color:transparent; + border-radius:50%; + border-right-color:transparent; + content:""; + height:.5em; + -webkit-transform:translate(-50%,-40%) rotate(-135deg); + -ms-transform:translate(-50%,-40%) rotate(-135deg); + transform:translate(-50%,-40%) rotate(-135deg); + width:.5em +} +.btn .icon, +.menu .icon, +.toast .icon { + vertical-align:-10% +} diff --git a/doc/spectre.min.css b/doc/spectre.min.css new file mode 100644 index 0000000000..382612aec0 --- /dev/null +++ b/doc/spectre.min.css @@ -0,0 +1,2778 @@ +/*! Spectre.css | MIT License | github.com/picturepan2/spectre */html { + font-family:sans-serif; + line-height:1.15; + -webkit-text-size-adjust:100%; + -ms-text-size-adjust:100% +} +body { + margin:0 +} +article, +aside, +footer, +header, +nav, +section { + display:block +} +h1 { + font-size:2em; + margin:.67em 0 +} +figcaption, +figure, +main { + display:block +} +hr { + box-sizing:content-box; + height:0; + overflow:visible +} +a { + background-color:transparent; + -webkit-text-decoration-skip:objects +} +a:active, +a:hover { + outline-width:0 +} +b, +strong { + font-weight:inherit +} +b, +strong { + font-weight:bolder +} +code, +kbd, +pre, +samp { + font-family:monospace,monospace; + font-size:1em +} +dfn { + font-style:italic +} +small { + font-size:80% +} +sub, +sup { + font-size:75%; + line-height:0; + position:relative; + vertical-align:baseline +} +sub { + bottom:-.25em +} +sup { + top:-.5em +} +audio, +video { + display:inline-block +} +audio:not([controls]) { + display:none; + height:0 +} +img { + border-style:none +} +svg:not(:root) { + overflow:hidden +} +button, +input, +optgroup, +select, +textarea { + font-family:inherit; + font-size:inherit; + line-height:inherit; + margin:0 +} +button, +input { + overflow:visible +} +button, +select { + text-transform:none +} +[type=reset], +[type=submit], +button, +html [type=button] { + -webkit-appearance:button +} +[type=button]::-moz-focus-inner, +[type=reset]::-moz-focus-inner, +[type=submit]::-moz-focus-inner, +button::-moz-focus-inner { + border-style:none; + padding:0 +} +fieldset { + border:0; + margin:0; + padding:0 +} +legend { + box-sizing:border-box; + color:inherit; + display:table; + max-width:100%; + padding:0; + white-space:normal +} +progress { + display:inline-block; + vertical-align:baseline +} +textarea { + overflow:auto +} +[type=checkbox], +[type=radio] { + box-sizing:border-box; + padding:0 +} +[type=number]::-webkit-inner-spin-button, +[type=number]::-webkit-outer-spin-button { + height:auto +} +[type=search] { + -webkit-appearance:textfield; + outline-offset:-2px +} +[type=search]::-webkit-search-cancel-button, +[type=search]::-webkit-search-decoration { + -webkit-appearance:none +} +::-webkit-file-upload-button { + -webkit-appearance:button; + font:inherit +} +details, +menu { + display:block +} +summary { + display:list-item +} +canvas { + display:inline-block +} +template { + display:none +} +[hidden] { + display:none +} +*, +::after, +::before { + box-sizing:inherit +} +html { + box-sizing:border-box; + font-size:10px; + line-height:1.42857143; + -webkit-tap-highlight-color:transparent +} +body { + background:#fff; + color:#50596c; + font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif; + font-size:1.4rem; + overflow-x:hidden; + text-rendering:optimizeLegibility +} +a { + color:#5764c6; + outline:0; + text-decoration:none +} +a:focus { + box-shadow:0 0 0 .2rem rgba(87,100,198,.15) +} +a.active, +a:active, +a:focus, +a:hover { + color:#3b49af; + text-decoration:underline +} +h1, +h2, +h3, +h4, +h5, +h6 { + color:inherit; + font-weight:300; + line-height:1.2; + margin-bottom:1.5rem; + margin-top:0 +} +h1 { + font-size:5rem +} +h2 { + font-size:4rem +} +h3 { + font-size:3rem +} +h4 { + font-size:2.4rem +} +h5 { + font-size:2rem +} +h6 { + font-size:1.6rem +} +p { + line-height:2.4rem; + margin:0 0 1rem +} +a, +ins, +u { + -webkit-text-decoration-skip:ink edges; + text-decoration-skip:ink edges +} +blockquote { + border-left:.2rem solid #f0f1f4; + margin-left:0; + padding:1rem 2rem +} +blockquote p:last-child { + margin-bottom:0 +} +blockquote cite { + color:#acb3c2 +} +ol, +ul { + margin:2rem 0 2rem 2rem; + padding:0 +} +ol ol, +ol ul, +ul ol, +ul ul { + margin:1.5rem 0 1.5rem 2rem +} +ol li, +ul li { + margin-top:1rem +} +ul { + list-style:disc inside +} +ul ul { + list-style-type:circle +} +ol { + list-style:decimal inside +} +ol ol { + list-style-type:lower-alpha +} +dl dt { + font-weight:700 +} +dl dd { + margin:.5rem 0 1.5rem 0 +} +mark { + background:#ffe9b3; + border-radius:.2rem; + color:#50596c; + display:inline-block; + line-height:1; + padding:.3rem .4rem; + vertical-align:baseline +} +kbd { + background:#454d5d; + border-radius:.2rem; + color:#fff; + display:inline-block; + line-height:1; + padding:.3rem .4rem; + vertical-align:baseline +} +abbr[title] { + border-bottom:.1rem dotted; + cursor:help; + text-decoration:none +} +.cjk, +:lang(ja), +:lang(ko), +:lang(zh) { + font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Hiragino Kaku Gothic Pro",Meiryo,"Malgun Gothic","Helvetica Neue",sans-serif +} +.cjk ins, +.cjk u, +:lang(ja) ins, +:lang(ja) u, +:lang(zh) ins, +:lang(zh) u { + border-bottom:.1rem solid; + text-decoration:none +} +.cjk del+del, +.cjk del+s, +.cjk ins+ins, +.cjk ins+u, +.cjk s+del, +.cjk s+s, +.cjk u+ins, +.cjk u+u, +:lang(ja) del+del, +:lang(ja) del+s, +:lang(ja) ins+ins, +:lang(ja) ins+u, +:lang(ja) s+del, +:lang(ja) s+s, +:lang(ja) u+ins, +:lang(ja) u+u, +:lang(zh) del+del, +:lang(zh) del+s, +:lang(zh) ins+ins, +:lang(zh) ins+u, +:lang(zh) s+del, +:lang(zh) s+s, +:lang(zh) u+ins, +:lang(zh) u+u { + margin-left:.125em +} +.table { + border-collapse:collapse; + border-spacing:0; + text-align:left; + width:100% +} +.table.table-striped tbody tr:nth-of-type(odd) { + background:#f8f9fa +} +.table.table-hover tbody tr:hover { + background:#f0f1f4 +} +.table tbody tr.active, +.table.table-striped tbody tr.active { + background:#f0f1f4 +} +.table td { + border-bottom:.1rem solid #f0f1f4; + padding:1.5rem 1rem +} +.table th { + border-bottom:.1rem solid #727e96; + padding:1.5rem 1rem +} +.btn { + -webkit-appearance:none; + -moz-appearance:none; + appearance:none; + background:#fff; + border:.1rem solid #5764c6; + border-radius:.2rem; + color:#5764c6; + cursor:pointer; + display:inline-block; + font-size:1.4rem; + height:3.2rem; + line-height:2rem; + outline:0; + padding:.5rem .8rem; + text-align:center; + text-decoration:none; + transition:all .2s ease; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; + vertical-align:middle; + white-space:nowrap +} +.btn:focus { + background:#fbfbfe; + box-shadow:0 0 0 .2rem rgba(87,100,198,.15); + text-decoration:none +} +.btn:hover { + background:#5764c6; + border-color:#4c59c2; + color:#fff; + text-decoration:none +} +.btn.active, +.btn:active { + background:#4c59c2; + border-color:#3e4cb6; + color:#fff; + text-decoration:none +} +.btn.disabled, +.btn:disabled, +.btn[disabled] { + cursor:default; + opacity:.5; + pointer-events:none +} +.btn.btn-primary { + background:#5764c6; + border-color:#4c59c2; + color:#fff +} +.btn.btn-primary:focus, +.btn.btn-primary:hover { + background:#4452c0; + border-color:#3e4cb6; + color:#fff +} +.btn.btn-primary.active, +.btn.btn-primary:active { + background:#3f4eba; + border-color:#3b49af; + color:#fff +} +.btn.btn-primary.loading::after { + border-bottom-color:#fff; + border-left-color:#fff +} +.btn.btn-link { + background:0 0; + border-color:transparent; + color:#5764c6 +} +.btn.btn-link.active, +.btn.btn-link:active, +.btn.btn-link:focus, +.btn.btn-link:hover { + color:#3b49af +} +.btn.btn-sm { + font-size:1.2rem; + height:2.4rem; + padding:.1rem .8rem +} +.btn.btn-lg { + font-size:1.6rem; + height:4rem; + padding:.9rem .8rem +} +.btn.btn-block { + display:block; + width:100% +} +.btn.btn-action { + padding-left:0; + padding-right:0; + width:3.2rem +} +.btn.btn-action.btn-sm { + width:2.4rem +} +.btn.btn-action.btn-lg { + width:4rem +} +.btn.btn-clear { + background:0 0; + border:0; + color:currentColor; + height:1.6rem; + line-height:1.6rem; + margin-left:.4rem; + margin-right:-.2rem; + opacity:.45; + padding:0 .2rem; + text-decoration:none; + width:1.6rem +} +.btn.btn-clear:hover { + opacity:.85 +} +.btn.btn-clear::before { + content:"\2715" +} +.btn-group { + display:inline-flex; + display:-ms-inline-flexbox; + display:-webkit-inline-flex; + -webkit-flex-wrap:wrap; + -ms-flex-wrap:wrap; + flex-wrap:wrap +} +.btn-group .btn { + -webkit-flex:1 0 auto; + -ms-flex:1 0 auto; + flex:1 0 auto +} +.btn-group .btn:first-child:not(:last-child) { + border-bottom-right-radius:0; + border-top-right-radius:0 +} +.btn-group .btn:not(:first-child):not(:last-child) { + border-radius:0; + margin-left:-.1rem +} +.btn-group .btn:last-child:not(:first-child) { + border-bottom-left-radius:0; + border-top-left-radius:0; + margin-left:-.1rem +} +.btn-group .btn.active, +.btn-group .btn:active, +.btn-group .btn:focus, +.btn-group .btn:hover { + z-index:1 +} +.btn-group.btn-group-block { + display:flex; + display:-ms-flexbox; + display:-webkit-flex +} +.btn-group.btn-group-block .btn { + -webkit-flex:1 0 0; + -ms-flex:1 0 0; + flex:1 0 0 +} +.form-group:not(:last-child) { + margin-bottom:1rem +} +.form-label { + display:block; + padding:.6rem 0 +} +.form-label.label-sm { + padding:.2rem 0 +} +.form-label.label-lg { + padding:1rem 0 +} +.form-input { + -webkit-appearance:none; + -moz-appearance:none; + appearance:none; + background:#fff; + background-image:none; + border:.1rem solid #c4c9d3; + border-radius:.2rem; + color:#50596c; + display:block; + font-size:1.4rem; + height:3.2rem; + line-height:2rem; + max-width:100%; + outline:0; + padding:.5rem .8rem; + position:relative; + transition:all .2s ease; + width:100% +} +.form-input:focus { + border-color:#5764c6; + box-shadow:0 0 0 .2rem rgba(87,100,198,.15) +} +.form-input::-webkit-input-placeholder { + color:#acb3c2 +} +.form-input::-moz-placeholder { + color:#acb3c2 +} +.form-input:-ms-input-placeholder { + color:#acb3c2 +} +.form-input::placeholder { + color:#acb3c2 +} +.form-input.input-sm { + font-size:1.2rem; + height:2.4rem; + padding:.1rem .8rem +} +.form-input.input-lg { + font-size:1.6rem; + height:4rem; + padding:.9rem .8rem +} +.form-input.input-inline { + display:inline-block; + vertical-align:middle; + width:auto +} +textarea.form-input { + height:auto +} +.form-input[type=file] { + height:auto +} +.form-input-hint { + color:#acb3c2; + margin-top:.4rem +} +.has-success .form-input-hint, +.is-success+.form-input-hint { + color:#32b643 +} +.has-error .form-input-hint, +.is-error+.form-input-hint { + color:#e85600 +} +.form-select { + -webkit-appearance:none; + -moz-appearance:none; + appearance:none; + border:.1rem solid #c4c9d3; + border-radius:.2rem; + color:inherit; + font-size:1.4rem; + line-height:2rem; + outline:0; + padding:.5rem .8rem; + vertical-align:middle; + width:100% +} +.form-select[multiple] option { + padding:.2rem .4rem +} +.form-select:not([multiple]) { + background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23667189' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center/.8rem 1rem; + height:3.2rem; + padding-right:2.4rem +} +.form-select:focus { + border-color:#5764c6; + box-shadow:0 0 0 .2rem rgba(87,100,198,.15) +} +.form-select::-ms-expand { + display:none +} +.form-select.select-sm { + font-size:1.2rem; + height:2.4rem; + padding:.1rem 2rem .1rem .6rem +} +.form-select.select-lg { + font-size:1.6rem; + height:4rem; + padding:.9rem 2.4rem .9rem .8rem +} +.form-input.is-success, +.form-select.is-success, +.has-success .form-input, +.has-success .form-select { + border-color:#32b643 +} +.form-input.is-success:focus, +.form-select.is-success:focus, +.has-success .form-input:focus, +.has-success .form-select:focus { + box-shadow:0 0 0 .2rem rgba(50,182,67,.15) +} +.form-input.is-error, +.form-select.is-error, +.has-error .form-input, +.has-error .form-select { + border-color:#e85600 +} +.form-input.is-error:focus, +.form-select.is-error:focus, +.has-error .form-input:focus, +.has-error .form-select:focus { + box-shadow:0 0 0 .2rem rgba(232,86,0,.15) +} +.form-input:not(:placeholder-shown):invalid { + border-color:#e85600 +} +.form-input:not(:placeholder-shown):invalid:focus { + box-shadow:0 0 0 .2rem rgba(232,86,0,.15) +} +.form-input:not(:placeholder-shown):invalid+.form-input-hint { + color:#e85600 +} +.has-icon-left, +.has-icon-right { + position:relative +} +.has-icon-left .form-icon, +.has-icon-right .form-icon { + margin:0 .8rem; + min-width:1.4rem; + position:absolute; + top:50%; + -webkit-transform:translateY(-50%); + -ms-transform:translateY(-50%); + transform:translateY(-50%) +} +.has-icon-left .form-icon { + left:0 +} +.has-icon-left .form-input { + padding-left:3rem +} +.has-icon-right .form-icon { + right:0 +} +.has-icon-right .form-input { + padding-right:3rem +} +.form-checkbox, +.form-radio, +.form-switch { + display:inline-block; + line-height:2rem; + position:relative +} +.form-checkbox input, +.form-radio input, +.form-switch input { + clip:rect(0,0,0,0); + height:.1rem; + margin:-.1rem; + overflow:hidden; + position:absolute; + width:.1rem +} +.form-checkbox input:focus+.form-icon, +.form-radio input:focus+.form-icon, +.form-switch input:focus+.form-icon { + border-color:#5764c6; + box-shadow:0 0 0 .2rem rgba(87,100,198,.15) +} +.form-checkbox input:checked+.form-icon, +.form-radio input:checked+.form-icon, +.form-switch input:checked+.form-icon { + background:#5764c6; + border-color:#5764c6 +} +.form-checkbox .form-icon, +.form-radio .form-icon, +.form-switch .form-icon { + border:.1rem solid #c4c9d3; + cursor:pointer; + display:inline-block; + position:absolute; + transition:all .2s ease +} +.form-checkbox, +.form-radio { + padding:.2rem 2rem +} +.form-checkbox .form-icon, +.form-radio .form-icon { + background:#fff; + height:1.4rem; + left:0; + top:.5rem; + width:1.4rem +} +.form-checkbox input:active+.form-icon, +.form-radio input:active+.form-icon { + background:#f0f1f4 +} +.form-checkbox .form-icon { + border-radius:.2rem +} +.form-checkbox input:checked+.form-icon::before { + background-clip:padding-box; + border:.2rem solid #fff; + border-left-width:0; + border-top-width:0; + content:""; + height:1rem; + left:50%; + margin-left:-.3rem; + margin-top:-.6rem; + position:absolute; + top:50%; + -webkit-transform:rotate(45deg); + -ms-transform:rotate(45deg); + transform:rotate(45deg); + width:.6rem +} +.form-checkbox input:indeterminate+.form-icon { + background:#5764c6; + border-color:#5764c6 +} +.form-checkbox input:indeterminate+.form-icon::before { + background:#fff; + content:""; + height:.2rem; + left:50%; + margin-left:-.5rem; + margin-top:-.1rem; + position:absolute; + top:50%; + width:1rem +} +.form-radio .form-icon { + border-radius:.7rem +} +.form-radio input:checked+.form-icon::before { + background:#fff; + border-radius:.2rem; + content:""; + height:.4rem; + left:50%; + margin-left:-.2rem; + margin-top:-.2rem; + position:absolute; + top:50%; + width:.4rem +} +.form-switch { + padding:.2rem 2rem .2rem 3.6rem +} +.form-switch .form-icon { + background:#e7e9ed; + background-clip:padding-box; + border-radius:.9rem; + height:1.8rem; + left:0; + top:.3rem; + width:3rem +} +.form-switch .form-icon::before { + background:#fff; + border-radius:.8rem; + content:""; + display:block; + height:1.6rem; + left:0; + position:absolute; + top:0; + transition:all .2s ease; + width:1.6rem +} +.form-switch input:checked+.form-icon::before { + left:1.2rem +} +.form-switch input:active+.form-icon::before { + background:#f8f9fa +} +.input-group { + display:flex; + display:-ms-flexbox; + display:-webkit-flex +} +.input-group .input-group-addon { + background:#f8f9fa; + border:.1rem solid #c4c9d3; + border-radius:.2rem; + line-height:2rem; + padding:.5rem .8rem +} +.input-group .input-group-addon.addon-sm { + font-size:1.2rem; + padding:.1rem .8rem +} +.input-group .input-group-addon.addon-lg { + font-size:1.6rem; + padding:.9rem .8rem +} +.input-group .input-group-addon, +.input-group .input-group-btn { + -webkit-flex:1 0 auto; + -ms-flex:1 0 auto; + flex:1 0 auto +} +.input-group .form-input:first-child:not(:last-child), +.input-group .form-select:first-child:not(:last-child), +.input-group .input-group-addon:first-child:not(:last-child), +.input-group .input-group-btn:first-child:not(:last-child) { + border-bottom-right-radius:0; + border-top-right-radius:0 +} +.input-group .form-input:not(:first-child):not(:last-child), +.input-group .form-select:not(:first-child):not(:last-child), +.input-group .input-group-addon:not(:first-child):not(:last-child), +.input-group .input-group-btn:not(:first-child):not(:last-child) { + border-radius:0; + margin-left:-.1rem +} +.input-group .form-input:last-child:not(:first-child), +.input-group .form-select:last-child:not(:first-child), +.input-group .input-group-addon:last-child:not(:first-child), +.input-group .input-group-btn:last-child:not(:first-child) { + border-bottom-left-radius:0; + border-top-left-radius:0; + margin-left:-.1rem +} +.input-group .form-input:focus, +.input-group .form-select:focus, +.input-group .input-group-addon:focus, +.input-group .input-group-btn:focus { + z-index:1 +} +.input-group .form-select { + width:auto +} +.input-group.input-inline { + display:inline-flex; + display:-ms-inline-flexbox; + display:-webkit-inline-flex +} +.form-input.disabled, +.form-input:disabled, +.form-select.disabled, +.form-select:disabled { + background-color:#f0f1f4; + cursor:not-allowed; + opacity:.5 +} +.form-input[readonly] { + background-color:#f8f9fa +} +input.disabled+.form-icon, +input:disabled+.form-icon { + background:#f0f1f4; + cursor:not-allowed; + opacity:.5 +} +.form-switch input.disabled+.form-icon::before, +.form-switch input:disabled+.form-icon::before { + background:#fff +} +.form-horizontal { + padding:1rem +} +.form-horizontal .form-group { + display:flex; + display:-ms-flexbox; + display:-webkit-flex +} +.form-horizontal .form-checkbox, +.form-horizontal .form-radio, +.form-horizontal .form-switch { + margin:.4rem 0 +} +.label { + background:#f8f9fa; + border-radius:.2rem; + color:#5b657a; + display:inline-block; + line-height:1; + padding:.3rem .4rem; + vertical-align:baseline +} +.label.label-primary { + background:#5764c6; + color:#fff +} +.label.label-success { + background:#32b643; + color:#fff +} +.label.label-warning { + background:#ffb700; + color:#fff +} +.label.label-error { + background:#e85600; + color:#fff +} +code { + background:#fdf4f4; + border-radius:.2rem; + color:#e06870; + display:inline-block; + line-height:1; + padding:.3rem .4rem; + vertical-align:baseline +} +.code { + border-radius:.2rem; + color:#50596c; + line-height:2rem; + position:relative +} +.code::before { + color:#acb3c2; + content:attr(data-lang); + font-size:1.2rem; + position:absolute; + right:1rem; + top:.2rem +} +.code code { + background:#f8f9fa; + color:inherit; + display:block; + line-height:inherit; + overflow-x:auto; + padding:2rem; + width:100% +} +.img-responsive { + display:block; + height:auto; + max-width:100% +} +.img-fit-cover { + object-fit:cover +} +.img-fit-contain { + object-fit:contain +} +.video-responsive { + display:block; + overflow:hidden; + padding:0; + position:relative; + width:100% +} +.video-responsive::before { + content:""; + display:block; + padding-bottom:56.25% +} +.video-responsive embed, +.video-responsive iframe, +.video-responsive object { + bottom:0; + height:100%; + left:0; + position:absolute; + right:0; + top:0; + width:100% +} +.video-responsive video { + height:auto; + max-width:100%; + width:100% +} +.video-responsive-4-3::before { + padding-bottom:75% +} +.video-responsive-1-1::before { + padding-bottom:100% +} +.figure { + margin:0 0 1rem 0 +} +.figure .figure-caption { + color:#727e96; + margin-top:1rem +} +.container { + margin-left:auto; + margin-right:auto; + padding-left:1rem; + padding-right:1rem; + width:100% +} +.container.grid-1280 { + max-width:130rem +} +.container.grid-960 { + max-width:98rem +} +.container.grid-480 { + max-width:50rem +} +.columns { + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex-wrap:wrap; + -ms-flex-wrap:wrap; + flex-wrap:wrap; + margin-left:-1rem; + margin-right:-1rem +} +.columns.col-gapless { + margin-left:0; + margin-right:0 +} +.columns.col-gapless .column { + padding-left:0; + padding-right:0 +} +.columns.col-oneline { + -webkit-flex-wrap:nowrap; + -ms-flex-wrap:nowrap; + flex-wrap:nowrap; + overflow-x:auto +} +.column { + -webkit-flex:1; + -ms-flex:1; + flex:1; + max-width:100%; + padding:1rem +} +.column.col-1, +.column.col-10, +.column.col-11, +.column.col-12, +.column.col-2, +.column.col-3, +.column.col-4, +.column.col-5, +.column.col-6, +.column.col-7, +.column.col-8, +.column.col-9 { + -webkit-flex:none; + -ms-flex:none; + flex:none +} +.col-12 { + width:100% +} +.col-11 { + width:91.66666667% +} +.col-10 { + width:83.33333333% +} +.col-9 { + width:75% +} +.col-8 { + width:66.66666667% +} +.col-7 { + width:58.33333333% +} +.col-6 { + width:50% +} +.col-5 { + width:41.66666667% +} +.col-4 { + width:33.33333333% +} +.col-3 { + width:25% +} +.col-2 { + width:16.66666667% +} +.col-1 { + width:8.33333333% +} +@media screen and (max-width:1280px) { + .col-xl-1, + .col-xl-10, + .col-xl-11, + .col-xl-12, + .col-xl-2, + .col-xl-3, + .col-xl-4, + .col-xl-5, + .col-xl-6, + .col-xl-7, + .col-xl-8, + .col-xl-9 { + -webkit-flex:none; + -ms-flex:none; + flex:none + } + .col-xl-12 { + width:100% + } + .col-xl-11 { + width:91.66666667% + } + .col-xl-10 { + width:83.33333333% + } + .col-xl-9 { + width:75% + } + .col-xl-8 { + width:66.66666667% + } + .col-xl-7 { + width:58.33333333% + } + .col-xl-6 { + width:50% + } + .col-xl-5 { + width:41.66666667% + } + .col-xl-4 { + width:33.33333333% + } + .col-xl-3 { + width:25% + } + .col-xl-2 { + width:16.66666667% + } + .col-xl-1 { + width:8.33333333% + } +} +@media screen and (max-width:960px) { + .col-lg-1, + .col-lg-10, + .col-lg-11, + .col-lg-12, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9 { + -webkit-flex:none; + -ms-flex:none; + flex:none + } + .col-lg-12 { + width:100% + } + .col-lg-11 { + width:91.66666667% + } + .col-lg-10 { + width:83.33333333% + } + .col-lg-9 { + width:75% + } + .col-lg-8 { + width:66.66666667% + } + .col-lg-7 { + width:58.33333333% + } + .col-lg-6 { + width:50% + } + .col-lg-5 { + width:41.66666667% + } + .col-lg-4 { + width:33.33333333% + } + .col-lg-3 { + width:25% + } + .col-lg-2 { + width:16.66666667% + } + .col-lg-1 { + width:8.33333333% + } +} +@media screen and (max-width:840px) { + .col-md-1, + .col-md-10, + .col-md-11, + .col-md-12, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9 { + -webkit-flex:none; + -ms-flex:none; + flex:none + } + .col-md-12 { + width:100% + } + .col-md-11 { + width:91.66666667% + } + .col-md-10 { + width:83.33333333% + } + .col-md-9 { + width:75% + } + .col-md-8 { + width:66.66666667% + } + .col-md-7 { + width:58.33333333% + } + .col-md-6 { + width:50% + } + .col-md-5 { + width:41.66666667% + } + .col-md-4 { + width:33.33333333% + } + .col-md-3 { + width:25% + } + .col-md-2 { + width:16.66666667% + } + .col-md-1 { + width:8.33333333% + } +} +@media screen and (max-width:600px) { + .col-sm-1, + .col-sm-10, + .col-sm-11, + .col-sm-12, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9 { + -webkit-flex:none; + -ms-flex:none; + flex:none + } + .col-sm-12 { + width:100% + } + .col-sm-11 { + width:91.66666667% + } + .col-sm-10 { + width:83.33333333% + } + .col-sm-9 { + width:75% + } + .col-sm-8 { + width:66.66666667% + } + .col-sm-7 { + width:58.33333333% + } + .col-sm-6 { + width:50% + } + .col-sm-5 { + width:41.66666667% + } + .col-sm-4 { + width:33.33333333% + } + .col-sm-3 { + width:25% + } + .col-sm-2 { + width:16.66666667% + } + .col-sm-1 { + width:8.33333333% + } +} +@media screen and (max-width:480px) { + .col-xs-1, + .col-xs-10, + .col-xs-11, + .col-xs-12, + .col-xs-2, + .col-xs-3, + .col-xs-4, + .col-xs-5, + .col-xs-6, + .col-xs-7, + .col-xs-8, + .col-xs-9 { + -webkit-flex:none; + -ms-flex:none; + flex:none + } + .col-xs-12 { + width:100% + } + .col-xs-11 { + width:91.66666667% + } + .col-xs-10 { + width:83.33333333% + } + .col-xs-9 { + width:75% + } + .col-xs-8 { + width:66.66666667% + } + .col-xs-7 { + width:58.33333333% + } + .col-xs-6 { + width:50% + } + .col-xs-5 { + width:41.66666667% + } + .col-xs-4 { + width:33.33333333% + } + .col-xs-3 { + width:25% + } + .col-xs-2 { + width:16.66666667% + } + .col-xs-1 { + width:8.33333333% + } +} +.show-lg, +.show-md, +.show-sm, +.show-xl, +.show-xs { + display:none!important +} +@media screen and (max-width:480px) { + .hide-xs { + display:none!important + } + .show-xs { + display:block!important + } +} +@media screen and (max-width:600px) { + .hide-sm { + display:none!important + } + .show-sm { + display:block!important + } +} +@media screen and (max-width:840px) { + .hide-md { + display:none!important + } + .show-md { + display:block!important + } +} +@media screen and (max-width:960px) { + .hide-lg { + display:none!important + } + .show-lg { + display:block!important + } +} +@media screen and (max-width:1280px) { + .hide-xl { + display:none!important + } + .show-xl { + display:block!important + } +} +.navbar { + -webkit-align-items:stretch; + align-items:stretch; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -ms-flex-align:stretch; + -ms-flex-pack:justify; + -webkit-flex-wrap:wrap; + -ms-flex-wrap:wrap; + flex-wrap:wrap; + -webkit-justify-content:space-between; + justify-content:space-between +} +.navbar .navbar-section { + -webkit-align-items:center; + align-items:center; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex:1 0 0; + -ms-flex:1 0 0; + flex:1 0 0; + -ms-flex-align:center +} +.navbar .navbar-section:last-child { + -ms-flex-pack:end; + -webkit-justify-content:flex-end; + justify-content:flex-end +} +.navbar .navbar-center { + -webkit-align-items:center; + align-items:center; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex:0 0 auto; + -ms-flex:0 0 auto; + flex:0 0 auto; + -ms-flex-align:center +} +.navbar .navbar-brand { + font-size:1.6rem; + font-weight:500; + text-decoration:none +} +.panel { + border:.1rem solid #f0f1f4; + border-radius:.2rem; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex-direction:column; + -ms-flex-direction:column; + flex-direction:column +} +.panel .panel-footer, +.panel .panel-header { + -webkit-flex:0 0 auto; + -ms-flex:0 0 auto; + flex:0 0 auto; + padding:1.5rem +} +.panel .panel-nav { + -webkit-flex:0 0 auto; + -ms-flex:0 0 auto; + flex:0 0 auto +} +.panel .panel-body { + -webkit-flex:1 1 auto; + -ms-flex:1 1 auto; + flex:1 1 auto; + overflow-y:auto; + padding:0 1.5rem +} +.panel .panel-title { + font-size:2rem +} +.panel .panel-subtitle { + color:#bbc1cd +} +.empty { + background:#f8f9fa; + border-radius:.2rem; + color:#727e96; + padding:4rem; + text-align:center +} +.empty .empty-subtitle, +.empty .empty-title { + margin:1rem auto +} +.empty .empty-subtitle { + color:#bbc1cd +} +.empty .empty-action { + margin-top:1.5rem +} +.form-autocomplete { + position:relative +} +.form-autocomplete .form-autocomplete-input { + -webkit-align-content:flex-start; + align-content:flex-start; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -ms-flex-line-pack:start; + -webkit-flex-wrap:wrap; + -ms-flex-wrap:wrap; + flex-wrap:wrap; + height:auto; + min-height:3.2rem; + padding:.1rem 0 0 .1rem +} +.form-autocomplete .form-autocomplete-input.is-focused { + border-color:#5764c6; + box-shadow:0 0 0 .2rem rgba(87,100,198,.15) +} +.form-autocomplete .form-autocomplete-input .form-input { + border-color:transparent; + box-shadow:none; + display:inline-block; + -webkit-flex:1 0 auto; + -ms-flex:1 0 auto; + flex:1 0 auto; + height:2.8rem; + padding:.3rem .8rem; + width:auto +} +.form-autocomplete mark { + font-size:1; + padding:.1em 0 +} +.form-autocomplete .menu { + left:0; + position:absolute; + top:100%; + width:100% +} +.avatar { + background:#5764c6; + border-radius:50%; + color:rgba(255,255,255,.85); + display:inline-block; + font-size:1.4rem; + font-weight:300; + height:3.2rem; + line-height:1; + margin:0; + position:relative; + vertical-align:middle; + width:3.2rem +} +.avatar.avatar-xs { + font-size:.8rem; + height:1.6rem; + width:1.6rem +} +.avatar.avatar-sm { + font-size:1rem; + height:2.4rem; + width:2.4rem +} +.avatar.avatar-lg { + font-size:2rem; + height:4.8rem; + width:4.8rem +} +.avatar.avatar-xl { + font-size:2.6rem; + height:6.4rem; + width:6.4rem +} +.avatar img { + border-radius:50%; + height:100%; + position:relative; + width:100%; + z-index:100 +} +.avatar .avatar-icon { + background:#fff; + bottom:14.64%; + height:50%; + padding:.2rem; + position:absolute; + right:14.64%; + -webkit-transform:translate(50%,50%); + -ms-transform:translate(50%,50%); + transform:translate(50%,50%); + width:50% +} +.avatar[data-initial]::before { + color:currentColor; + content:attr(data-initial); + left:50%; + position:absolute; + top:50%; + -webkit-transform:translate(-50%,-50%); + -ms-transform:translate(-50%,-50%); + transform:translate(-50%,-50%); + z-index:1 +} +.badge { + position:relative; + white-space:nowrap +} +.badge:not([data-badge])::after, +.badge[data-badge]::after { + background:#5764c6; + background-clip:padding-box; + border-radius:1rem; + box-shadow:0 0 0 .2rem #fff; + color:#fff; + content:attr(data-badge); + display:inline-block; + -webkit-transform:translate(-.2rem,-1rem); + -ms-transform:translate(-.2rem,-1rem); + transform:translate(-.2rem,-1rem) +} +.badge[data-badge]::after { + font-size:1.2rem; + height:1.8rem; + line-height:1; + min-width:1.8rem; + padding:.3rem .5rem; + text-align:center; + white-space:nowrap +} +.badge:not([data-badge])::after, +.badge[data-badge=""]::after { + height:.6rem; + min-width:.6rem; + padding:0; + width:.6rem +} +.badge.btn::after { + position:absolute; + right:0; + top:0; + -webkit-transform:translate(50%,-50%); + -ms-transform:translate(50%,-50%); + transform:translate(50%,-50%) +} +.badge.avatar::after { + position:absolute; + right:14.64%; + top:14.64%; + -webkit-transform:translate(50%,-50%); + -ms-transform:translate(50%,-50%); + transform:translate(50%,-50%); + z-index:100 +} +.badge.avatar-xs::after { + content:""; + height:.8rem; + min-width:.8rem; + padding:0; + width:.8rem +} +.bar { + background:#f0f1f4; + border-radius:.2rem; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex-wrap:nowrap; + -ms-flex-wrap:nowrap; + flex-wrap:nowrap; + height:1.6rem; + width:100% +} +.bar.bar-sm { + height:.4rem +} +.bar .bar-item { + background:#5764c6; + color:#fff; + display:block; + -ms-flex-negative:0; + -webkit-flex-shrink:0; + flex-shrink:0; + font-size:1.2rem; + height:100%; + line-height:1; + padding:.2rem 0; + position:relative; + text-align:center; + width:0 +} +.bar .bar-item:first-child { + border-bottom-left-radius:.2rem; + border-top-left-radius:.2rem +} +.bar .bar-item:last-child { + border-bottom-right-radius:.2rem; + border-top-right-radius:.2rem; + -ms-flex-negative:1; + -webkit-flex-shrink:1; + flex-shrink:1 +} +.bar-slider { + height:.2rem; + margin:1rem 0; + position:relative +} +.bar-slider .bar-item { + left:0; + padding:0; + position:absolute +} +.bar-slider .bar-item:not(:last-child):first-child { + background:#f0f1f4; + z-index:1 +} +.bar-slider .bar-slider-btn { + background:#5764c6; + border:0; + border-radius:50%; + height:1.2rem; + padding:0; + position:absolute; + right:0; + top:50%; + -webkit-transform:translate(50%,-50%); + -ms-transform:translate(50%,-50%); + transform:translate(50%,-50%); + width:1.2rem +} +.bar-slider .bar-slider-btn:active { + box-shadow:0 0 0 .2rem #5764c6 +} +.card { + background:#fff; + border:.1rem solid #f0f1f4; + border-radius:.2rem; + display:block +} +.card .card-body, +.card .card-footer, +.card .card-header { + padding:1.5rem; + padding-bottom:0 +} +.card .card-body:last-child, +.card .card-footer:last-child, +.card .card-header:last-child { + padding-bottom:1.5rem +} +.card .card-image { + padding-top:1.5rem +} +.card .card-image:first-child { + padding-top:0 +} +.card .card-image:first-child img { + border-top-left-radius:.2rem; + border-top-right-radius:.2rem +} +.card .card-image:last-child img { + border-bottom-left-radius:.2rem; + border-bottom-right-radius:.2rem +} +.card .card-title { + font-size:2rem +} +.card .card-subtitle { + color:#bbc1cd; + font-size:1.2rem +} +.chip { + -webkit-align-items:center; + align-items:center; + background:#f0f1f4; + border-radius:.2rem; + color:#727e96; + display:-ms-inline-flexbox; + display:inline-flex; + display:-webkit-inline-flex; + -ms-flex-align:center; + height:2.8rem; + margin:0 .1rem .1rem 0; + max-width:100%; + padding:.1rem .8rem; + text-decoration:none; + vertical-align:middle +} +.chip.active { + background:#5764c6; + color:#fff +} +.chip .avatar { + margin-left:-.4rem; + margin-right:.4rem +} +.dropdown { + display:inline-block; + position:relative +} +.dropdown .menu { + -webkit-animation:slide-down .2s ease 1; + animation:slide-down .2s ease 1; + display:none; + left:0; + position:absolute; + top:100% +} +.dropdown.dropdown-right .menu { + left:auto; + right:0 +} +.dropdown .dropdown-toggle:focus+.menu, +.dropdown .menu:hover, +.dropdown.active .menu { + display:block +} +.dropdown .btn-group .dropdown-toggle:nth-last-child(2) { + border-bottom-right-radius:.2rem; + border-top-right-radius:.2rem +} +.menu { + background:#fff; + border-radius:.2rem; + box-shadow:0 .1rem .4rem rgba(69,77,93,.3); + list-style:none; + margin:0; + min-width:18rem; + padding:1rem; + -webkit-transform:translateY(.5rem); + -ms-transform:translateY(.5rem); + transform:translateY(.5rem); + z-index:100 +} +.menu .menu-item { + margin-top:0; + padding:0 .8rem; + text-decoration:none; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none +} +.menu .menu-item>a { + border-radius:.2rem; + color:inherit; + display:block; + margin:0 -.8rem; + padding:.6rem .8rem; + text-decoration:none +} +.menu .menu-item>a:focus, +.menu .menu-item>a:hover { + color:#5764c6 +} +.menu .menu-item>a.active, +.menu .menu-item>a:active { + background:#fbfbfe; + color:#5764c6 +} +.menu .menu-badge { + float:right; + padding:.6rem 0 +} +.menu .menu-badge .btn { + margin-top:-.2rem +} +.modal { + -webkit-align-items:center; + align-items:center; + bottom:0; + display:none; + -ms-flex-align:center; + -ms-flex-pack:center; + -webkit-justify-content:center; + justify-content:center; + left:0; + opacity:0; + overflow:hidden; + padding:1rem; + position:fixed; + right:0; + top:0 +} +.modal.active, +.modal:target { + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + opacity:1; + z-index:400 +} +.modal.active .modal-overlay, +.modal:target .modal-overlay { + background:rgba(69,77,93,.5); + bottom:0; + cursor:default; + display:block; + left:0; + position:absolute; + right:0; + top:0 +} +.modal.active .modal-container, +.modal:target .modal-container { + -webkit-animation:slide-down .2s ease 1; + animation:slide-down .2s ease 1; + max-width:64rem; + z-index:1 +} +.modal.modal-sm .modal-container { + max-width:32rem +} +.modal-container { + background:#fff; + border-radius:.2rem; + box-shadow:0 .4rem 1rem rgba(69,77,93,.3); + display:block; + padding:0; + text-align:left +} +.modal-container .modal-header { + padding:1.5rem +} +.modal-container .modal-header .modal-title { + font-size:1.6rem; + margin:0 +} +.modal-container .modal-body { + max-height:50vh; + overflow-y:auto; + padding:1.5rem; + position:relative +} +.modal-container .modal-footer { + padding:1.5rem; + text-align:right +} +.breadcrumb, +.nav, +.pagination, +.tab { + list-style:none; + margin:.5rem 0 +} +.breadcrumb { + padding:1.2rem +} +.breadcrumb .breadcrumb-item { + display:inline-block; + margin:0 +} +.breadcrumb .breadcrumb-item:last-child { + color:#acb3c2 +} +.breadcrumb .breadcrumb-item:not(:first-child)::before { + color:#e7e9ed; + content:"/"; + padding:0 .4rem +} +.tab { + -webkit-align-items:center; + align-items:center; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -ms-flex-align:center; + -webkit-flex-wrap:wrap; + -ms-flex-wrap:wrap; + flex-wrap:wrap +} +.tab .tab-item { + margin-top:0 +} +.tab .tab-item.tab-action { + -webkit-flex:1 0 auto; + -ms-flex:1 0 auto; + flex:1 0 auto; + text-align:right +} +.tab .tab-item a { + border-bottom:.2rem solid transparent; + color:inherit; + display:block; + margin-top:0; + padding:.6rem 1.2rem .4rem 1.2rem; + text-decoration:none +} +.tab .tab-item a:focus, +.tab .tab-item a:hover { + color:#5764c6 +} +.tab .tab-item a.active, +.tab .tab-item.active a { + border-bottom-color:#5764c6; + color:#5764c6 +} +.tab.tab-block .tab-item { + -webkit-flex:1 0 0; + -ms-flex:1 0 0; + flex:1 0 0; + text-align:center +} +.tab.tab-block .tab-item .badge[data-badge]::after { + position:absolute; + right:-.4rem; + top:-.4rem; + -webkit-transform:translate(0,0); + -ms-transform:translate(0,0); + transform:translate(0,0) +} +.tab:not(.tab-block) .badge { + padding-right:.2rem +} +.pagination { + display:flex; + display:-ms-flexbox; + display:-webkit-flex +} +.pagination .page-item { + margin:1rem .1rem +} +.pagination .page-item span { + display:inline-block; + padding:.6rem .4rem +} +.pagination .page-item a { + border-radius:.2rem; + color:#727e96; + display:inline-block; + padding:.6rem .8rem; + text-decoration:none +} +.pagination .page-item a:focus, +.pagination .page-item a:hover { + color:#5764c6 +} +.pagination .page-item a.disabled, +.pagination .page-item a[disabled] { + cursor:default; + opacity:.5; + pointer-events:none +} +.pagination .page-item.active a { + background:#5764c6; + color:#fff +} +.pagination .page-item.page-next, +.pagination .page-item.page-prev { + -webkit-flex:1 0 50%; + -ms-flex:1 0 50%; + flex:1 0 50% +} +.pagination .page-item.page-next { + text-align:right +} +.pagination .page-item .page-item-title { + margin:0 +} +.pagination .page-item .page-item-subtitle { + margin:0; + opacity:.5 +} +.nav { + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex-direction:column; + -ms-flex-direction:column; + flex-direction:column +} +.nav .nav-item a { + color:#727e96; + padding:.6rem .8rem; + text-decoration:none +} +.nav .nav-item a:focus, +.nav .nav-item a:hover { + color:#5764c6 +} +.nav .nav-item.active>a { + font-weight:700 +} +.nav .nav-item.active>a:focus, +.nav .nav-item.active>a:hover { + color:#5764c6 +} +.nav .nav { + margin-bottom:1rem; + margin-left:2rem +} +.nav .nav a { + color:#acb3c2 +} +.popover { + display:inline-block; + position:relative +} +.popover .popover-container { + content:attr(data-tooltip); + left:50%; + opacity:0; + padding:1rem; + position:absolute; + top:0; + -webkit-transform:translate(-50%,-50%) scale(0); + -ms-transform:translate(-50%,-50%) scale(0); + transform:translate(-50%,-50%) scale(0); + transition:transform .2s ease,-webkit-transform .2s ease; + transition:transform .2s ease; + transition:-webkit-transform .2s ease; + width:32rem; + z-index:400 +} +.popover .popover-container:hover, +.popover :focus+.popover-container, +.popover:hover .popover-container { + display:block; + opacity:1; + -webkit-transform:translate(-50%,-100%) scale(1); + -ms-transform:translate(-50%,-100%) scale(1); + transform:translate(-50%,-100%) scale(1) +} +.popover.popover-right .popover-container { + left:100%; + top:50% +} +.popover.popover-right .popover-container:hover, +.popover.popover-right :focus+.popover-container, +.popover.popover-right:hover .popover-container { + -webkit-transform:translate(0,-50%) scale(1); + -ms-transform:translate(0,-50%) scale(1); + transform:translate(0,-50%) scale(1) +} +.popover.popover-bottom .popover-container { + left:50%; + top:100% +} +.popover.popover-bottom .popover-container:hover, +.popover.popover-bottom :focus+.popover-container, +.popover.popover-bottom:hover .popover-container { + -webkit-transform:translate(-50%,0) scale(1); + -ms-transform:translate(-50%,0) scale(1); + transform:translate(-50%,0) scale(1) +} +.popover.popover-left .popover-container { + left:0; + top:50% +} +.popover.popover-left .popover-container:hover, +.popover.popover-left :focus+.popover-container, +.popover.popover-left:hover .popover-container { + -webkit-transform:translate(-100%,-50%) scale(1); + -ms-transform:translate(-100%,-50%) scale(1); + transform:translate(-100%,-50%) scale(1) +} +.popover .card { + border:0; + box-shadow:0 .4rem 1rem rgba(69,77,93,.3) +} +.step { + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -webkit-flex-wrap:nowrap; + -ms-flex-wrap:nowrap; + flex-wrap:nowrap; + list-style:none; + margin:.5rem 0; + width:100% +} +.step .step-item { + -webkit-flex:1 1 0; + -ms-flex:1 1 0; + flex:1 1 0; + margin-top:0; + min-height:2rem; + position:relative; + text-align:center +} +.step .step-item:not(:first-child)::before { + background:#5764c6; + content:""; + height:.2rem; + left:-50%; + position:absolute; + top:.9rem; + width:100% +} +.step .step-item a { + color:#acb3c2; + display:inline-block; + padding:2rem 1rem 0; + text-decoration:none +} +.step .step-item a::before { + background:#5764c6; + border:.2rem solid #fff; + border-radius:50%; + content:""; + display:block; + height:1.2rem; + left:50%; + position:absolute; + top:.4rem; + -webkit-transform:translateX(-50%); + -ms-transform:translateX(-50%); + transform:translateX(-50%); + width:1.2rem; + z-index:1 +} +.step .step-item.active a::before { + background:#fff; + border:.2rem solid #5764c6 +} +.step .step-item.active~.step-item::before { + background:#f0f1f4 +} +.step .step-item.active~.step-item a::before { + background:#e7e9ed +} +.tile { + -webkit-align-content:space-between; + align-content:space-between; + -webkit-align-items:flex-start; + align-items:flex-start; + display:flex; + display:-ms-flexbox; + display:-webkit-flex; + -ms-flex-align:start; + -ms-flex-line-pack:justify +} +.tile .tile-action, +.tile .tile-icon { + -webkit-flex:0 0 auto; + -ms-flex:0 0 auto; + flex:0 0 auto +} +.tile .tile-content { + -webkit-flex:1 1 auto; + -ms-flex:1 1 auto; + flex:1 1 auto +} +.tile .tile-content:not(:first-child) { + padding-left:1rem +} +.tile .tile-content:not(:last-child) { + padding-right:1rem +} +.tile .tile-title { + line-height:2rem +} +.tile .tile-subtitle { + color:#bbc1cd; + line-height:2rem +} +.tile.tile-centered { + -webkit-align-items:center; + align-items:center; + -ms-flex-align:center +} +.tile.tile-centered .tile-content { + overflow:hidden +} +.tile.tile-centered .tile-subtitle, +.tile.tile-centered .tile-title { + margin-bottom:0; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap +} +.toast { + background:rgba(69,77,93,.9); + border:.1rem solid #454d5d; + border-color:#454d5d; + border-radius:.2rem; + color:#fff; + display:block; + padding:1rem; + width:100% +} +.toast.toast-primary { + background:rgba(87,100,198,.9); + border-color:#5764c6 +} +.toast.toast-success { + background:rgba(50,182,67,.9); + border-color:#32b643 +} +.toast.toast-warning { + background:rgba(255,183,0,.9); + border-color:#ffb700 +} +.toast.toast-error { + background:rgba(232,86,0,.9); + border-color:#e85600 +} +.toast a { + color:#fff; + text-decoration:underline +} +.toast a.active, +.toast a:active, +.toast a:focus, +.toast a:hover { + opacity:.75 +} +.tooltip { + position:relative +} +.tooltip::after { + background:rgba(69,77,93,.9); + border-radius:.2rem; + bottom:100%; + color:#fff; + content:attr(data-tooltip); + display:block; + font-size:1.2rem; + left:50%; + max-width:32rem; + opacity:0; + overflow:hidden; + padding:.4rem .8rem; + pointer-events:none; + position:absolute; + text-overflow:ellipsis; + -webkit-transform:translate(-50%,1rem); + -ms-transform:translate(-50%,1rem); + transform:translate(-50%,1rem); + transition:all .2s ease; + white-space:nowrap; + z-index:200 +} +.tooltip:focus::after, +.tooltip:hover::after { + opacity:1; + -webkit-transform:translate(-50%,-.5rem); + -ms-transform:translate(-50%,-.5rem); + transform:translate(-50%,-.5rem) +} +.tooltip.disabled, +.tooltip[disabled] { + pointer-events:auto +} +.tooltip.tooltip-right::after { + bottom:50%; + left:100%; + -webkit-transform:translate(-1rem,50%); + -ms-transform:translate(-1rem,50%); + transform:translate(-1rem,50%) +} +.tooltip.tooltip-right:focus::after, +.tooltip.tooltip-right:hover::after { + -webkit-transform:translate(.5rem,50%); + -ms-transform:translate(.5rem,50%); + transform:translate(.5rem,50%) +} +.tooltip.tooltip-bottom::after { + bottom:auto; + top:100%; + -webkit-transform:translate(-50%,-1rem); + -ms-transform:translate(-50%,-1rem); + transform:translate(-50%,-1rem) +} +.tooltip.tooltip-bottom:focus::after, +.tooltip.tooltip-bottom:hover::after { + -webkit-transform:translate(-50%,.5rem); + -ms-transform:translate(-50%,.5rem); + transform:translate(-50%,.5rem) +} +.tooltip.tooltip-left::after { + bottom:50%; + left:auto; + right:100%; + -webkit-transform:translate(1rem,50%); + -ms-transform:translate(1rem,50%); + transform:translate(1rem,50%) +} +.tooltip.tooltip-left:focus::after, +.tooltip.tooltip-left:hover::after { + -webkit-transform:translate(-.5rem,50%); + -ms-transform:translate(-.5rem,50%); + transform:translate(-.5rem,50%) +} +@-webkit-keyframes loading { + 0% { + -webkit-transform:rotate(0); + transform:rotate(0) + } + 100% { + -webkit-transform:rotate(360deg); + transform:rotate(360deg) + } +} +@keyframes loading { + 0% { + -webkit-transform:rotate(0); + transform:rotate(0) + } + 100% { + -webkit-transform:rotate(360deg); + transform:rotate(360deg) + } +} +@-webkit-keyframes slide-down { + 0% { + opacity:0; + -webkit-transform:translateY(-3rem); + transform:translateY(-3rem) + } + 100% { + opacity:1; + -webkit-transform:translateY(0); + transform:translateY(0) + } +} +@keyframes slide-down { + 0% { + opacity:0; + -webkit-transform:translateY(-3rem); + transform:translateY(-3rem) + } + 100% { + opacity:1; + -webkit-transform:translateY(0); + transform:translateY(0) + } +} +.divider, +.divider-vert { + display:block; + position:relative +} +.divider-vert[data-content]::after, +.divider[data-content]::after { + background:#fff; + color:#e7e9ed; + content:attr(data-content); + display:inline-block; + font-size:1.2rem; + padding:0 .8rem; + -webkit-transform:translateY(-1.1rem); + -ms-transform:translateY(-1.1rem); + transform:translateY(-1.1rem) +} +.divider { + border-top:.1rem solid #f0f1f4; + height:.1rem; + margin:1rem 0 +} +.divider-vert { + display:block; + padding:1rem +} +.divider-vert::before { + border-left:.1rem solid #f0f1f4; + bottom:1rem; + content:""; + display:block; + left:50%; + position:absolute; + top:1rem; + -webkit-transform:translateX(-50%); + -ms-transform:translateX(-50%); + transform:translateX(-50%) +} +.divider-vert[data-content]::after { + left:50%; + padding:.4rem 0; + position:absolute; + top:50%; + -webkit-transform:translate(-50%,-50%); + -ms-transform:translate(-50%,-50%); + transform:translate(-50%,-50%) +} +.loading { + color:transparent!important; + min-height:1.6rem; + pointer-events:none; + position:relative +} +.loading::after { + -webkit-animation:loading .5s infinite linear; + animation:loading .5s infinite linear; + border:.2rem solid #5764c6; + border-radius:.8rem; + border-right-color:transparent; + border-top-color:transparent; + content:""; + display:block; + height:1.6rem; + left:50%; + margin-left:-.8rem; + margin-top:-.8rem; + position:absolute; + top:50%; + width:1.6rem; + z-index:1 +} +.clearfix::after, +.container::after { + clear:both; + content:""; + display:table +} +.float-left { + float:left!important +} +.float-right { + float:right!important +} +.rel { + position:relative +} +.abs { + position:absolute +} +.fixed { + position:fixed +} +.centered { + display:block; + float:none; + margin-left:auto; + margin-right:auto +} +.mt-10 { + margin-top:1rem +} +.mr-10 { + margin-right:1rem +} +.mb-10 { + margin-bottom:1rem +} +.ml-10 { + margin-left:1rem +} +.mt-5 { + margin-top:.5rem +} +.mr-5 { + margin-right:.5rem +} +.mb-5 { + margin-bottom:.5rem +} +.ml-5 { + margin-left:.5rem +} +.pt-10 { + padding-top:1rem +} +.pr-10 { + padding-right:1rem +} +.pb-10 { + padding-bottom:1rem +} +.pl-10 { + padding-left:1rem +} +.pt-5 { + padding-top:.5rem +} +.pr-5 { + padding-right:.5rem +} +.pb-5 { + padding-bottom:.5rem +} +.pl-5 { + padding-left:.5rem +} +.block { + display:block +} +.inline { + display:inline +} +.inline-block { + display:inline-block +} +.flex { + display:flex; + display:-ms-flexbox; + display:-webkit-flex +} +.inline-flex { + display:inline-flex; + display:-ms-inline-flexbox; + display:-webkit-inline-flex +} +.hide { + display:none!important +} +.visible { + visibility:visible +} +.invisible { + visibility:hidden +} +.text-hide { + background:0 0; + border:0; + color:transparent; + font-size:0; + line-height:0; + text-shadow:none +} +.text-assistive { + border:0; + clip:rect(0,0,0,0); + height:.1rem; + margin:-.1rem; + overflow:hidden; + padding:0; + position:absolute; + width:.1rem +} +.text-left { + text-align:left +} +.text-right { + text-align:right +} +.text-center { + text-align:center +} +.text-justify { + text-align:justify +} +.text-lowercase { + text-transform:lowercase +} +.text-uppercase { + text-transform:uppercase +} +.text-capitalize { + text-transform:capitalize +} +.text-normal { + font-weight:400 +} +.text-bold { + font-weight:700 +} +.text-italic { + font-style:italic +} +.text-large { + font-size:1.2em +} +.text-ellipsis { + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap +} +.text-clip { + overflow:hidden; + text-overflow:clip; + white-space:nowrap +} +.text-break { + -webkit-hyphens:auto; + -ms-hyphens:auto; + hyphens:auto; + word-break:break-word; + word-wrap:break-word +} +.hand { + cursor:pointer +} +.shadow-0 { + box-shadow:0 0 .2rem rgba(69,77,93,.3) +} +.shadow-1 { + box-shadow:0 .1rem .4rem rgba(69,77,93,.3) +} +.shadow-2 { + box-shadow:0 .2rem .6rem rgba(69,77,93,.3) +} +.shadow-3 { + box-shadow:0 .3rem .8rem rgba(69,77,93,.3) +} +.shadow-4 { + box-shadow:0 .4rem 1rem rgba(69,77,93,.3) +} +.rounded { + border-radius:.2rem +} +.circle { + border-radius:50% +} diff --git a/doc/topics/license.html b/doc/topics/license.html new file mode 100644 index 0000000000..2ff4dd08cd --- /dev/null +++ b/doc/topics/license.html @@ -0,0 +1,729 @@ + + + + + + + + license topic + + + + + + + +
      +
      + + + + + + + +
      + + + + + + + + +

      license topic

      +

      +

      + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 +

      Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

      Preamble +

      The GNU General Public License is a free, copyleft license for +software and other kinds of works. +

      The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. +

      When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. +

      To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. +

      For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. +

      Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. +

      For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. +

      Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. +

      Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. +

      The precise terms and conditions for copying, distribution and +modification follow. +

      TERMS AND CONDITIONS +

      0. Definitions. +

      "This License" refers to version 3 of the GNU General Public License. +

      "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. +

      "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. +

      To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. +

      A "covered work" means either the unmodified Program or a work based +on the Program. +

      To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. +

      To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. +

      An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. +

      1. Source Code. +

      The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. +

      A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. +

      The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. +

      The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. +

      The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. +

      The Corresponding Source for a work in source code form is that +same work. +

      2. Basic Permissions. +

      All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. +

      You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. +

      Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. +

      3. Protecting Users' Legal Rights From Anti-Circumvention Law. +

      No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. +

      When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. +

      4. Conveying Verbatim Copies. +

      You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. +

      You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. +

      5. Conveying Modified Source Versions. +

      You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: +

      a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +

      b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". +

      c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +

      d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. +

      A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. +

      6. Conveying Non-Source Forms. +

      You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: +

      a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +

      b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. +

      c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +

      d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +

      e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. +

      A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. +

      A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. +

      "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. +

      If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). +

      The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. +

      Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. +

      7. Additional Terms. +

      "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. +

      When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. +

      Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: +

      a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +

      b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +

      c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +

      d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or +

      e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +

      f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. +

      All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. +

      If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. +

      Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. +

      8. Termination. +

      You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). +

      However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. +

      Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. +

      Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. +

      9. Acceptance Not Required for Having Copies. +

      You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. +

      10. Automatic Licensing of Downstream Recipients. +

      Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. +

      An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. +

      You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. +

      11. Patents. +

      A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". +

      A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. +

      Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. +

      In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. +

      If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. +

      If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. +

      A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. +

      Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. +

      12. No Surrender of Others' Freedom. +

      If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. +

      13. Use with the GNU Affero General Public License. +

      Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. +

      14. Revised Versions of this License. +

      The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. +

      Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. +

      If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. +

      Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. +

      15. Disclaimer of Warranty. +

      THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +

      16. Limitation of Liability. +

      IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. +

      17. Interpretation of Sections 15 and 16. +

      If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. +

      END OF TERMS AND CONDITIONS +

      How to Apply These Terms to Your New Programs +

      If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. +

      To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. +

      Scenario for Facotorio multiplayer. + Copyright (C) 2018 badgamernl +

      This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +

      This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +

      You should have received a copy of the GNU General Public License + along with this program. If not, see . +

      Also add information on how to contact you by electronic and paper mail. +

      If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: +

      explosivegaming.nl Copyright (C) 2018 badgamernl + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +

      The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". +

      You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. +

      The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + + + + + + + + + + + + + +
      + + + +

      + + + +
      +
      + + + + + diff --git a/doc/topics/readme.md.html b/doc/topics/readme.md.html new file mode 100644 index 0000000000..b41008230d --- /dev/null +++ b/doc/topics/readme.md.html @@ -0,0 +1,269 @@ + + + + + + + + readme.md topic + + + + + + + +
      +
      + + + + + + + +
      + + + + + + + + +

      readme.md topic

      +

      +

      + +

      + logo +
      + + Release + + + Downloads + + + Star + + + Fork + + + CodeFactor + + + Discord + +

      +

      ExpGaming Scenario Repository

      +

      ## Explosive Gaming +

      Explosive Gaming (often ExpGaming) is a server hosting community with a strong focus on Factorio and games that follow similar ideas. Our factorio server are known for hosting large maps with the main goal of being a "mega base" which can produce as much as possible with in our reset schedule. Although these server tend to the more experienced players our server are open to everyone. You can find us through our [website], [discord], [wiki], or in the public games tab in factorio (ExpGaming S1). +

      ## Use and Installation +

      1) Download this [git repository](https://github.com/explosivegaming/scenario/archive/master.zip) for the stable release. The dev branch can be found [here](https://github.com/explosivegaming/scenario/archive/dev.zip) for those who want the latest features. See [releases](#releases) for other release branches. +

      2) Extract the downloaded zip file from the branch you downloaded into factorio's scenario directory: + * Windows: `%appdata%\Factorio\scenarios` + * Linux: `~/.factorio/scenarios` +

      3) Within the scenario you can find `./config/_file_loader.lua` which contains a list of all the modules that will be loaded by the scenario; simply comment out (or remove) features you do not want but note that some modules may load other modules as dependencies even when removed from the list. +

      4) More advanced users may want to play with the other configs files within `./config` but please be aware that some of the config files will require a basic understanding of lua while others may just be a list of values. +

      5) Once you have made any config changes that you wish to make open factorio, select play, then start scenario (or host scenario from within multiplayer tab), and select the scenario which will be called `scenario-master` if you have downloaded the latest stable release and have not changed the folder name. +

      6) The scenario will now load all the selected modules and start the map, any errors or exceptions raised in the scenario should not cause a game/server crash so if any features don't work as expected then it may be returning an error in the log, please report these errors to [the issues page](issues). +

      ## Contributing +

      All are welcome to make pull requests and issues for this scenario, if you are in any doubt please ask someone in our [discord]. If you do not know lua and don't feel like learning you can always make a [feature request]. Please keep in mind while making code changes: +

      * New features should have the branch names: `feature/feature-name` +* New features are merged into `dev` after it has been completed. +* After a number of features have been added a release branch is made: `release/X.Y.0`; this branch should have no new features and only bug fixes or localization. +* A release is merged into `master` on the following friday in time for the the weekly reset. +* Patches may be named `patch/X.Y.Z` and fill be merged into `master` and `dev` when appropriate. +

      ## Releases +

      | Scenario Version* | Version Name | Factorio Version** | +|---|---|---| +| [v5.7][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] | +| [v5.4][s5.4] | Admin Controls | [v0.17.32][f0.17.32] | +| [v5.3][s5.3] | Custom Roles | [v0.17.28][f0.17.28] | +| [v5.2][s5.2] | Quality of life | [v0.17.22][f0.17.22] | +| [v5.1][s5.1] | Permission Groups | [v0.17.13][f0.17.13] | +| [v5.0][s5.0] | 0.17 Overhaul| [v0.17][f0.17.9] | +| [v4.0][s4.0] | Softmod Manager | [v0.16.51][f0.16.51] | +| [v3.0][s3.0] | 0.16 Overhaul | [v0.16][f0.16] | +| [v2.0][s2.0] | Localization and clean up | [v0.15][f0.15] | +| [v1.0][s1.0] | Modulation | [v0.15][f0.15] | +| [v0.1][s0.1] | First Tracked Version | [v0.14][f0.14] | +

      \* Scenario patch versions have been omitted. +

      \*\* Factorio versions show the version they were made for, often the minimum requirement. +

      [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 +[s5.5]: https://github.com/explosivegaming/scenario/releases/tag/5.5.0 +[s5.4]: https://github.com/explosivegaming/scenario/releases/tag/5.4.0 +[s5.3]: https://github.com/explosivegaming/scenario/releases/tag/5.3.0 +[s5.2]: https://github.com/explosivegaming/scenario/releases/tag/5.2.0 +[s5.1]: https://github.com/explosivegaming/scenario/releases/tag/5.1.0 +[s5.0]: https://github.com/explosivegaming/scenario/releases/tag/5.0.0 +[s4.0]: https://github.com/explosivegaming/scenario/releases/tag/v4.0 +[s3.0]: https://github.com/explosivegaming/scenario/releases/tag/v3.0 +[s2.0]: https://github.com/explosivegaming/scenario/releases/tag/v2.0 +[s1.0]: https://github.com/explosivegaming/scenario/releases/tag/v1.0 +[s0.1]: https://github.com/explosivegaming/scenario/releases/tag/v0.1 +

      [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 +[f0.17.43]: https://wiki.factorio.com/Version_history/0.17.0#0.17.43 +[f0.17.32]: https://wiki.factorio.com/Version_history/0.17.0#0.17.32 +[f0.17.28]: https://wiki.factorio.com/Version_history/0.17.0#0.17.28 +[f0.17.22]: https://wiki.factorio.com/Version_history/0.17.0#0.17.22 +[f0.17.13]: https://wiki.factorio.com/Version_history/0.17.0#0.17.13 +[f0.17.9]: https://wiki.factorio.com/Version_history/0.17.0#0.17.9 +[f0.16.51]: https://wiki.factorio.com/Version_history/0.16.0#0.16.51 +[f0.16]: https://wiki.factorio.com/Version_history/0.16.0 +[f0.15]: https://wiki.factorio.com/Version_history/0.15.0 +[f0.14]: https://wiki.factorio.com/Version_history/0.14.0 +

      ## License +

      The Explosive Gaming codebase is licensed under the [GNU General Public License v3.0](LICENSE) +

      [issues]: https://github.com/explosivegaming/scenario/issues/new/choose +[website]: https://explosivegaming.nl +[discord]: https://discord.explosivegaming.nl +[wiki]: https://wiki.explosivegaming.nl + + + + + + + + + + + + + +
      + + + +

      + + + +
      +
      + + + + + diff --git a/modules/addons/discord-alerts.lua b/modules/addons/discord-alerts.lua index 720e02518f..9c7f63f756 100644 --- a/modules/addons/discord-alerts.lua +++ b/modules/addons/discord-alerts.lua @@ -76,7 +76,7 @@ end --- Reports added and removed if config.player_reports then - local Reports = require 'modules.addons.reports-control' + local Reports = require 'modules.control.reports' Event.add(Reports.events.on_player_reported,function(event) local player_name,by_player_name = get_player_name(event) emit_event{ @@ -88,14 +88,14 @@ if config.player_reports then ['Reason:']=event.reason } end) - Event.add(Reports.events.on_player_report_removed,function(event) - local player_name,by_player_name = get_player_name(event) + Event.add(Reports.events.on_report_removed,function(event) + local player_name = get_player_name(event) emit_event{ title='Report Removed', description='A player has a report removed', color=Colors.green, ['Player:']=''..player_name, - ['By:']=''..by_player_name + ['By:']=''..event.removed_by_name } end) end diff --git a/modules/addons/reports-control.lua b/modules/addons/reports-control.lua deleted file mode 100644 index 5de027ce83..0000000000 --- a/modules/addons/reports-control.lua +++ /dev/null @@ -1,141 +0,0 @@ -local Game = require 'utils.game' -local Global = require 'utils.global' - -local Reports = { - user_reports={}, - events = { - on_player_reported = script.generate_event_name(), - on_player_report_removed = script.generate_event_name() - } -} - -Global.register(Reports.user_reports,function(tbl) - Reports.user_reports = tbl -end) - -local function event_emit(event,player,by_player_name) - local reports = Reports.user_reports[player.name] - local reason = reports and reports[by_player_name] - script.raise_event(event,{ - name=event, - tick=game.tick, - player_index=player.index, - by_player_name=by_player_name, - reason=reason - }) -end - ---- Adds a report to a player, reports are stored in global table and can be accessed later --- @tparam LuaPlayer player the player that will be reported --- @tparam[opt='Non string Given.'] reason the reason that the player is being reported --- @tparam[opt=''] string by_player_name the name of the player doing the action --- @treturn boolean true if the report was added, nil if there is an error -function Reports.report_player(player,reason,by_player_name) - player = Game.get_player_from_any(player) - if not player then return end - reason = reason or 'Non Given.' - by_player_name = by_player_name or '' - local reports = Reports.user_reports[player.name] - if not reports then - Reports.user_reports[player.name] = { - [by_player_name] = reason - } - elseif not reports[by_player_name] then - reports[by_player_name] = reason - else return false end - event_emit(Reports.events.on_player_reported,player,by_player_name) - return true -end - ---- Removes a report from a player by the given player, see clear_player_reports to remove all --- @tparam LuaPlayer player the player that will have the report removed --- @tparam[opt=''] string by_player_name the name of the player doing the action --- @treturn boolean true if the report was removed, nil if there was an error -function Reports.remove_player_report(player,by_player_name) - player = Game.get_player_from_any(player) - if not player then return end - by_player_name = by_player_name or '' - local reports = Reports.user_reports[player.name] - if reports and reports[by_player_name] then - event_emit(Reports.events.on_player_report_removed,player,by_player_name) - reports[by_player_name] = nil - if Reports.count_player_reports(player) == 0 then - Reports.user_reports[player.name] = nil - end - return true - end - return false -end - ---- Clears all reports from a player, will emit an event for each individual report as if remove_player_report was used --- @tparam LuaPlayer player the player to clear the reports of --- @treturn boolean true if the reports were cleared, nil if error -function Reports.clear_player_reports(player) - player = Game.get_player_from_any(player) - if not player then return end - local reports = Reports.user_reports[player.name] - if reports then - for by_player_name,reason in pairs(reports) do - event_emit(Reports.events.on_player_report_removed,player,by_player_name) - end - Reports.user_reports[player.name] = nil - return true - end - return false -end - ---- Test for if a player has been reported by another player, can also return the reason from that player --- @tparam LuaPlayer player the player to check the reports of --- @tparam string by_player_name the player that made if the report if present (note server is not default here) --- @tparam[opt=false] boolean rtn_reason true will return the reason for the report rather than a boolean --- @treturn boolean true if a report from the player is present unless rtn_reason is true when a string is returned (or false) -function Reports.player_is_reported_by(player,by_player_name,rtn_reason) - player = Game.get_player_from_any(player) - if not player then return end - local reports = Reports.user_reports[player.name] - if reports and reports[by_player_name] then - return rtn_reason and reports[by_player_name] or true - end - return false -end - ---- Gets all the reports that are on a player --- @tparam LuaPlayer player the player to get the reports of --- @treturn table a table of all the reports for this player, empty table if no reports -function Reports.get_player_reports(player) - player = Game.get_player_from_any(player) - if not player then return end - return Reports.user_reports[player.name] or {} -end - ---- Counts all reports on a player returning a number, a custom count function can be given which should return a number --- @tparam LuaPlayer player the player to count the reports of --- @tparam[opt] number function count_callback should return a or true (for 1) this will be passed every report on the player --- count_callback param - player_name string - the name of the player who made the report --- count_callback param - reason string - the reason the reason was made --- count_callback return - number or boolean - if number then this will be added to the count, if boolean then false = 0 and true = 1 --- @treturn number the number of reports on the player -function Reports.count_player_reports(player,count_callback) - player = Game.get_player_from_any(player) - if not player then return end - local reports = Reports.user_reports[player.name] or {} - if not count_callback then - local ctn = 0 - for _ in pairs(reports) do - ctn=ctn+1 - end - return ctn - else - local ctn = 0 - for player_name,reason in pairs(reports) do - local success,err = pcall(count_callback,player_name,reason) - if success and err then - if err == true then err = 1 end - ctn = ctn+err - end - end - return ctn - end -end - -return Reports \ No newline at end of file diff --git a/modules/commands/reports.lua b/modules/commands/reports.lua index 98fec56dcb..0ba2244a03 100644 --- a/modules/commands/reports.lua +++ b/modules/commands/reports.lua @@ -1,6 +1,6 @@ local Roles = require 'expcore.roles' local Commands = require 'expcore.commands' -local ReportsControl = require 'modules.addons.reports-control' +local Reports = require 'modules.control.reports' local format_chat_player_name = ext_require('expcore.common','format_chat_player_name') require 'config.expcore-commands.parse_general' @@ -20,7 +20,7 @@ end) :register(function(player,action_player,reason,raw) local action_player_name_color = format_chat_player_name(action_player) local by_player_name_color = format_chat_player_name(player) - if ReportsControl.report_player(action_player,reason,player.name) then + if Reports.report_player(action_player,player.name,reason) then 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}) else @@ -33,7 +33,7 @@ Commands.new_command('get-reports','Gets a list of all reports that a player has :add_alias('reports','list-reports') :register(function(player,action_player,raw) if action_player then - local reports = ReportsControl.get_player_reports(action_player) + local reports = Reports.get_reports(action_player) local action_player_name_color = format_chat_player_name(action_player) Commands.print{'expcom-report.player-report-title',action_player_name_color} for player_name,reason in pairs(reports) do @@ -41,11 +41,11 @@ Commands.new_command('get-reports','Gets a list of all reports that a player has Commands.print{'expcom-report.list',by_player_name_color,reason} end else - local user_reports = ReportsControl.user_reports + local user_reports = Reports.user_reports Commands.print{'expcom-report.player-count-title'} for player_name,reports in pairs(user_reports) do local player_name_color = format_chat_player_name(player_name) - local report_count = ReportsControl.count_player_reports(player_name) + local report_count = Reports.count_reports(player_name) Commands.print{'expcom-report.list',player_name_color,report_count} end end @@ -56,11 +56,11 @@ Commands.new_command('clear-reports','Clears all reports from a player or just t :add_param('from-player',true,'player') :register(function(player,action_player,from_player,raw) if from_player then - if not ReportsControl.remove_player_report(action_player,from_player.name) then + if not Reports.remove_report(action_player,from_player.name,player.name) then return Commands.error{'expcom-report.not-reported'} end else - if not ReportsControl.clear_player_reports(action_player) then + if not Reports.remove_all(action_player,player.name) then return Commands.error{'expcom-report.not-reported'} end end diff --git a/modules/control/reports.lua b/modules/control/reports.lua new file mode 100644 index 0000000000..758d0582ee --- /dev/null +++ b/modules/control/reports.lua @@ -0,0 +1,212 @@ +--[[-- Control Module - Reports + Adds a way to report players and store report messages. + @module Reports + @alias Reports + + @usage + -- 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 + +]] + +local Game = require 'utils.game' +local Global = require 'utils.global' + +local valid_player = Game.get_player_from_any + +local Reports = { + user_reports={}, -- stores all user reports, global table + events = { + --- When a player is reported + -- @event on_player_reported + -- @tparam number player_index the player index of the player who got reported + -- @tparam string by_player_name the name of the player who made the report + -- @tparam string reason the reason given for the report + on_player_reported = script.generate_event_name(), + --- When a report is removed from a player + -- @event on_report_removed + -- @tparam number player_index the player index of the player who has the report removed + -- @tparam string reported_by_name the name of the player who made the removed report + -- @tparam string removed_by_name the name of the player who removed the report + on_report_removed = script.generate_event_name() + } +} + +local user_reports = Reports.user_reports +Global.register(user_reports,function(tbl) + user_reports = tbl +end) + +--- Get functions. +-- Functions used to get information from reports +-- @section get-functions + +--- Gets a list of all reports that a player has against them +-- @tparam LuaPlayer player the player to get the report for +-- @treturn table a list of all reports, key is by player name, value is reason +function Reports.get_reports(player) + player = valid_player(player) + if not player then return end + + return user_reports[player.name] or {} +end + +--- Gets a single report against a player given the name of the player who made the report +-- @tparam LuaPlayer player the player to get the report for +-- @tparam string by_player_name the name of the player who made the report +-- @treturn ?string|nil string is the reason that the player was reported, if the player is not reported +function Reports.get_report(player,by_player_name) + player = valid_player(player) + if not player then return end + if not by_player_name then return end + + local reports = user_reports[player.name] + return reports and reports[by_player_name] +end + +--- Checks if a player is reported, option to get if reported by a certain player +-- @tparam LuaPlayer player the player to check if reported +-- @tparam[opt] string by_player_name when given will check if reported by this player +-- @treturn boolean if the player has been reported +function Reports.is_reported(player,by_player_name) + player = valid_player(player) + if not player then return end + + local reports = user_reports[player.name] or {} + if by_player_name then + return reports[by_player_name] ~= nil + else + return table_size(reports) > 0 + end +end + +--- Counts the number of reports that a player has aganist them +-- @tparam LuaPlayer player the player to count the reports for +-- @tparam[opt] function custom_count when given this function will be used to count the reports +-- @treturn number the number of reports that the user has +function Reports.count_reports(player,custom_count) + player = valid_player(player) + if not player then return end + + local reports = user_reports[player.name] or {} + if custom_count then + local ctn = 0 + for by_player_name,reason in pairs(reports) do + ctn = ctn + custom_count(player,by_player_name,reason) + end + return ctn + else + return table_size(reports) + end +end + +--- Set functions. +-- Functions used to get information from reports +-- @section set-functions + +--- Adds a report to a player, each player can only report another player once +-- @tparam LuaPlayer player the player to add the report to +-- @tparam string by_player_name the name of the player that is making the report +-- @tparam[opt='Non Given.'] string reason the reason that the player is being reported +-- @treturn boolean whether the report was added successfully +function Reports.report_player(player,by_player_name,reason) + player = valid_player(player) + if not player then return end + local player_name = player.name + + reason = reason or 'Non Given.' + + local reports = user_reports[player_name] + if not reports then + reports = {} + user_reports[player_name] = reports + end + + if reports[by_player_name] then + return false + else + reports[by_player_name] = reason + end + + script.raise_event(Reports.events.on_player_reported,{ + name = Reports.events.on_player_reported, + tick = game.tick, + player_index = player.index, + by_player_name = by_player_name, + reason = reason + }) + + return true +end + +--- Used to emit the report removed event, own function due to repeated use in Report.remove_all +-- @tparam LuaPlayer player the player who is having the report removed from them +-- @tparam string reported_by_name the player who had the report +-- @tparam string removed_by_name the player who is clearing the report +local function report_removed_event(player,reported_by_name,removed_by_name) + script.raise_event(Reports.events.on_report_removed,{ + name = Reports.events.on_report_removed, + tick = game.tick, + player_index = player.index, + reported_by_name = reported_by_name, + removed_by_name = removed_by_name + }) +end + +--- Removes a report from a player +-- @tparam LuaPlayer player the player to remove the report from +-- @tparam string reported_by_name the name of the player that made the report +-- @treturn boolean whether the report was removed successfully +function Reports.remove_report(player,reported_by_name,removed_by_name) + player = valid_player(player) + if not player then return end + + local reports = user_reports[player.name] + if not reports then + return false + end + + local reason = reports[reported_by_name] + if not reason then + return false + end + + report_removed_event(player,reported_by_name,removed_by_name) + + reports[reported_by_name] = nil + return true +end + +--- Removes all reports from a player +-- @tparam LuaPlayer player the player to remove the reports from +-- @treturn boolean whether the reports were removed successfully +function Reports.remove_all(player,removed_by_name) + player = valid_player(player) + if not player then return end + + local reports = user_reports[player.name] + if not reports then + return false + end + + for reported_by_name,_ in pairs(reports) do + report_removed_event(player,reported_by_name,removed_by_name) + end + + user_reports[player.name] = nil + return true +end + +return Reports \ No newline at end of file From c8c0bba86084dc5de471d937ba2c6990fd4c14e7 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 21 Jun 2019 22:54:12 +0100 Subject: [PATCH 02/25] Moved jail to control --- config/action_buttons.lua | 8 +- doc/index.html | 7 +- doc/modules/Jail.html | 1010 +++++++++++++++++ doc/modules/Reports.html | 9 +- doc/modules/config._file_loader.html | 3 +- doc/modules/config.action_buttons.html | 3 +- doc/modules/config.advanced_start.html | 3 +- doc/modules/config.bonuses.html | 3 +- doc/modules/config.chat_reply.html | 3 +- doc/modules/config.death_logger.html | 3 +- doc/modules/config.discord_alerts.html | 3 +- .../config.expcore-commands.auth_admin.html | 3 +- .../config.expcore-commands.auth_roles.html | 3 +- ...expcore-commands.auth_runtime_disable.html | 3 +- ...config.expcore-commands.parse_general.html | 3 +- .../config.expcore-commands.parse_roles.html | 3 +- doc/modules/config.permission_groups.html | 3 +- doc/modules/config.popup_messages.html | 3 +- doc/modules/config.rockets.html | 3 +- doc/modules/config.roles.html | 3 +- doc/modules/config.scorched_earth.html | 3 +- doc/modules/config.spawn_area.html | 3 +- doc/modules/config.warnings.html | 3 +- doc/modules/config.warps.html | 3 +- doc/modules/control.html | 3 +- doc/modules/expcore.commands.html | 3 +- doc/modules/expcore.common.html | 3 +- doc/modules/expcore.gui.concepts.center.html | 3 +- doc/modules/expcore.gui.concepts.left.html | 3 +- doc/modules/expcore.gui.concepts.popups.html | 3 +- doc/modules/expcore.gui.concepts.toolbar.html | 3 +- doc/modules/expcore.gui.core.html | 3 +- doc/modules/expcore.gui.elements.buttons.html | 3 +- .../expcore.gui.elements.checkboxs.html | 3 +- .../expcore.gui.elements.dropdown.html | 3 +- .../expcore.gui.elements.elem-button.html | 3 +- .../expcore.gui.elements.progress-bar.html | 3 +- doc/modules/expcore.gui.elements.slider.html | 3 +- doc/modules/expcore.gui.elements.text.html | 3 +- doc/modules/expcore.gui.html | 3 +- doc/modules/expcore.gui.instances.html | 3 +- doc/modules/expcore.gui.prototype.html | 3 +- doc/modules/expcore.gui.test.html | 3 +- doc/modules/expcore.permission_groups.html | 3 +- doc/modules/expcore.roles.html | 3 +- doc/modules/expcore.store.html | 3 +- doc/modules/expcore.sudo.html | 3 +- .../modules.addons.advanced-start.html | 3 +- doc/modules/modules.addons.chat-popups.html | 3 +- doc/modules/modules.addons.damage-popups.html | 3 +- doc/modules/modules.gui.player-list.html | 3 +- doc/modules/modules.gui.rocket-info.html | 3 +- doc/modules/modules.gui.science-info.html | 3 +- doc/modules/modules.gui.task-list.html | 3 +- .../utils.alien_evolution_progress.html | 3 +- doc/modules/utils.core.html | 3 +- doc/modules/utils.debug.html | 3 +- doc/modules/utils.event.html | 3 +- doc/modules/utils.event_core.html | 3 +- doc/modules/utils.math.html | 3 +- doc/modules/utils.recipe_locker.html | 3 +- doc/modules/utils.state_machine.html | 3 +- doc/modules/utils.table.html | 3 +- doc/modules/utils.task.html | 3 +- doc/modules/utils.timestamp.html | 3 +- doc/topics/license.html | 3 +- doc/topics/readme.md.html | 3 +- modules/commands/jail.lua | 10 +- modules/control/jail.lua | 209 ++++ modules/control/reports.lua | 4 +- 70 files changed, 1367 insertions(+), 79 deletions(-) create mode 100644 doc/modules/Jail.html create mode 100644 modules/control/jail.lua diff --git a/config/action_buttons.lua b/config/action_buttons.lua index 9bf8de57ff..4e821e1f6a 100644 --- a/config/action_buttons.lua +++ b/config/action_buttons.lua @@ -9,7 +9,7 @@ local Store = require 'expcore.store' local Game = require 'utils.game' local Reports = require 'modules.control.reports' local Warnings = require 'modules.addons.warnings-control' -local Jail = require 'modules.addons.jail-control' +local Jail = require 'modules.control.jail' local Colors = require 'resources.color_presets' local format_chat_player_name = ext_require('expcore.common','format_chat_player_name') @@ -146,7 +146,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,7 +157,7 @@ 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 @@ -168,7 +168,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') diff --git a/doc/index.html b/doc/index.html index 36d76e1a3b..13ec6e628d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -274,6 +274,11 @@

      Modules

      + + + + @@ -370,7 +375,7 @@

      Topics

      generated by LDoc diff --git a/doc/modules/Jail.html b/doc/modules/Jail.html new file mode 100644 index 0000000000..5af00326b9 --- /dev/null +++ b/doc/modules/Jail.html @@ -0,0 +1,1010 @@ + + + + + + + + Jail module + + + + + + + +
      +
      + + + + + + + +
      + + + + + + + + +

      Jail module

      +

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

      +

      + + + + + + +

      Usage

      +
      
      +    -- 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')
      + + + + + +
      modules.addons.damage-popups Displays the amount of dmg that is done by players to entities also shows player health when a player is attacked
      JailControl Module - Jail + Adds a way to jail players and temp ban players.
      Reports
      + +

      Events

      + + + + + + + + + + + + + + + + + + + + +
      on_player_jailedWhen a player is assigned to jail
      on_player_temp_bannedWhen a player is temp banned
      on_player_unjailedWhen a player is unassigned from jail
      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
      + + +
      + + +

      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_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_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_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/Reports.html b/doc/modules/Reports.html index f22beb2fa1..291c812f6b 100644 --- a/doc/modules/Reports.html +++ b/doc/modules/Reports.html @@ -40,6 +40,7 @@
    diff --git a/doc/modules/config._file_loader.html b/doc/modules/config._file_loader.html index 21cb995df3..28a9566a3e 100644 --- a/doc/modules/config._file_loader.html +++ b/doc/modules/config._file_loader.html @@ -40,6 +40,7 @@
    diff --git a/doc/modules/config.action_buttons.html b/doc/modules/config.action_buttons.html index d04dd7ff24..2146ea2aec 100644 --- a/doc/modules/config.action_buttons.html +++ b/doc/modules/config.action_buttons.html @@ -40,6 +40,7 @@