From 933f32e5e37275b357f0826a3f4b79776519d6db Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 26 May 2020 18:12:20 +0000 Subject: [PATCH] Automattic Doc Update --- docs/addons/Advanced-Start.html | 4 +- docs/addons/Chat-Popups.html | 4 +- docs/addons/Chat-Reply.html | 4 +- docs/addons/Compilatron.html | 4 +- docs/addons/Damage-Popups.html | 4 +- docs/addons/Death-Logger.html | 4 +- docs/addons/Discord-Alerts.html | 4 +- docs/addons/Inventory-Clear.html | 4 +- docs/addons/Player-Colours.html | 4 +- docs/addons/Pollution-Grading.html | 4 +- docs/addons/Scorched-Earth.html | 4 +- docs/addons/Spawn-Area.html | 4 +- docs/addons/Tree-Decon.html | 4 +- docs/addons/greetings.html | 4 +- docs/commands/Admin-Chat.html | 4 +- docs/commands/Bonus.html | 4 +- docs/commands/Cheat-Mode.html | 4 +- docs/commands/Clear-Inventory.html | 4 +- docs/commands/Debug.html | 4 +- docs/commands/Find.html | 4 +- docs/commands/Help.html | 4 +- docs/commands/Home.html | 4 +- docs/commands/Interface.html | 4 +- docs/commands/Jail.html | 4 +- docs/commands/Kill.html | 4 +- docs/commands/Me.html | 4 +- docs/commands/Quickbar.html | 4 +- docs/commands/Rainbow.html | 4 +- docs/commands/Repair.html | 4 +- docs/commands/Reports.html | 4 +- docs/commands/Roles.html | 4 +- docs/commands/Spawn.html | 4 +- docs/commands/Tag.html | 4 +- docs/commands/Teleport.html | 4 +- docs/commands/Warnings.html | 4 +- docs/configs/Advanced-Start.html | 4 +- docs/configs/Bonuses.html | 4 +- docs/configs/Chat-Reply.html | 4 +- docs/configs/Commands-Auth-Admin.html | 4 +- docs/configs/Commands-Auth-Roles.html | 4 +- .../Commands-Auth-Runtime-Disable.html | 4 +- docs/configs/Commands-Parse-Roles.html | 4 +- docs/configs/Commands-Parse.html | 4 +- docs/configs/Compilatron.html | 4 +- docs/configs/Death-Logger.html | 4 +- docs/configs/Discord-Alerts.html | 4 +- docs/configs/File-Loader.html | 4 +- docs/configs/Permission-Groups.html | 4 +- docs/configs/Player-List.html | 4 +- docs/configs/Pollution-Grading.html | 4 +- docs/configs/Popup-Messages.html | 4 +- docs/configs/Preset-Player-Colours.html | 4 +- docs/configs/Preset-Player-Quickbar.html | 4 +- docs/configs/Repair.html | 4 +- docs/configs/Rockets.html | 4 +- docs/configs/Roles.html | 4 +- docs/configs/Science.html | 4 +- docs/configs/Scorched-Earth.html | 4 +- docs/configs/Spawn-Area.html | 4 +- docs/configs/Tasks.html | 4 +- docs/configs/Warnings.html | 4 +- docs/configs/Warps.html | 4 +- docs/configs/inventory_clear.html | 4 +- docs/control/Jail.html | 4 +- docs/control/Production.html | 4 +- docs/control/Reports.html | 4 +- docs/control/Rockets.html | 4 +- docs/control/Tasks.html | 4 +- docs/control/Warnings.html | 4 +- docs/control/Warps.html | 4 +- docs/core/Async.html | 4 +- docs/core/Commands.html | 4 +- docs/core/Common.html | 4 +- docs/core/Datastore.html | 2871 +++++++++++++++++ docs/core/Groups.html | 4 +- docs/core/Gui.html | 4 +- docs/core/PlayerData.html | 501 +++ docs/core/Roles.html | 4 +- docs/core/Store.html | 4 +- docs/guis/Player-List.html | 4 +- docs/guis/Readme.html | 4 +- docs/guis/Rocket-Info.html | 4 +- docs/guis/Science-Info.html | 4 +- docs/guis/Task-List.html | 4 +- docs/guis/Warps-List.html | 4 +- docs/guis/server-ups.html | 4 +- docs/index.html | 12 +- docs/modules/control.html | 4 +- .../modules.addons.station-auto-name.html | 4 +- docs/modules/overrides.debug.html | 4 +- docs/modules/overrides.math.html | 4 +- docs/modules/overrides.table.html | 4 +- docs/modules/utils.event.html | 4 +- docs/modules/utils.event_core.html | 4 +- docs/modules/utils.task.html | 4 +- docs/topics/LICENSE.html | 4 +- docs/topics/README.md.html | 4 +- 97 files changed, 3665 insertions(+), 95 deletions(-) create mode 100644 docs/core/Datastore.html create mode 100644 docs/core/PlayerData.html diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html index e81eb23f..9982cb3f 100644 --- a/docs/addons/Advanced-Start.html +++ b/docs/addons/Advanced-Start.html @@ -73,8 +73,10 @@ + + @@ -351,7 +353,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html index 9f183435..c9dbff7f 100644 --- a/docs/addons/Chat-Popups.html +++ b/docs/addons/Chat-Popups.html @@ -73,8 +73,10 @@ + + @@ -352,7 +354,7 @@ generated by LDoc diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html index 42c26a8f..4e9b6377 100644 --- a/docs/addons/Chat-Reply.html +++ b/docs/addons/Chat-Reply.html @@ -73,8 +73,10 @@ + + @@ -379,7 +381,7 @@ generated by LDoc diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html index 45cc871e..fc1716fd 100644 --- a/docs/addons/Compilatron.html +++ b/docs/addons/Compilatron.html @@ -74,8 +74,10 @@ + + @@ -588,7 +590,7 @@ generated by LDoc diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html index 3d5d84bc..68b6d7fc 100644 --- a/docs/addons/Damage-Popups.html +++ b/docs/addons/Damage-Popups.html @@ -73,8 +73,10 @@ + + @@ -352,7 +354,7 @@ generated by LDoc diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html index fbf61296..a8967ecd 100644 --- a/docs/addons/Death-Logger.html +++ b/docs/addons/Death-Logger.html @@ -73,8 +73,10 @@ + + @@ -407,7 +409,7 @@ generated by LDoc diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html index 0159d227..45ab0cb9 100644 --- a/docs/addons/Discord-Alerts.html +++ b/docs/addons/Discord-Alerts.html @@ -73,8 +73,10 @@ + + @@ -463,7 +465,7 @@ generated by LDoc diff --git a/docs/addons/Inventory-Clear.html b/docs/addons/Inventory-Clear.html index 60ef06b4..ce87dc0e 100644 --- a/docs/addons/Inventory-Clear.html +++ b/docs/addons/Inventory-Clear.html @@ -73,8 +73,10 @@ + + @@ -351,7 +353,7 @@ generated by LDoc diff --git a/docs/addons/Player-Colours.html b/docs/addons/Player-Colours.html index e1a2be59..4756d480 100644 --- a/docs/addons/Player-Colours.html +++ b/docs/addons/Player-Colours.html @@ -73,8 +73,10 @@ + + @@ -407,7 +409,7 @@ generated by LDoc diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html index de0f214a..0f7111f3 100644 --- a/docs/addons/Pollution-Grading.html +++ b/docs/addons/Pollution-Grading.html @@ -73,8 +73,10 @@ + + @@ -323,7 +325,7 @@ generated by LDoc diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html index bf3e8303..561ae5b3 100644 --- a/docs/addons/Scorched-Earth.html +++ b/docs/addons/Scorched-Earth.html @@ -73,8 +73,10 @@ + + @@ -407,7 +409,7 @@ generated by LDoc diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html index d95d6d7a..ea566dda 100644 --- a/docs/addons/Spawn-Area.html +++ b/docs/addons/Spawn-Area.html @@ -73,8 +73,10 @@ + + @@ -379,7 +381,7 @@ generated by LDoc diff --git a/docs/addons/Tree-Decon.html b/docs/addons/Tree-Decon.html index 457ca4fc..a2b049bd 100644 --- a/docs/addons/Tree-Decon.html +++ b/docs/addons/Tree-Decon.html @@ -73,8 +73,10 @@ + + @@ -379,7 +381,7 @@ generated by LDoc diff --git a/docs/addons/greetings.html b/docs/addons/greetings.html index f2f31ac7..36515fa4 100644 --- a/docs/addons/greetings.html +++ b/docs/addons/greetings.html @@ -73,8 +73,10 @@ + + @@ -379,7 +381,7 @@ generated by LDoc diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html index d62c7a8c..41426961 100644 --- a/docs/commands/Admin-Chat.html +++ b/docs/commands/Admin-Chat.html @@ -81,8 +81,10 @@ + + @@ -391,7 +393,7 @@ generated by LDoc diff --git a/docs/commands/Bonus.html b/docs/commands/Bonus.html index 4ab594b6..f3217c1f 100644 --- a/docs/commands/Bonus.html +++ b/docs/commands/Bonus.html @@ -81,8 +81,10 @@ + + @@ -503,7 +505,7 @@ generated by LDoc diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html index b665d15c..5869f710 100644 --- a/docs/commands/Cheat-Mode.html +++ b/docs/commands/Cheat-Mode.html @@ -81,8 +81,10 @@ + + @@ -364,7 +366,7 @@ generated by LDoc diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html index 891ac5c8..af432523 100644 --- a/docs/commands/Clear-Inventory.html +++ b/docs/commands/Clear-Inventory.html @@ -81,8 +81,10 @@ + + @@ -391,7 +393,7 @@ generated by LDoc diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html index 53b98cea..819392f3 100644 --- a/docs/commands/Debug.html +++ b/docs/commands/Debug.html @@ -81,8 +81,10 @@ + + @@ -368,7 +370,7 @@ generated by LDoc diff --git a/docs/commands/Find.html b/docs/commands/Find.html index 29033cc5..ce42ad18 100644 --- a/docs/commands/Find.html +++ b/docs/commands/Find.html @@ -81,8 +81,10 @@ + + @@ -363,7 +365,7 @@ generated by LDoc diff --git a/docs/commands/Help.html b/docs/commands/Help.html index c0c4e54e..38834890 100644 --- a/docs/commands/Help.html +++ b/docs/commands/Help.html @@ -81,8 +81,10 @@ + + @@ -407,7 +409,7 @@ generated by LDoc diff --git a/docs/commands/Home.html b/docs/commands/Home.html index 338791be..18dda653 100644 --- a/docs/commands/Home.html +++ b/docs/commands/Home.html @@ -81,8 +81,10 @@ + + @@ -461,7 +463,7 @@ generated by LDoc diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html index b0021e91..09786909 100644 --- a/docs/commands/Interface.html +++ b/docs/commands/Interface.html @@ -81,8 +81,10 @@ + + @@ -419,7 +421,7 @@ generated by LDoc diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html index 621a9aec..a6c12d10 100644 --- a/docs/commands/Jail.html +++ b/docs/commands/Jail.html @@ -81,8 +81,10 @@ + + @@ -614,7 +616,7 @@ generated by LDoc diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html index ca61daca..9e1bf8e8 100644 --- a/docs/commands/Kill.html +++ b/docs/commands/Kill.html @@ -81,8 +81,10 @@ + + @@ -392,7 +394,7 @@ generated by LDoc diff --git a/docs/commands/Me.html b/docs/commands/Me.html index cccd2fc5..f2d7330f 100644 --- a/docs/commands/Me.html +++ b/docs/commands/Me.html @@ -81,8 +81,10 @@ + + @@ -363,7 +365,7 @@ generated by LDoc diff --git a/docs/commands/Quickbar.html b/docs/commands/Quickbar.html index 186a774e..dcd166ea 100644 --- a/docs/commands/Quickbar.html +++ b/docs/commands/Quickbar.html @@ -81,8 +81,10 @@ + + @@ -399,7 +401,7 @@ generated by LDoc diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html index 05233854..97ca2540 100644 --- a/docs/commands/Rainbow.html +++ b/docs/commands/Rainbow.html @@ -81,8 +81,10 @@ + + @@ -391,7 +393,7 @@ generated by LDoc diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html index fcf3f0d7..bc5c3c49 100644 --- a/docs/commands/Repair.html +++ b/docs/commands/Repair.html @@ -80,8 +80,10 @@ + + @@ -324,7 +326,7 @@ generated by LDoc diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html index 0d83676a..770dc9e7 100644 --- a/docs/commands/Reports.html +++ b/docs/commands/Reports.html @@ -81,8 +81,10 @@ + + @@ -588,7 +590,7 @@ generated by LDoc diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html index 1b746a51..d1676712 100644 --- a/docs/commands/Roles.html +++ b/docs/commands/Roles.html @@ -81,8 +81,10 @@ + + @@ -560,7 +562,7 @@ generated by LDoc diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html index af7524a0..2923f033 100644 --- a/docs/commands/Spawn.html +++ b/docs/commands/Spawn.html @@ -81,8 +81,10 @@ + + @@ -392,7 +394,7 @@ generated by LDoc diff --git a/docs/commands/Tag.html b/docs/commands/Tag.html index 77dbadf0..412c0d34 100644 --- a/docs/commands/Tag.html +++ b/docs/commands/Tag.html @@ -81,8 +81,10 @@ + + @@ -446,7 +448,7 @@ generated by LDoc diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html index 108e22a2..9bf1c238 100644 --- a/docs/commands/Teleport.html +++ b/docs/commands/Teleport.html @@ -81,8 +81,10 @@ + + @@ -487,7 +489,7 @@ generated by LDoc diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html index 2c4e808a..fb304bad 100644 --- a/docs/commands/Warnings.html +++ b/docs/commands/Warnings.html @@ -81,8 +81,10 @@ + + @@ -572,7 +574,7 @@ generated by LDoc diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html index e7e40e07..1a77b8ab 100644 --- a/docs/configs/Advanced-Start.html +++ b/docs/configs/Advanced-Start.html @@ -87,8 +87,10 @@ + + @@ -509,7 +511,7 @@ generated by LDoc diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html index 74e7c9f0..46a2357e 100644 --- a/docs/configs/Bonuses.html +++ b/docs/configs/Bonuses.html @@ -79,8 +79,10 @@ + + @@ -240,7 +242,7 @@ generated by LDoc diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html index 6b56dad1..a244e41b 100644 --- a/docs/configs/Chat-Reply.html +++ b/docs/configs/Chat-Reply.html @@ -88,8 +88,10 @@ + + @@ -488,7 +490,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html index 1b2832eb..7c44f74a 100644 --- a/docs/configs/Commands-Auth-Admin.html +++ b/docs/configs/Commands-Auth-Admin.html @@ -87,8 +87,10 @@ + + @@ -297,7 +299,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html index b4884896..a65c596e 100644 --- a/docs/configs/Commands-Auth-Roles.html +++ b/docs/configs/Commands-Auth-Roles.html @@ -87,8 +87,10 @@ + + @@ -323,7 +325,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html index 08a59675..085de457 100644 --- a/docs/configs/Commands-Auth-Runtime-Disable.html +++ b/docs/configs/Commands-Auth-Runtime-Disable.html @@ -88,8 +88,10 @@ + + @@ -445,7 +447,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html index bbec55e1..c9f4ec18 100644 --- a/docs/configs/Commands-Parse-Roles.html +++ b/docs/configs/Commands-Parse-Roles.html @@ -87,8 +87,10 @@ + + @@ -357,7 +359,7 @@ generated by LDoc diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html index 897c2281..0339092d 100644 --- a/docs/configs/Commands-Parse.html +++ b/docs/configs/Commands-Parse.html @@ -87,8 +87,10 @@ + + @@ -341,7 +343,7 @@ see ./expcore/commands.lua for more details

generated by LDoc diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html index c5ae25df..d2e99dc2 100644 --- a/docs/configs/Compilatron.html +++ b/docs/configs/Compilatron.html @@ -87,8 +87,10 @@ + + @@ -357,7 +359,7 @@ generated by LDoc diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html index f7eeef91..f2a86deb 100644 --- a/docs/configs/Death-Logger.html +++ b/docs/configs/Death-Logger.html @@ -87,8 +87,10 @@ + + @@ -419,7 +421,7 @@ generated by LDoc diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html index ed9373e9..51a7423d 100644 --- a/docs/configs/Discord-Alerts.html +++ b/docs/configs/Discord-Alerts.html @@ -79,8 +79,10 @@ + + @@ -240,7 +242,7 @@ generated by LDoc diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html index 41ff18a2..d09624a4 100644 --- a/docs/configs/File-Loader.html +++ b/docs/configs/File-Loader.html @@ -79,8 +79,10 @@ + + @@ -243,7 +245,7 @@ generated by LDoc diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html index 0a7b5d6c..e1f58384 100644 --- a/docs/configs/Permission-Groups.html +++ b/docs/configs/Permission-Groups.html @@ -87,8 +87,10 @@ + + @@ -298,7 +300,7 @@ generated by LDoc diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html index f1c5fe11..b7c4b928 100644 --- a/docs/configs/Player-List.html +++ b/docs/configs/Player-List.html @@ -88,8 +88,10 @@ + + @@ -815,7 +817,7 @@ generated by LDoc diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html index 8f6800a8..2f6d8514 100644 --- a/docs/configs/Pollution-Grading.html +++ b/docs/configs/Pollution-Grading.html @@ -87,8 +87,10 @@ + + @@ -387,7 +389,7 @@ generated by LDoc diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html index 3148caa2..dc478298 100644 --- a/docs/configs/Popup-Messages.html +++ b/docs/configs/Popup-Messages.html @@ -87,8 +87,10 @@ + + @@ -417,7 +419,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html index 41594ef5..79e279ad 100644 --- a/docs/configs/Preset-Player-Colours.html +++ b/docs/configs/Preset-Player-Colours.html @@ -87,8 +87,10 @@ + + @@ -327,7 +329,7 @@ generated by LDoc diff --git a/docs/configs/Preset-Player-Quickbar.html b/docs/configs/Preset-Player-Quickbar.html index 81ac064b..127715e0 100644 --- a/docs/configs/Preset-Player-Quickbar.html +++ b/docs/configs/Preset-Player-Quickbar.html @@ -79,8 +79,10 @@ + + @@ -240,7 +242,7 @@ generated by LDoc diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html index ba7df4b5..c9aea8e7 100644 --- a/docs/configs/Repair.html +++ b/docs/configs/Repair.html @@ -87,8 +87,10 @@ + + @@ -417,7 +419,7 @@ generated by LDoc diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html index 89fa28f2..c349fcd6 100644 --- a/docs/configs/Rockets.html +++ b/docs/configs/Rockets.html @@ -87,8 +87,10 @@ + + @@ -837,7 +839,7 @@ generated by LDoc diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html index 5ec16347..0126bc4a 100644 --- a/docs/configs/Roles.html +++ b/docs/configs/Roles.html @@ -87,8 +87,10 @@ + + @@ -295,7 +297,7 @@ generated by LDoc diff --git a/docs/configs/Science.html b/docs/configs/Science.html index 056d6ddd..184f0085 100644 --- a/docs/configs/Science.html +++ b/docs/configs/Science.html @@ -87,8 +87,10 @@ + + @@ -357,7 +359,7 @@ generated by LDoc diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html index a95626c1..505eb968 100644 --- a/docs/configs/Scorched-Earth.html +++ b/docs/configs/Scorched-Earth.html @@ -87,8 +87,10 @@ + + @@ -391,7 +393,7 @@ generated by LDoc diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html index 8b1fad7f..d46308ac 100644 --- a/docs/configs/Spawn-Area.html +++ b/docs/configs/Spawn-Area.html @@ -87,8 +87,10 @@ + + @@ -747,7 +749,7 @@ generated by LDoc diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html index c010dd30..cad9627f 100644 --- a/docs/configs/Tasks.html +++ b/docs/configs/Tasks.html @@ -87,8 +87,10 @@ + + @@ -387,7 +389,7 @@ generated by LDoc diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html index 25e9f049..bde17b16 100644 --- a/docs/configs/Warnings.html +++ b/docs/configs/Warnings.html @@ -87,8 +87,10 @@ + + @@ -358,7 +360,7 @@ generated by LDoc diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html index 93b734a5..b1976aea 100644 --- a/docs/configs/Warps.html +++ b/docs/configs/Warps.html @@ -87,8 +87,10 @@ + + @@ -777,7 +779,7 @@ generated by LDoc diff --git a/docs/configs/inventory_clear.html b/docs/configs/inventory_clear.html index 735bcfeb..bedc32c6 100644 --- a/docs/configs/inventory_clear.html +++ b/docs/configs/inventory_clear.html @@ -79,8 +79,10 @@ + + @@ -240,7 +242,7 @@ generated by LDoc diff --git a/docs/control/Jail.html b/docs/control/Jail.html index 1d1dc63e..75303250 100644 --- a/docs/control/Jail.html +++ b/docs/control/Jail.html @@ -69,8 +69,10 @@ + + @@ -1211,7 +1213,7 @@ generated by LDoc diff --git a/docs/control/Production.html b/docs/control/Production.html index e446944c..5e9f256e 100644 --- a/docs/control/Production.html +++ b/docs/control/Production.html @@ -69,8 +69,10 @@ + + @@ -1332,7 +1334,7 @@ generated by LDoc diff --git a/docs/control/Reports.html b/docs/control/Reports.html index 26b3f059..ccfd5a8b 100644 --- a/docs/control/Reports.html +++ b/docs/control/Reports.html @@ -69,8 +69,10 @@ + + @@ -1113,7 +1115,7 @@ generated by LDoc diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html index 0841f8fc..e48c254c 100644 --- a/docs/control/Rockets.html +++ b/docs/control/Rockets.html @@ -68,8 +68,10 @@ + + @@ -987,7 +989,7 @@ generated by LDoc diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html index 9c1656ae..5856ec42 100644 --- a/docs/control/Tasks.html +++ b/docs/control/Tasks.html @@ -68,8 +68,10 @@ + + @@ -1001,7 +1003,7 @@ Tasks.update_task(task_id, 'We need more iron!', gam generated by LDoc diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html index 4e950b38..78146b3c 100644 --- a/docs/control/Warnings.html +++ b/docs/control/Warnings.html @@ -68,8 +68,10 @@ + + @@ -1468,7 +1470,7 @@ generated by LDoc diff --git a/docs/control/Warps.html b/docs/control/Warps.html index 5ebcaf6a..40c9c942 100644 --- a/docs/control/Warps.html +++ b/docs/control/Warps.html @@ -69,8 +69,10 @@ + + @@ -1538,7 +1540,7 @@ Warps.make_warp_tag(warp_id) generated by LDoc diff --git a/docs/core/Async.html b/docs/core/Async.html index 4bea00c1..17551cde 100644 --- a/docs/core/Async.html +++ b/docs/core/Async.html @@ -53,8 +53,10 @@ + + @@ -601,7 +603,7 @@ Async.register(function(player, message) generated by LDoc diff --git a/docs/core/Commands.html b/docs/core/Commands.html index 924e5c7a..91eac693 100644 --- a/docs/core/Commands.html +++ b/docs/core/Commands.html @@ -59,8 +59,10 @@ + + @@ -2386,7 +2388,7 @@ nb: returning any value from your callback will trigger this function, return th generated by LDoc diff --git a/docs/core/Common.html b/docs/core/Common.html index 9a0d4cdf..7b122edb 100644 --- a/docs/core/Common.html +++ b/docs/core/Common.html @@ -56,8 +56,10 @@ + + @@ -2755,7 +2757,7 @@ https://github.com/Refactorio/RedMew/blob/9184b2940f311d8c9c891e83429fc57ec7e0c4 generated by LDoc diff --git a/docs/core/Datastore.html b/docs/core/Datastore.html new file mode 100644 index 00000000..3a878064 --- /dev/null +++ b/docs/core/Datastore.html @@ -0,0 +1,2871 @@ + + + + + + + + Datastore core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

Datastore core

+

Core Module - Datastore +- A module used to store data in the global table with the option to have it sync to an external source.

+

+ + + + + + +

Usage

+
-- Types of Datastore
+-- This datastore will not save data externally and can be used to watch for updates on values within it
+-- A common use might be to store data for a gui and only update the gui when a value changes
+local LocalDatastore = Datastore.connect('LocalDatastore')
+
+-- This datastore will allow you to use the save and request method, this allows you to have persistent data
+-- Should be used over auto save as it creates less save requests, but this means you need to tell the data to be saved
+-- We use this type for player data as we know the data only needs to be saved when the player leaves
+local PersistentDatastore = Datastore.connect('PersistentDatastore', true) -- save_to_disk
+
+-- This datastore is the same as above but the save method will be called automatically when ever you change a value
+-- An auto save datastore should be used if the data does not change often, this can be global settings and things of that sort
+-- If it is at all possible to setup events to unload and/or save the data then this is preferable
+local AutosaveDatastore = Datastore.connect('AutosaveDatastore', true, true) -- save_to_disk, auto_save
+
+-- Finally you can have a datastore that propagates its changes to all other connected servers, this means request does not need to be used
+-- This should be used when you might have data conflicts while saving, this is done by pushing the saved value to all active servers
+-- The request method has little use after server start as any external changes to the value will be pushed automatically
+-- Auto save can also be used with this type and you should follow the same guidelines above for when this should be avoided
+local PropagateDatastore = Datastore.connect('PropagateDatastore', true, false, true) -- save_to_disk, propagate_changes
+
+
-- Using Datastores Locally
+-- Once you have your datastore connection setup, any further requests with connect will return the same datastore
+-- This is important to know because the settings passed as parameters you have an effect when it is first created
+
+-- One useful thing that you might want to set up before runtime is a serializer, this will convert non string keys into strings
+-- This serializer will allow use to pass a player object and still have it serialized to the players name
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:set_serializer(function(rawKey)
+    return rawKey.name
+end)
+
+-- If we want to get data from the datastore we can use get or get_all
+local value = ExampleData:get(player, defaultValue)
+local values = ExampleData:get_all()
+
+-- If we want to set data then we can use set, increment, update, or update_all
+ExampleData:set(player, 10)
+ExampleData:increment(player)
+ExampleData:update(player, function(player_name, value)
+    return value * 2
+end)
+ExampleData:update_all(function(player_name, value)
+    return value * 2
+end)
+
+-- If we want to remove data then we use remove
+ExampleData:remove(player)
+
+-- We can also listen for updates to a value done by any of the above methods with on_update
+ExampleData:on_update(function(player_name, value)
+    game.print(player_name..' has had their example data updated to '..tostring(value))
+end)
+
-- Using Datastore Externally
+-- If save_to_disk is used then this opens up the option for persistent data which you can request, save, and remove
+-- All of the local methods are still usable put now there is the option for extra events
+-- In order for this to work there must be an external script to read datastore.pipe and inject with Datastore.ingest
+
+-- To request data you would use request and the on_load event, this event can be used to modify data before it is used
+ExampleData:request(player)
+ExampleData:on_load(function(player_name, value)
+    game.print('Loaded example data for '..player_name)
+    -- A value can be returned here to overwrite the received value
+end)
+
+-- To save data you would use save and the on_save event, this event can be used to modify data before it is saved
+ExampleData:save(player)
+ExampleData:on_save(function(player_name, value)
+    game.print('Saved example data for '..player_name)
+    -- A value can be returned here to overwrite the value which is saved
+end)
+
+-- To remove data locally but not externally, like if a player logs off, you would use unload and on_unload
+ExampleData:unload(player)
+ExampleData:on_unload(function(player_name, value)
+    game.print('Unloaded example data for '..player_name)
+    -- Any return is ignored, this is event is for cleaning up other data
+end)
+
-- Using Datastore Messaging
+-- The message action can be used regardless of save_to_disk being set as no data is saved, but an external script is still required
+-- These messages can be used to send data to other servers which doesnt need to be saved such as shouts or commands
+-- Using messages is quite simple only using message and on_message
+ExampleData:message(key, message)
+ExampleData:on_message(function(key, message)
+    game.print('Received message '..message)
+end)
+
-- Combined Datastores
+-- A combined datastore is a datastore which stores its data inside of another datastore
+-- This means that the data is stored more efficiently in the external database and less requests need to be made
+-- To understand how combined datastores work think of each key in the parent as a table where the sub datastore is a key in that table
+-- Player data is the most used version of the combined datastore, below is how the player data module is setup
+local PlayerData = Datastore.connect('PlayerData', true) -- saveToDisk
+PlayerData:set_serializer(Datastore.name_serializer) -- use player name as key
+PlayerData:combine('Statistics')
+PlayerData:combine('Settings')
+PlayerData:combine('Required')
+
+-- You can then further combine datastores to any depth, below we add some possible settings and statistics that we might use
+-- Although we dont in this example, each of these functions returns the datastore object which you should use as a local value
+PlayerData.Settings:combine('Color')
+PlayerData.Settings:combine('Quickbar')
+PlayerData.Settings:combine('JoinMessage')
+PlayerData.Statistics:combine('Playtime')
+PlayerData.Statistics:combine('JoinCount')
+
+-- Because sub datastore work just like a normal datastore you dont need any special code, using get and set will still return as if it wasnt a sub datastore
+-- Things like the serializer and the datastore settings are always the same as the parent so you dont need to worry about setting up the serializer each time
+-- And because save, request, and unload methods all point to the root datastore you are able to request and save your data as normal
+
+-- If you used get_all on PlayerData this is what you would get:
+{
+    Cooldude2606 = {
+        Settings = {
+            Color = 'ColorValue',
+            Quickbar = 'QuickbarValue',
+            JoinMessage = 'JoinMessageValue'
+        },
+        Statistics = {
+            Playtime = 'PlaytimeValue',
+            JoinCount = 'JoinCountValue'
+        }
+    }
+}
+
+-- If you used get_all on PlayerData.Settings this is what you would get:
+{
+    Cooldude2606 = {
+        Color = 'ColorValue',
+        Quickbar = 'QuickbarValue',
+        JoinMessage = 'JoinMessageValue'
+    }
+}
+
+-- If you used get_all on PlayerData.Settings.Color this is what you would get:
+{
+    Cooldude2606 = 'ColorValue'
+}
+ + + + + + + +

Dependencies

+ + + + + + + +
utils.event
+ + +

Fields

+ + + + + + + + +
global.datastoresSave datastores in the global table
+ + +

Datastore Manager

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
metatableMetatable used on datastores
connect(datastoreName[, saveToDisk=false][, autoSave=false][, propagateChanges=false])Make a new datastore connection, if a connection already exists then it is returned
combine(datastoreName, subDatastoreName)Make a new datastore that stores its data inside of another one
ingest(action, datastoreName, key, valueJson)Ingest the result from a request, this is used through a rcon interface to sync data
debug([datastoreName])Debug, Use to get all datastores, or return debug info on a datastore
name_serializer(rawKey)Commonly used serializer, returns the name of the object
+ + +

Datastore Internal

+ + + + + + + + + + + + + + + + + + + + + + + + +
debug()Debug, Get the debug info for this datastore
raw_get(key[, fromChild=false])Internal, Get data following combine logic
raw_set(key, value)Internal, Set data following combine logic
serialize(rawKey)Internal, Return the serialized key
write_action(action, key, value)Internal, Writes an event to the output file to be saved and/or propagated
+ + +

Datastore Local

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
combine(subDatastoreName)Create a new datastore which is stores its data inside of this datastore
set_serializer(callback)Set a callback that will be used to serialize keys which aren't strings
set_metadata(tags)Set metadata tags on this datastore which can be accessed by other scripts
get(key[, default])Get a value from local storage, option to have a default value
set(key, value)Set a value in local storage, will trigger on_update then on_save, save_to_disk and auto_save is required for on_save
increment(key[, delta=1])Increment the value in local storage, only works for number values, will trigger on_update then on_save, save_to_disk and auto_save is required for on_save
update(key, callback)Use a function to update the value locally, will trigger on_update then on_save, save_to_disk and auto_save is required for on_save
remove(key)Remove a value locally and on the external source, works regardless of propagateChanges
get_all([callback])Get all keys in this datastore, optional filter callback
update_all(callback)Update all keys in this datastore using the same update function
+ + +

Datastore External

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
request(key)Request a value from an external source, will trigger on_load when data is received
save(key)Save a value to an external source, will trigger on_save before data is saved, save_to_disk must be set to true
unload(key)Save a value to an external source and remove locally, will trigger on_unload then on_save, save_to_disk is not required for on_unload
message(key, message)Use to send a message over the connection, works regardless of saveToDisk and propagateChanges
save_all([callback])Save all the keys in the datastore, optional filter callback
unload_all([callback])Unload all the keys in the datastore, optional filter callback
+ + +

Events

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
raise_event(event_name, key[, value][, source])Internal, Raise an event on this datastore
on_loadRegister a callback that triggers when data is loaded from an external source, returned value is saved locally
on_saveRegister a callback that triggers before data is saved, returned value is saved externally
on_unloadRegister a callback that triggers before data is unloaded, returned value is ignored
on_messageRegister a callback that triggers when a message is received, returned value is ignored
on_updateRegister a callback that triggers any time a value is changed, returned value is ignored
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Fields

+
+
+
+
+ # + global.datastores +
+
+
+
+ +

Save datastores in the global table

+

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

Datastore Manager

+
+
+
+
+ # + metatable +
+
+
+
+ +

Metatable used on datastores

+

+ + + Fields: + +
    + + + + + +
  • + + __index + + + + + +
  • + + + + + +
  • + + __newidnex + + + + + +
  • + + + + + +
  • + + __call + + + + + +
  • + + +
+ + + + + + + + + + + + + +
+
+
+
+ # + connect(datastoreName[, saveToDisk=false][, autoSave=false][, propagateChanges=false]) +
+
+
+
+ +

Make a new datastore connection, if a connection already exists then it is returned

+

+ + + Parameters: + +
    + + + + + +
  • + + datastoreName + + : + + (string) + + The name that you want the new datastore to have, this can not have any whitespace + +
  • + + + + + +
  • + + saveToDisk + + : + + (boolean) + + When set to true, using the save method with write the data to datastore.pipe + + (default: false) +
  • + + + + + +
  • + + autoSave + + : + + (boolean) + + When set to true, using any method which modifies data will cause the data to be saved + + (default: false) +
  • + + + + + +
  • + + propagateChanges + + : + + (boolean) + + When set to true, using the save method will send the data to all other connected servers + + (default: false) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + The new datastore connection that can be used to access and modify data in the datastore +
  • +
+ + + + + + + + Usage: +
-- Connecting to the test datastore which will allow saving to disk
+local ExampleData = Datastore.connect('ExampleData', true) -- saveToDisk
+
+ + +
+
+
+
+ # + combine(datastoreName, subDatastoreName) +
+
+
+
+ +

Make a new datastore that stores its data inside of another one

+

+ + + Parameters: + +
    + + + + + +
  • + + datastoreName + + : + + (string) + + The name of the datastore that will contain the data for the new datastore + +
  • + + + + + +
  • + + subDatastoreName + + : + + (string) + + The name of the new datastore, this name will also be used as the key inside the parent datastore + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + The new datastore connection that can be used to access and modify data in the datastore +
  • +
+ + + + + + + + Usage: +
-- Setting up a datastore which stores its data inside of another datastore
+local BarData = Datastore.combine('ExampleData', 'Bar')
+ + +
+
+
+
+ # + ingest(action, datastoreName, key, valueJson) +
+
+
+
+ +

Ingest the result from a request, this is used through a rcon interface to sync data

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + The action that should be done, can be: remove, message, propagate, or request + +
  • + + + + + +
  • + + datastoreName + + : + + (string) + + The name of the datastore that should have the action done to it + +
  • + + + + + +
  • + + key + + : + + (string) + + The key of that datastore that is having the action done to it + +
  • + + + + + +
  • + + valueJson + + : + + (string) + + The json string for the value being ingested, remove does not require a value + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Replying to a data request
+Datastore.ingest('request', 'ExampleData', 'TestKey', 'Foo')
+ + +
+
+
+
+ # + debug([datastoreName]) +
+
+
+
+ +

Debug, Use to get all datastores, or return debug info on a datastore

+

+ + + Parameters: + +
    + + + + + +
  • + + datastoreName + + : + + (string) + + The name of the datastore to get the debug info of + + (optional) +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Get all the datastores
+local datastores = Datastore.debug()
+
-- Getting the debug info for a datastore
+local debug_info = Datastore.debug('ExampleData')
+ + +
+
+
+
+ # + name_serializer(rawKey) +
+
+
+
+ +

Commonly used serializer, returns the name of the object

+

+ + + Parameters: + +
    + + + + + +
  • + + rawKey + + : + + (any) + + The raw key that will be serialized, this can be things like player, force, surface, etc + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + The name of the object that was passed +
  • +
+ + + + + + + + Usage: +
-- Using the name serializer for your datastore
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:set_serializer(Datastore.name_serializer)
+ + +
+
+

Datastore Internal

+
+
+
+
+ # + debug() +
+
+
+
+ +

Debug, Get the debug info for this datastore

+

+ + + + + + Returns: +
    +
  • + (table) + The debug info for this datastore, contains stuff like parent, settings, children, etc +
  • +
+ + + + + + + + Usage: +
-- Get the debug info for a datastore
+local ExampleData = Datastore.connect('ExampleData')
+local debug_info = ExampleData:debug()
+ + +
+
+
+
+ # + raw_get(key[, fromChild=false]) +
+
+
+
+ +

Internal, Get data following combine logic

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (string) + + The key to get the value of from this datastore + +
  • + + + + + +
  • + + fromChild + + : + + (boolean) + + If the get request came from a child of this datastore + + (default: false) +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + The value that was stored at this key in this datastore +
  • +
+ + + + + + + + Usage: +
-- Internal, Get the data from a datastore
+local value = self:raw_get('TestKey')
+ + +
+
+
+
+ # + raw_set(key, value) +
+
+
+
+ +

Internal, Set data following combine logic

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (string) + + The key to set the value of in this datastore + +
  • + + + + + +
  • + + value + + : + + (any) + + The value that will be set at this key + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Internal, Set the value in a datastore
+self:raw_set('TestKey', 'Foo')
+ + +
+
+
+
+ # + serialize(rawKey) +
+
+
+
+ +

Internal, Return the serialized key

+

+ + + Parameters: + +
    + + + + + +
  • + + rawKey + + : + + (any) + + The key that needs to be serialized, if it is already a string then it is returned + +
  • + + +
+ + + + + Returns: +
    +
  • + (string) + The key after it has been serialized +
  • +
+ + + + + + + + Usage: +
-- Internal, Ensure that the key is a string
+key = self:serialize(key)
+ + +
+
+
+
+ # + write_action(action, key, value) +
+
+
+
+ +

Internal, Writes an event to the output file to be saved and/or propagated

+

+ + + Parameters: + +
    + + + + + +
  • + + action + + : + + (string) + + The action that should be wrote to datastore.pipe, can be request, remove, message, save, propagate + +
  • + + + + + +
  • + + key + + : + + (string) + + The key that the action is being preformed on + +
  • + + + + + +
  • + + value + + : + + (any) + + The value that should be used with the action + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Write a data request to datastore.pipe
+self:write_action('request', 'TestKey')
+
-- Write a data save to datastore.pipe
+self:write_action('save', 'TestKey', 'Foo')
+ + +
+
+

Datastore Local

+
+
+
+
+ # + combine(subDatastoreName) +
+
+
+
+ +

Create a new datastore which is stores its data inside of this datastore

+

+ + + Parameters: + +
    + + + + + +
  • + + subDatastoreName + + : + + (string) + + The name of the datastore that will have its data stored in this datastore + +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + The new datastore that was created inside of this datastore +
  • +
+ + + + + + + + Usage: +
-- Add a new sub datastore
+local ExampleData = Datastore.connect('ExampleData')
+local BarData = ExampleData:combine('Bar')
+ + +
+
+
+
+ # + set_serializer(callback) +
+
+
+
+ +

Set a callback that will be used to serialize keys which aren't strings

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + The function that will be used to serialize non string keys passed as an argument + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Set a custom serializer, this would be the same as Datastore.name_serializer
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:set_serializer(function(rawKey)
+    return rawKey.name
+end)
+ + +
+
+
+
+ # + set_metadata(tags) +
+
+
+
+ +

Set metadata tags on this datastore which can be accessed by other scripts

+

+ + + Parameters: + +
    + + + + + +
  • + + tags + + : + + (table) + + A table of tags that you want to set in the metadata for this datastore + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Adding metadata that could be used by a gui to help understand the stored data
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:set_metadata{
+    caption = 'Test Data',
+    tooltip = 'Data used for testing datastores',
+    type = 'table'
+}
+ + +
+
+
+
+ # + get(key[, default]) +
+
+
+
+ +

Get a value from local storage, option to have a default value

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to get the value of, must be a string unless a serializer is set + +
  • + + + + + +
  • + + default + + : + + (any) + + The default value that will be returned if no value is found in the datastore + + (optional) +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Get a key from the datastore, the default will be deep copied if no value exists in the datastore
+local ExampleData = Datastore.connect('ExampleData')
+local value = ExampleData:get('TestKey')
+ + +
+
+
+
+ # + set(key, value) +
+
+
+
+ +

Set a value in local storage, will trigger on_update then on_save, save_to_disk and auto_save is required for on_save

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to set the value of, must be a string unless a serializer is set + +
  • + + + + + +
  • + + value + + : + + (any) + + The value that you want to set for this key + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Set a value in the datastore, this will trigger on_update, if auto_save is true then will trigger save
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:set('TestKey', 'Foo')
+ + +
+
+
+
+ # + increment(key[, delta=1]) +
+
+
+
+ +

Increment the value in local storage, only works for number values, will trigger on_update then on_save, save_to_disk and auto_save is required for on_save

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to increment the value of, must be a string unless a serializer is set + +
  • + + + + + +
  • + + delta + + : + + (number) + + The amount that you want to increment the value by, can be negative or a decimal + + (default: 1) +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Increment a value in a datastore, the value must be a number or nil, if nil 0 is used as the start value
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:increment('TestNumber')
+ + +
+
+
+
+ # + update(key, callback) +
+
+
+
+ +

Use a function to update the value locally, will trigger on_update then on_save, save_to_disk and auto_save is required for on_save

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to apply the update to, must be a string unless a serializer is set + +
  • + + + + + +
  • + + callback + + : + + (function) + + The function that will be used to update the value at this key + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Using a function to update a value, if a value is returned then this will be the new value
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:increment('TestKey', function(key, value)
+    return value..value
+end)
+ + +
+
+
+
+ # + remove(key) +
+
+
+
+ +

Remove a value locally and on the external source, works regardless of propagateChanges

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to remove locally and externally, must be a string unless a serializer is set + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Remove a key locally and externally
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:remove('TestKey')
+ + +
+
+
+
+ # + get_all([callback]) +
+
+
+
+ +

Get all keys in this datastore, optional filter callback

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + The filter function that can be used to filter the results returned + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (table) + All the data that is in this datastore, filtered if a filter was provided +
  • +
+ + + + + + + + Usage: +
-- Get all the data in this datastore
+local ExampleData = Datastore.connect('ExampleData')
+local data = ExampleData:get_all()
+
-- Get all the data in this datastore, with a filter
+local ExampleData = Datastore.connect('ExampleData')
+local data = ExampleData:get_all(function(key, value)
+    return type(value) == 'string'
+end)
+ + +
+
+
+
+ # + update_all(callback) +
+
+
+
+ +

Update all keys in this datastore using the same update function

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + The update function that will be applied to each key + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Get all the data in this datastore, with a filter
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:update_all(function(key, value)
+    return value..value
+end)
+ + +
+
+

Datastore External

+
+
+
+
+ # + request(key) +
+
+
+
+ +

Request a value from an external source, will trigger on_load when data is received

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to request from an external source, must be a string unless a serializer is set + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Request a key from an external source, on_load is triggered when data is received
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:request('TestKey')
+ + +
+
+
+
+ # + save(key) +
+
+
+
+ +

Save a value to an external source, will trigger on_save before data is saved, save_to_disk must be set to true

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to save to an external source, must be a string unless a serializer is set + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Save a key to an external source, save_to_disk must be set to true for there to be any effect
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:save('TestKey')
+ + +
+
+
+
+ # + unload(key) +
+
+
+
+ +

Save a value to an external source and remove locally, will trigger on_unload then on_save, save_to_disk is not required for on_unload

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to unload from the datastore, must be a string unless a serializer is set + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Unload a key from the datastore, get will now return nil and value will be saved externally if save_to_disk is set to true
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:unload('TestKey')
+ + +
+
+
+
+ # + message(key, message) +
+
+
+
+ +

Use to send a message over the connection, works regardless of saveToDisk and propagateChanges

+

+ + + Parameters: + +
    + + + + + +
  • + + key + + : + + (any) + + The key that you want to send a message over, must be a string unless a serializer is set + +
  • + + + + + +
  • + + message + + : + + (any) + + The message that you want to send to other connected servers, or external source + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Send a message to other servers on this key, can listen for messages with on_message
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:message('TestKey', 'Foo')
+ + +
+
+
+
+ # + save_all([callback]) +
+
+
+
+ +

Save all the keys in the datastore, optional filter callback

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + The filter function that can be used to filter the keys saved + + (optional) +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Save all the data in this datastore
+local ExampleData = Datastore.connect('ExampleData')
+local data = ExampleData:save_all()
+
-- Save all the data in this datastore, with a filter
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:save_all(function(key, value)
+    return type(value) == 'string'
+end)
+ + +
+
+
+
+ # + unload_all([callback]) +
+
+
+
+ +

Unload all the keys in the datastore, optional filter callback

+

+ + + Parameters: + +
    + + + + + +
  • + + callback + + : + + (function) + + The filter function that can be used to filter the keys unloaded + + (optional) +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Unload all the data in this datastore
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:unload_all()
+
-- Unload all the data in this datastore, with a filter
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:unload_all(function(key, value)
+    return type(value) == 'string'
+end)
+ + +
+
+

Events

+
+
+
+
+ # + raise_event(event_name, key[, value][, source]) +
+
+
+
+ +

Internal, Raise an event on this datastore

+

+ + + Parameters: + +
    + + + + + +
  • + + event_name + + : + + (string) + + The name of the event to raise for this datastore + +
  • + + + + + +
  • + + key + + : + + (string) + + The key that this event is being raised for + +
  • + + + + + +
  • + + value + + : + + (any) + + The current value that this key has, might be a deep copy of the value + + (optional) +
  • + + + + + +
  • + + source + + : + + (string) + + Where this call came from, used to do event recursion so can be parent or child + + (optional) +
  • + + +
+ + + + + Returns: +
    +
  • + (any) + The value that is left after being passed through all the event handlers +
  • +
+ + + + + + + + Usage: +
-- Internal, Getting the value that should be saved
+value = self:raise_event('on_save', key, value)
+ + +
+
+
+
+ # + on_load +
+
+
+
+ +

Register a callback that triggers when data is loaded from an external source, returned value is saved locally

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + The handler that will be registered to the on_load event + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Adding a handler to on_load, returned value will be saved locally, can be used to deserialize the value beyond a normal json
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:on_load(function(key, value)
+    game.print('Test data loaded for: '..key)
+end)
+ + +
+
+
+
+ # + on_save +
+
+
+
+ +

Register a callback that triggers before data is saved, returned value is saved externally

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + The handler that will be registered to the on_load event + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Adding a handler to on_save, returned value will be saved externally, can be used to serialize the value beyond a normal json
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:on_save(function(key, value)
+    game.print('Test data saved for: '..key)
+end)
+ + +
+
+
+
+ # + on_unload +
+
+
+
+ +

Register a callback that triggers before data is unloaded, returned value is ignored

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + The handler that will be registered to the on_load event + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Adding a handler to on_unload, returned value is ignored, can be used to clean up guis or local values related to this data
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:on_load(function(key, value)
+    game.print('Test data unloaded for: '..key)
+end)
+ + +
+
+
+
+ # + on_message +
+
+
+
+ +

Register a callback that triggers when a message is received, returned value is ignored

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + The handler that will be registered to the on_load event + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Adding a handler to on_message, returned value is ignored, can be used to receive messages from other connected servers without saving data
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:on_message(function(key, value)
+    game.print('Test data message for: '..key)
+end)
+ + +
+
+
+
+ # + on_update +
+
+
+
+ +

Register a callback that triggers any time a value is changed, returned value is ignored

+

+ + + +
    + + + + + +
  • + + callback + + : + + (function) + + The handler that will be registered to the on_load event + +
  • + + +
+ + + + + + + + + + + + Usage: +
-- Adding a handler to on_update, returned value is ignored, can be used to update guis or send messages when data is changed
+local ExampleData = Datastore.connect('ExampleData')
+ExampleData:on_update(function(key, value)
+    game.print('Test data updated for: '..key)
+end)
+ + +
+
+ + + +
+
+
+ + + + diff --git a/docs/core/Groups.html b/docs/core/Groups.html index 4c28e6fe..390576d0 100644 --- a/docs/core/Groups.html +++ b/docs/core/Groups.html @@ -56,8 +56,10 @@ + + @@ -1431,7 +1433,7 @@ generated by LDoc diff --git a/docs/core/Gui.html b/docs/core/Gui.html index 3390f92f..67da6d5e 100644 --- a/docs/core/Gui.html +++ b/docs/core/Gui.html @@ -61,8 +61,10 @@ + + @@ -4409,7 +4411,7 @@ Gui.left_toolbar_button('entity/inserter', generated by LDoc diff --git a/docs/core/PlayerData.html b/docs/core/PlayerData.html new file mode 100644 index 00000000..aebb516b --- /dev/null +++ b/docs/core/PlayerData.html @@ -0,0 +1,501 @@ + + + + + + + + PlayerData core + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +

PlayerData core

+

Core Module - PlayerData +- A module used to store player data in a central datastore to minimize data requests and saves.

+

+ + + + + + +

Usage

+
-- Adding a colour setting for players
+local PlayerData = require 'expcore.player_data'
+local PlayerColors = PlayerData.Settings:combine('Color')
+
+-- Set the players color when their data is loaded
+PlayerColors:on_load(function(player_name, color)
+    local player = game.players[player_name]
+    player.color = color
+end)
+
+-- Overwrite the saved color with the players current color
+PlayerColors:on_save(function(player_name, _)
+    local player = game.players[player_name]
+    return player.color -- overwrite existing data with the current color
+end)
+
-- Add a playtime statistic for players
+local Event = require 'utils.event'
+local PlayerData = require 'expcore.player_data'
+local Playtime = PlayerData.Statistics:combine('Playtime')
+
+-- When playtime reaches an hour interval tell the player and say thanks
+Playtime:on_update(function(player_name, playtime)
+    if playtime % 60 == 0 then
+        local hours = playtime / 60
+        local player = game.players[player_name]
+        player.print('Thanks for playing on our servers, you have played for '..hours..' hours!')
+    end
+end)
+
+-- Update playtime for players, data is only loaded for online players so update_all can be used
+Event.add_on_nth_tick(3600, function()
+    Playtime:update_all(function(player_name, playtime)
+        return playtime + 1
+    end)
+end)
+ + + + + + + +

Dependencies

+ + + + + + + + + + + + + + + + +
utils.event
expcore.datastore
expcore.commands
config.expcore.command_general_parse
+ + +

Commands

+ + + + + + + + + + + + +
set-data-preferenceSets your data saving preference
data-preferenceGets your data saving preference
+ + +
+ + +

Dependencies

+
+
+
+
+ # + utils.event +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.datastore +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + expcore.commands +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+ # + config.expcore.command_general_parse +
+
+
+
+ + + + + + + + + + + + + + + +
+
+

Commands

+
+
+
+
+ # + set-data-preference +
+
+
+
+ +

Sets your data saving preference

+

+ + + + + + + + + + + + + + +
+
+
+
+ # + data-preference +
+
+
+
+ +

Gets your data saving preference

+

+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + + + diff --git a/docs/core/Roles.html b/docs/core/Roles.html index f703718c..a2f9b5f5 100644 --- a/docs/core/Roles.html +++ b/docs/core/Roles.html @@ -60,8 +60,10 @@ + + @@ -3338,7 +3340,7 @@ nb: this is one way, failing false after already gaining the role will not revok generated by LDoc diff --git a/docs/core/Store.html b/docs/core/Store.html index 4cf097cc..865d2a0b 100644 --- a/docs/core/Store.html +++ b/docs/core/Store.html @@ -56,8 +56,10 @@ + + @@ -1484,7 +1486,7 @@ Store.set(player_scores, game.player, 10) generated by LDoc diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html index 8ffe6e6e..3741113e 100644 --- a/docs/guis/Player-List.html +++ b/docs/guis/Player-List.html @@ -67,8 +67,10 @@ + + @@ -722,7 +724,7 @@ generated by LDoc diff --git a/docs/guis/Readme.html b/docs/guis/Readme.html index 38ac0062..56f34949 100644 --- a/docs/guis/Readme.html +++ b/docs/guis/Readme.html @@ -67,8 +67,10 @@ + + @@ -759,7 +761,7 @@ generated by LDoc diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html index c1c5383e..77d8f10f 100644 --- a/docs/guis/Rocket-Info.html +++ b/docs/guis/Rocket-Info.html @@ -67,8 +67,10 @@ + + @@ -694,7 +696,7 @@ generated by LDoc diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html index 1397bf4f..d3d73439 100644 --- a/docs/guis/Science-Info.html +++ b/docs/guis/Science-Info.html @@ -67,8 +67,10 @@ + + @@ -573,7 +575,7 @@ generated by LDoc diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html index 27a5fad8..0c48a4ef 100644 --- a/docs/guis/Task-List.html +++ b/docs/guis/Task-List.html @@ -67,8 +67,10 @@ + + @@ -759,7 +761,7 @@ generated by LDoc diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html index 7206002a..9f458d5d 100644 --- a/docs/guis/Warps-List.html +++ b/docs/guis/Warps-List.html @@ -67,8 +67,10 @@ + + @@ -964,7 +966,7 @@ generated by LDoc diff --git a/docs/guis/server-ups.html b/docs/guis/server-ups.html index 8b3b3b8e..ff0d47a2 100644 --- a/docs/guis/server-ups.html +++ b/docs/guis/server-ups.html @@ -68,8 +68,10 @@ + + @@ -440,7 +442,7 @@ generated by LDoc diff --git a/docs/index.html b/docs/index.html index 746fcd7d..554eb376 100644 --- a/docs/index.html +++ b/docs/index.html @@ -58,6 +58,11 @@ Common Core Module - Common - Adds some commonly used functions used in many modules + + + Datastore + Core Module - Datastore +- A module used to store data in the global table with the option to have it sync to an external source. Gui @@ -68,6 +73,11 @@ Groups Core Module - Permission Groups - Permission group making for factorio so you never have to make one by hand again + + + PlayerData + Core Module - PlayerData +- A module used to store player data in a central datastore to minimize data requests and saves. Roles @@ -524,7 +534,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/control.html b/docs/modules/control.html index bf094544..1f630e60 100644 --- a/docs/modules/control.html +++ b/docs/modules/control.html @@ -67,8 +67,10 @@ + + @@ -298,7 +300,7 @@ generated by LDoc diff --git a/docs/modules/modules.addons.station-auto-name.html b/docs/modules/modules.addons.station-auto-name.html index 8babe37f..860b6709 100644 --- a/docs/modules/modules.addons.station-auto-name.html +++ b/docs/modules/modules.addons.station-auto-name.html @@ -67,8 +67,10 @@ + + @@ -296,7 +298,7 @@ Events.set_event_filter(defines.events.on_built_entity, {{filter = "name", name generated by LDoc diff --git a/docs/modules/overrides.debug.html b/docs/modules/overrides.debug.html index fbc3074a..d9ab8c54 100644 --- a/docs/modules/overrides.debug.html +++ b/docs/modules/overrides.debug.html @@ -67,8 +67,10 @@ + + @@ -657,7 +659,7 @@ generated by LDoc diff --git a/docs/modules/overrides.math.html b/docs/modules/overrides.math.html index d631c6f6..f2a6bb08 100644 --- a/docs/modules/overrides.math.html +++ b/docs/modules/overrides.math.html @@ -67,8 +67,10 @@ + + @@ -356,7 +358,7 @@ generated by LDoc diff --git a/docs/modules/overrides.table.html b/docs/modules/overrides.table.html index dcc8f576..c14dd012 100644 --- a/docs/modules/overrides.table.html +++ b/docs/modules/overrides.table.html @@ -69,8 +69,10 @@ + + @@ -2011,7 +2013,7 @@ generated by LDoc diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html index 686d99d2..e01c5afa 100644 --- a/docs/modules/utils.event.html +++ b/docs/modules/utils.event.html @@ -68,8 +68,10 @@ + + @@ -1295,7 +1297,7 @@ generated by LDoc diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html index 7d3a4b74..87d6676f 100644 --- a/docs/modules/utils.event_core.html +++ b/docs/modules/utils.event_core.html @@ -67,8 +67,10 @@ + + @@ -437,7 +439,7 @@ generated by LDoc diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html index 33e87913..1c1421d8 100644 --- a/docs/modules/utils.task.html +++ b/docs/modules/utils.task.html @@ -68,8 +68,10 @@ + + @@ -654,7 +656,7 @@ generated by LDoc diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index 5153e753..aea96aa4 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -53,8 +53,10 @@ + + @@ -792,7 +794,7 @@ Public License instead of this License. But first, please read generated by LDoc diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index 4a614dc5..b6a028b8 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -53,8 +53,10 @@ + + @@ -344,7 +346,7 @@ Please report these errors to [the issues page](issues). generated by LDoc