diff --git a/docs/addons/Advanced-Start.html b/docs/addons/Advanced-Start.html
index 92e9514b..8fc6a44a 100644
--- a/docs/addons/Advanced-Start.html
+++ b/docs/addons/Advanced-Start.html
@@ -348,7 +348,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Chat-Popups.html b/docs/addons/Chat-Popups.html
index 9b87675a..c9ea0f82 100644
--- a/docs/addons/Chat-Popups.html
+++ b/docs/addons/Chat-Popups.html
@@ -349,7 +349,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Chat-Reply.html b/docs/addons/Chat-Reply.html
index 7a55158f..d6eda160 100644
--- a/docs/addons/Chat-Reply.html
+++ b/docs/addons/Chat-Reply.html
@@ -376,7 +376,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Compilatron.html b/docs/addons/Compilatron.html
index 9d466ac6..4fafcaa9 100644
--- a/docs/addons/Compilatron.html
+++ b/docs/addons/Compilatron.html
@@ -585,7 +585,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Damage-Popups.html b/docs/addons/Damage-Popups.html
index 16d816fe..a445fe5a 100644
--- a/docs/addons/Damage-Popups.html
+++ b/docs/addons/Damage-Popups.html
@@ -349,7 +349,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Death-Logger.html b/docs/addons/Death-Logger.html
index 6c190526..faadc765 100644
--- a/docs/addons/Death-Logger.html
+++ b/docs/addons/Death-Logger.html
@@ -404,7 +404,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Discord-Alerts.html b/docs/addons/Discord-Alerts.html
index a20be316..e0ecba4b 100644
--- a/docs/addons/Discord-Alerts.html
+++ b/docs/addons/Discord-Alerts.html
@@ -460,7 +460,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Player-Colours.html b/docs/addons/Player-Colours.html
index 072aa277..8a60609c 100644
--- a/docs/addons/Player-Colours.html
+++ b/docs/addons/Player-Colours.html
@@ -404,7 +404,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Pollution-Grading.html b/docs/addons/Pollution-Grading.html
index 6b312eca..46baddb7 100644
--- a/docs/addons/Pollution-Grading.html
+++ b/docs/addons/Pollution-Grading.html
@@ -320,7 +320,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Scorched-Earth.html b/docs/addons/Scorched-Earth.html
index a75fc560..c4f4487d 100644
--- a/docs/addons/Scorched-Earth.html
+++ b/docs/addons/Scorched-Earth.html
@@ -404,7 +404,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/addons/Spawn-Area.html b/docs/addons/Spawn-Area.html
index 8a5abbc8..6b3002a3 100644
--- a/docs/addons/Spawn-Area.html
+++ b/docs/addons/Spawn-Area.html
@@ -376,7 +376,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Admin-Chat.html b/docs/commands/Admin-Chat.html
index c50c6b68..04b6b9fe 100644
--- a/docs/commands/Admin-Chat.html
+++ b/docs/commands/Admin-Chat.html
@@ -388,7 +388,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Bonus.html b/docs/commands/Bonus.html
index faf01081..3786a596 100644
--- a/docs/commands/Bonus.html
+++ b/docs/commands/Bonus.html
@@ -500,7 +500,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Cheat-Mode.html b/docs/commands/Cheat-Mode.html
index 356a9c94..81523c11 100644
--- a/docs/commands/Cheat-Mode.html
+++ b/docs/commands/Cheat-Mode.html
@@ -361,7 +361,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Clear-Inventory.html b/docs/commands/Clear-Inventory.html
index e6388451..a250f390 100644
--- a/docs/commands/Clear-Inventory.html
+++ b/docs/commands/Clear-Inventory.html
@@ -388,7 +388,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Debug.html b/docs/commands/Debug.html
index 4ee9fbb0..0af8bb1c 100644
--- a/docs/commands/Debug.html
+++ b/docs/commands/Debug.html
@@ -365,7 +365,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Find.html b/docs/commands/Find.html
index f4592e11..0f1ae48d 100644
--- a/docs/commands/Find.html
+++ b/docs/commands/Find.html
@@ -360,7 +360,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Help.html b/docs/commands/Help.html
index 251496a1..024c376f 100644
--- a/docs/commands/Help.html
+++ b/docs/commands/Help.html
@@ -404,7 +404,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Home.html b/docs/commands/Home.html
index 76775f55..d4881527 100644
--- a/docs/commands/Home.html
+++ b/docs/commands/Home.html
@@ -458,7 +458,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Interface.html b/docs/commands/Interface.html
index 5d22452e..eeaf7d3d 100644
--- a/docs/commands/Interface.html
+++ b/docs/commands/Interface.html
@@ -416,7 +416,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Jail.html b/docs/commands/Jail.html
index 555a57ea..67d43bef 100644
--- a/docs/commands/Jail.html
+++ b/docs/commands/Jail.html
@@ -611,7 +611,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Kill.html b/docs/commands/Kill.html
index 76b5659c..967cb7e1 100644
--- a/docs/commands/Kill.html
+++ b/docs/commands/Kill.html
@@ -389,7 +389,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Me.html b/docs/commands/Me.html
index 04d8d002..fbba050f 100644
--- a/docs/commands/Me.html
+++ b/docs/commands/Me.html
@@ -360,7 +360,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Rainbow.html b/docs/commands/Rainbow.html
index c2addce1..f30d335d 100644
--- a/docs/commands/Rainbow.html
+++ b/docs/commands/Rainbow.html
@@ -388,7 +388,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Repair.html b/docs/commands/Repair.html
index 79684a5a..361a22d7 100644
--- a/docs/commands/Repair.html
+++ b/docs/commands/Repair.html
@@ -321,7 +321,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Reports.html b/docs/commands/Reports.html
index 3675fd4e..f94af164 100644
--- a/docs/commands/Reports.html
+++ b/docs/commands/Reports.html
@@ -585,7 +585,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Roles.html b/docs/commands/Roles.html
index 34b5a762..3bc1f04d 100644
--- a/docs/commands/Roles.html
+++ b/docs/commands/Roles.html
@@ -557,7 +557,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Spawn.html b/docs/commands/Spawn.html
index 3cbff6d4..257da669 100644
--- a/docs/commands/Spawn.html
+++ b/docs/commands/Spawn.html
@@ -389,7 +389,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Tag.html b/docs/commands/Tag.html
index bb3b4d84..63606adc 100644
--- a/docs/commands/Tag.html
+++ b/docs/commands/Tag.html
@@ -443,7 +443,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Teleport.html b/docs/commands/Teleport.html
index 37e00592..472651ba 100644
--- a/docs/commands/Teleport.html
+++ b/docs/commands/Teleport.html
@@ -484,7 +484,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/commands/Warnings.html b/docs/commands/Warnings.html
index e0f3efdb..a62c9b8e 100644
--- a/docs/commands/Warnings.html
+++ b/docs/commands/Warnings.html
@@ -569,7 +569,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Advanced-Start.html b/docs/configs/Advanced-Start.html
index bb81cea4..02b2965a 100644
--- a/docs/configs/Advanced-Start.html
+++ b/docs/configs/Advanced-Start.html
@@ -506,7 +506,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Bonuses.html b/docs/configs/Bonuses.html
index 27e252db..2e3966d2 100644
--- a/docs/configs/Bonuses.html
+++ b/docs/configs/Bonuses.html
@@ -237,7 +237,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Chat-Reply.html b/docs/configs/Chat-Reply.html
index 9e6519d5..727827bc 100644
--- a/docs/configs/Chat-Reply.html
+++ b/docs/configs/Chat-Reply.html
@@ -485,7 +485,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Commands-Auth-Admin.html b/docs/configs/Commands-Auth-Admin.html
index 25e81ce6..fd824730 100644
--- a/docs/configs/Commands-Auth-Admin.html
+++ b/docs/configs/Commands-Auth-Admin.html
@@ -294,7 +294,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Commands-Auth-Roles.html b/docs/configs/Commands-Auth-Roles.html
index d8f86e12..4f49a827 100644
--- a/docs/configs/Commands-Auth-Roles.html
+++ b/docs/configs/Commands-Auth-Roles.html
@@ -320,7 +320,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Commands-Auth-Runtime-Disable.html b/docs/configs/Commands-Auth-Runtime-Disable.html
index eedbf824..9aacac5f 100644
--- a/docs/configs/Commands-Auth-Runtime-Disable.html
+++ b/docs/configs/Commands-Auth-Runtime-Disable.html
@@ -442,7 +442,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Commands-Parse-Roles.html b/docs/configs/Commands-Parse-Roles.html
index ab26c6f2..64d71e20 100644
--- a/docs/configs/Commands-Parse-Roles.html
+++ b/docs/configs/Commands-Parse-Roles.html
@@ -354,7 +354,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Commands-Parse.html b/docs/configs/Commands-Parse.html
index 4ec6ed0a..574f8aa4 100644
--- a/docs/configs/Commands-Parse.html
+++ b/docs/configs/Commands-Parse.html
@@ -338,7 +338,7 @@ see ./expcore/commands.lua for more details
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Compilatron.html b/docs/configs/Compilatron.html
index 4d6d2620..98043b31 100644
--- a/docs/configs/Compilatron.html
+++ b/docs/configs/Compilatron.html
@@ -354,7 +354,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Death-Logger.html b/docs/configs/Death-Logger.html
index 9602becc..859cf7d9 100644
--- a/docs/configs/Death-Logger.html
+++ b/docs/configs/Death-Logger.html
@@ -416,7 +416,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Discord-Alerts.html b/docs/configs/Discord-Alerts.html
index 368bf27b..4139d6e6 100644
--- a/docs/configs/Discord-Alerts.html
+++ b/docs/configs/Discord-Alerts.html
@@ -237,7 +237,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/File-Loader.html b/docs/configs/File-Loader.html
index fc1e5061..8aa4661f 100644
--- a/docs/configs/File-Loader.html
+++ b/docs/configs/File-Loader.html
@@ -240,7 +240,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Permission-Groups.html b/docs/configs/Permission-Groups.html
index ff7cc7f2..305e744d 100644
--- a/docs/configs/Permission-Groups.html
+++ b/docs/configs/Permission-Groups.html
@@ -295,7 +295,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Player-List.html b/docs/configs/Player-List.html
index 8054236d..2c9fc83f 100644
--- a/docs/configs/Player-List.html
+++ b/docs/configs/Player-List.html
@@ -812,7 +812,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Pollution-Grading.html b/docs/configs/Pollution-Grading.html
index 8b2af2cc..64d7f6f0 100644
--- a/docs/configs/Pollution-Grading.html
+++ b/docs/configs/Pollution-Grading.html
@@ -384,7 +384,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Popup-Messages.html b/docs/configs/Popup-Messages.html
index 6dac218a..114b8348 100644
--- a/docs/configs/Popup-Messages.html
+++ b/docs/configs/Popup-Messages.html
@@ -414,7 +414,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Preset-Player-Colours.html b/docs/configs/Preset-Player-Colours.html
index feaf4071..824291f5 100644
--- a/docs/configs/Preset-Player-Colours.html
+++ b/docs/configs/Preset-Player-Colours.html
@@ -324,7 +324,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Repair.html b/docs/configs/Repair.html
index 2055d520..e61920c5 100644
--- a/docs/configs/Repair.html
+++ b/docs/configs/Repair.html
@@ -414,7 +414,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Rockets.html b/docs/configs/Rockets.html
index 10ec31d9..929fbf4c 100644
--- a/docs/configs/Rockets.html
+++ b/docs/configs/Rockets.html
@@ -834,7 +834,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Roles.html b/docs/configs/Roles.html
index 242d61fb..5c7aabf3 100644
--- a/docs/configs/Roles.html
+++ b/docs/configs/Roles.html
@@ -292,7 +292,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Science.html b/docs/configs/Science.html
index 5a57edf3..c9c7fd1c 100644
--- a/docs/configs/Science.html
+++ b/docs/configs/Science.html
@@ -354,7 +354,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Scorched-Earth.html b/docs/configs/Scorched-Earth.html
index d4e60cac..3c038550 100644
--- a/docs/configs/Scorched-Earth.html
+++ b/docs/configs/Scorched-Earth.html
@@ -388,7 +388,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Spawn-Area.html b/docs/configs/Spawn-Area.html
index 3818e287..4395fc07 100644
--- a/docs/configs/Spawn-Area.html
+++ b/docs/configs/Spawn-Area.html
@@ -744,7 +744,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Tasks.html b/docs/configs/Tasks.html
index 4fd21978..1bd48171 100644
--- a/docs/configs/Tasks.html
+++ b/docs/configs/Tasks.html
@@ -384,7 +384,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Warnings.html b/docs/configs/Warnings.html
index f770e411..78291b18 100644
--- a/docs/configs/Warnings.html
+++ b/docs/configs/Warnings.html
@@ -355,7 +355,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/configs/Warps.html b/docs/configs/Warps.html
index aef51683..c8a87917 100644
--- a/docs/configs/Warps.html
+++ b/docs/configs/Warps.html
@@ -684,7 +684,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Jail.html b/docs/control/Jail.html
index c31473b4..46633de1 100644
--- a/docs/control/Jail.html
+++ b/docs/control/Jail.html
@@ -1208,7 +1208,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Production.html b/docs/control/Production.html
index 8c5394a9..ea5291cb 100644
--- a/docs/control/Production.html
+++ b/docs/control/Production.html
@@ -1329,7 +1329,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Reports.html b/docs/control/Reports.html
index db328140..4470dca7 100644
--- a/docs/control/Reports.html
+++ b/docs/control/Reports.html
@@ -1110,7 +1110,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Rockets.html b/docs/control/Rockets.html
index 335b6534..ea2c7aae 100644
--- a/docs/control/Rockets.html
+++ b/docs/control/Rockets.html
@@ -984,7 +984,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Tasks.html b/docs/control/Tasks.html
index c9321fe8..41068882 100644
--- a/docs/control/Tasks.html
+++ b/docs/control/Tasks.html
@@ -998,7 +998,7 @@ Tasks.update_task(task_id,'We need more iron!',game.
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Warnings.html b/docs/control/Warnings.html
index 1ad8e0e1..abec17b0 100644
--- a/docs/control/Warnings.html
+++ b/docs/control/Warnings.html
@@ -1465,7 +1465,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/control/Warps.html b/docs/control/Warps.html
index 49821ac4..ebb0dfb5 100644
--- a/docs/control/Warps.html
+++ b/docs/control/Warps.html
@@ -1563,7 +1563,7 @@ Warps.make_warp_tag(warp_id)
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Commands.html b/docs/core/Commands.html
index f14de469..07dfce01 100644
--- a/docs/core/Commands.html
+++ b/docs/core/Commands.html
@@ -1972,7 +1972,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Common-Library.html b/docs/core/Common-Library.html
index e9d35485..4206d114 100644
--- a/docs/core/Common-Library.html
+++ b/docs/core/Common-Library.html
@@ -2746,7 +2746,7 @@ Common.table_insert(tbl,50,tbl2)
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Gui.html b/docs/core/Gui.html
index a50ba4ed..09dee1fe 100644
--- a/docs/core/Gui.html
+++ b/docs/core/Gui.html
@@ -715,7 +715,7 @@
Sets the stored value of the radiobutton or the option set if present |
- | Checkbox.new_option_set(name, callback, categorize) |
+ Checkbox.new_option_set(callback, categorize) |
Registers a new option set that can be linked to radiobuttons (only one can be true at a time) |
@@ -963,14 +963,14 @@
| Instances.has_categories(name) |
- Returns if a instance group has a categorise function; must be registered |
+ Returns if a instance group has a serializer function; must be registered |
| Instances.is_registered(name) |
Returns if the given name is a registered instance group |
- | Instances.register(name[, categorise]) |
+ Instances.register(name[, serializer]) |
Registers the name of an instance group to allow for storing element instances |
@@ -1019,7 +1019,7 @@
| Extents a prototype with the base functions of all gui prototypes, no metatables |
- | Constructor.store(sync, callback) |
+ Constructor.store(callback) |
Creates a new function which adds a store to a gui define |
@@ -1077,15 +1077,15 @@
| Prototype:get_store(category) |
- Gets the value in this elements store, category needed if categorize function used |
+ Gets the value in this elements store, category needed if serializer function used |
| Prototype:set_store(category, value) |
- Sets the value in this elements store, category needed if categorize function used |
+ Sets the value in this elements store, category needed if serializer function used |
| Prototype:clear_store([category]) |
- Sets the value in this elements store to nil, category needed if categorize function used |
+ Sets the value in this elements store to nil, category needed if serializer function used |
@@ -6301,7 +6301,7 @@
@@ -6319,22 +6319,6 @@
-
-
- name
-
- :
-
- (string)
-
- the name of the option set, must be unique
-
-
-
-
-
-
-
callback
@@ -9067,7 +9051,7 @@
-
Returns if a instance group has a categorise function; must be registered
+
Returns if a instance group has a serializer function; must be registered
@@ -9101,7 +9085,7 @@
-
(boolean)
- true if there is a categorise function
+ true if there is a serializer function
@@ -9175,7 +9159,7 @@
@@ -9211,15 +9195,15 @@
- categorise
+ serializer
:
(function)
function used to turn the element into a string
- categorise param - element LuaGuiElement - the gui element to be turned into a string
- categorise return - string - the category that the element will be added to like the player's name or force's name
+ serializer param - element LuaGuiElement - the gui element to be turned into a string
+ serializer return - string - the category that the element will be added to like the player's name or force's name
(optional)
@@ -9359,7 +9343,7 @@
(string)
- the category to get the instance from, not needed when no categorise function
+ the category to get the instance from, not needed when no serializer function
(optional)
@@ -9433,7 +9417,7 @@
(string)
- the category to get the instances of, not needed when no categorise function
+ the category to get the instances of, not needed when no serializer function
(optional)
@@ -9848,7 +9832,7 @@
@@ -9866,22 +9850,6 @@
-
-
- sync
-
- :
-
- (boolean)
-
- if the function should create a synced store
-
-
-
-
-
-
-
callback
@@ -10666,7 +10634,7 @@
-
Gets the value in this elements store, category needed if categorize function used
+
Gets the value in this elements store, category needed if serializer function used
@@ -10723,7 +10691,7 @@
-
Sets the value in this elements store, category needed if categorize function used
+
Sets the value in this elements store, category needed if serializer function used
@@ -10796,7 +10764,7 @@
-
Sets the value in this elements store to nil, category needed if categorize function used
+
Sets the value in this elements store to nil, category needed if serializer function used
@@ -10987,7 +10955,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Permissions-Groups.html b/docs/core/Permissions-Groups.html
index dd574a66..00b18e72 100644
--- a/docs/core/Permissions-Groups.html
+++ b/docs/core/Permissions-Groups.html
@@ -1432,7 +1432,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Roles.html b/docs/core/Roles.html
index ed416dcd..3f2be0c2 100644
--- a/docs/core/Roles.html
+++ b/docs/core/Roles.html
@@ -3152,7 +3152,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Store.html b/docs/core/Store.html
index 10806138..1d8ad527 100644
--- a/docs/core/Store.html
+++ b/docs/core/Store.html
@@ -301,6 +301,10 @@ Store.set(player_scores,game.player,10) watchers
An array of watchers that stores will trigger, key is store uids |
+
+ | file_paths |
+ An index used for debuging to find the file where different stores where registered |
+
@@ -453,6 +457,33 @@ Store.set(player_scores,game.player,10)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
An index used for debuging to find the file where different stores where registered
+
+
+
+
+
+
+
+
+
@@ -1433,7 +1464,7 @@ Store.set(player_scores,game.player,
10)
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/core/Sudo.html b/docs/core/Sudo.html
index 9a50edd8..23573d85 100644
--- a/docs/core/Sudo.html
+++ b/docs/core/Sudo.html
@@ -544,7 +544,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/guis/Player-List.html b/docs/guis/Player-List.html
index eee69c11..da3e4e7f 100644
--- a/docs/guis/Player-List.html
+++ b/docs/guis/Player-List.html
@@ -626,7 +626,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/guis/Rocket-Info.html b/docs/guis/Rocket-Info.html
index 16e9cadf..cd01fbd5 100644
--- a/docs/guis/Rocket-Info.html
+++ b/docs/guis/Rocket-Info.html
@@ -629,7 +629,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/guis/Science-Info.html b/docs/guis/Science-Info.html
index 3119948b..7a48f8dc 100644
--- a/docs/guis/Science-Info.html
+++ b/docs/guis/Science-Info.html
@@ -449,7 +449,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/guis/Task-List.html b/docs/guis/Task-List.html
index d5ed83fa..44170d3b 100644
--- a/docs/guis/Task-List.html
+++ b/docs/guis/Task-List.html
@@ -632,7 +632,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/guis/Warps-List.html b/docs/guis/Warps-List.html
index f9a3c9b9..196ec539 100644
--- a/docs/guis/Warps-List.html
+++ b/docs/guis/Warps-List.html
@@ -837,7 +837,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/index.html b/docs/index.html
index 07dcc66a..4601a828 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -514,7 +514,7 @@ see ./expcore/commands.lua for more details
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/control.html b/docs/modules/control.html
index 01c09b06..75103f1b 100644
--- a/docs/modules/control.html
+++ b/docs/modules/control.html
@@ -351,7 +351,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.alien_evolution_progress.html b/docs/modules/utils.alien_evolution_progress.html
index e0bff02c..51092a84 100644
--- a/docs/modules/utils.alien_evolution_progress.html
+++ b/docs/modules/utils.alien_evolution_progress.html
@@ -419,7 +419,7 @@ fraction will decide a chance to spawn. 1 alien for 2 spawner's will have 50% on
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.core.html b/docs/modules/utils.core.html
index 2d619cbc..31b33120 100644
--- a/docs/modules/utils.core.html
+++ b/docs/modules/utils.core.html
@@ -1164,7 +1164,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.debug.html b/docs/modules/utils.debug.html
index 89d1652c..3d92af43 100644
--- a/docs/modules/utils.debug.html
+++ b/docs/modules/utils.debug.html
@@ -654,7 +654,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.dump_env.html b/docs/modules/utils.dump_env.html
index f4b29047..e54ef510 100644
--- a/docs/modules/utils.dump_env.html
+++ b/docs/modules/utils.dump_env.html
@@ -323,7 +323,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.event.html b/docs/modules/utils.event.html
index 7bc59dd3..87ca10a6 100644
--- a/docs/modules/utils.event.html
+++ b/docs/modules/utils.event.html
@@ -1292,7 +1292,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.event_core.html b/docs/modules/utils.event_core.html
index f3da2188..e9fcbde4 100644
--- a/docs/modules/utils.event_core.html
+++ b/docs/modules/utils.event_core.html
@@ -434,7 +434,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.math.html b/docs/modules/utils.math.html
index 317d2a54..12045d90 100644
--- a/docs/modules/utils.math.html
+++ b/docs/modules/utils.math.html
@@ -353,7 +353,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.recipe_locker.html b/docs/modules/utils.recipe_locker.html
index fe5b79ca..59d49a86 100644
--- a/docs/modules/utils.recipe_locker.html
+++ b/docs/modules/utils.recipe_locker.html
@@ -441,7 +441,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.state_machine.html b/docs/modules/utils.state_machine.html
index f3fb7488..68e88fea 100644
--- a/docs/modules/utils.state_machine.html
+++ b/docs/modules/utils.state_machine.html
@@ -752,7 +752,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.table.html b/docs/modules/utils.table.html
index 5d70029e..5ffe1e8b 100644
--- a/docs/modules/utils.table.html
+++ b/docs/modules/utils.table.html
@@ -1418,7 +1418,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.task.html b/docs/modules/utils.task.html
index 0d490e35..cfc96b04 100644
--- a/docs/modules/utils.task.html
+++ b/docs/modules/utils.task.html
@@ -651,7 +651,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/modules/utils.timestamp.html b/docs/modules/utils.timestamp.html
index 38a04573..fcf4b838 100644
--- a/docs/modules/utils.timestamp.html
+++ b/docs/modules/utils.timestamp.html
@@ -442,7 +442,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/topics/license.html b/docs/topics/license.html
index 5414825d..1eab766f 100644
--- a/docs/topics/license.html
+++ b/docs/topics/license.html
@@ -789,7 +789,7 @@ Public License instead of this License. But first, please read
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/docs/topics/readme.md.html b/docs/topics/readme.md.html
index b313179f..46789283 100644
--- a/docs/topics/readme.md.html
+++ b/docs/topics/readme.md.html
@@ -333,7 +333,7 @@
generated by LDoc
- Last updated 2019-10-13 00:25:15 UTC
+ Last updated 2019-10-15 22:37:40 UTC
diff --git a/expcore/gui.lua b/expcore/gui.lua
index 6cf395f1..82257d43 100644
--- a/expcore/gui.lua
+++ b/expcore/gui.lua
@@ -105,7 +105,7 @@ Gui.classes.checkbox = Checkbox
Checkbox._prototype_radiobutton:on_store_update(callback) --- Registers a handler for when the stored value updates
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.new_option_set(name,callback,categorize) --- Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
+ Checkbox.new_option_set(callback,categorize) --- Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
Checkbox.draw_option_set(name,element) --- Draws all radiobuttons that are part of an option set at once (Gui.draw will not work)
Checkbox.reset_radiobutton(element,exclude,recursive) --- Sets all radiobuttons in a element to false (unless excluded) and can act recursively
diff --git a/expcore/gui/elements/checkbox.lua b/expcore/gui/elements/checkbox.lua
index 98f50811..ce9b2a8a 100644
--- a/expcore/gui/elements/checkbox.lua
+++ b/expcore/gui/elements/checkbox.lua
@@ -74,14 +74,12 @@ local Checkbox = {
_prototype_checkbox=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
},
_prototype_radiobutton=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
}
}
@@ -96,8 +94,7 @@ function Checkbox.new_checkbox(name)
self:on_draw(function(player,element)
if self.store then
- local category = self.categorize and self.categorize(element) or nil
- local state = self:get_store(category,true)
+ local state = self:get_store(element,true)
if state then element.state = true end
end
end)
@@ -107,13 +104,11 @@ function Checkbox.new_checkbox(name)
if self.option_set then
local value = Checkbox.option_sets[self.option_set][element.name]
- local category = self.categorize and self.categorize(element)
- self:set_store(category,value)
+ self:set_store(element,value)
elseif self.store then
local value = element.state
- local category = self.categorize and self.categorize(element)
- self:set_store(category,value)
+ self:set_store(element,value)
else
self:raise_event('on_element_update',event.player,element,element.state)
@@ -175,15 +170,15 @@ function Checkbox._prototype_radiobutton:set_store(category,value,internal)
end
--- Registers a new option set that can be linked to radiobuttons (only one can be true at a time)
--- @tparam string name the name of the option set, must be unique
-- @tparam function callback the update callback when the value of the option set changes
-- callback param - value string - the new selected option for this option set
-- callback param - category string - the category that updated if categorize was used
-- @tparam function categorize the function used to convert an element into a string
-- @treturn string the name of this option set to be passed to add_as_option
-function Checkbox.new_option_set(name,callback,categorize)
+function Checkbox.new_option_set(callback,categorize)
+ local name = Store.register(categorize)
- Store.register(name,function(value,category)
+ Store.watch(name,function(value,category)
local options = Checkbox.option_sets[name]
for opt_name,define_name in pairs(options) do
if Gui.defines[define_name] then
diff --git a/expcore/gui/elements/dropdown.lua b/expcore/gui/elements/dropdown.lua
index c56eb960..ae6857c0 100644
--- a/expcore/gui/elements/dropdown.lua
+++ b/expcore/gui/elements/dropdown.lua
@@ -47,8 +47,7 @@ local Dropdown = {
_prototype=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
}
}
@@ -71,8 +70,7 @@ function Dropdown.new_dropdown(name)
end
if self.store then
- local category = self.categorize and self.categorize(element) or nil
- local value = self:get_store(category)
+ local value = self:get_store(element)
if value then Dropdown.select_value(element,value) end
end
end)
@@ -82,8 +80,7 @@ function Dropdown.new_dropdown(name)
local value = Dropdown.get_selected_value(element)
if self.store then
- local category = self.categorize and self.categorize(element) or value
- self:set_store(category,value)
+ self:set_store(element,value)
else
local player = event.player
diff --git a/expcore/gui/elements/elem-button.lua b/expcore/gui/elements/elem-button.lua
index e61859bf..8b2b2b3c 100644
--- a/expcore/gui/elements/elem-button.lua
+++ b/expcore/gui/elements/elem-button.lua
@@ -37,8 +37,7 @@ local ElemButton = {
_prototype=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
}
}
@@ -56,8 +55,7 @@ function ElemButton.new_elem_button(name)
end
if self.store then
- local category = self.categorize and self.categorize(element) or nil
- local value = self:get_store(category)
+ local value = self:get_store(element)
if value then element.elem_value = value end
end
end)
@@ -67,8 +65,7 @@ function ElemButton.new_elem_button(name)
local value = element.elem_value
if self.store then
- local category = self.categorize and self.categorize(element) or value
- self:set_store(category,value)
+ self:set_store(element,value)
else
self:raise_event('on_element_update',event.player,element,value)
diff --git a/expcore/gui/elements/progress-bar.lua b/expcore/gui/elements/progress-bar.lua
index 671f11cb..0e096d42 100644
--- a/expcore/gui/elements/progress-bar.lua
+++ b/expcore/gui/elements/progress-bar.lua
@@ -64,8 +64,7 @@ local ProgressBar = {
_prototype=Prototype.extend{
on_complete = Prototype.event,
on_store_complete = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
}
}
@@ -194,11 +193,10 @@ function ProgressBar.new_progressbar(name)
self:on_draw(function(player,element,maximum)
if self.store then
- local category = self.categorize and self.categorize(element) or nil
- local value = self:get_store(category)
+ local value = self:get_store(element)
if not value then
value = self.count_down and 1 or 0
- self:set_store(category,value)
+ self:set_store(element,value)
end
element.value = value
@@ -350,8 +348,7 @@ function ProgressBar._prototype:reset_element(element)
if not element or not element.valid then return end
local value = self.count_down and 1 or 0
if self.store then
- local category = self.categorize and self.categorize(element) or value
- self:set_store(category,value)
+ self:set_store(element,value)
else
element.value = value
end
diff --git a/expcore/gui/elements/slider.lua b/expcore/gui/elements/slider.lua
index 110dd1bd..e8099b06 100644
--- a/expcore/gui/elements/slider.lua
+++ b/expcore/gui/elements/slider.lua
@@ -61,8 +61,7 @@ local Slider = {
_prototype=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
}
}
@@ -88,8 +87,7 @@ function Slider.new_slider(name)
element.set_slider_minimum_maximum(min,max)
if self.store then
- local category = self.categorize and self.categorize(element) or nil
- local value = self:get_store(category)
+ local value = self:get_store(element)
if value then element.slider_value = value end
end
@@ -103,8 +101,7 @@ function Slider.new_slider(name)
local value = element.slider_value
if self.store then
- local category = self.categorize and self.categorize(element) or value
- self:set_store(category,value)
+ self:set_store(element,value)
else
event_call(self,element,value)
@@ -144,8 +141,7 @@ function Slider._prototype:draw_label(element)
local value = 0
if self.store then
- local category = self.categorize and self.categorize(element) or value
- value = self:get_store(category) or 0
+ value = self:get_store(element) or 0
end
local new_element = element.add{
diff --git a/expcore/gui/elements/text.lua b/expcore/gui/elements/text.lua
index 406c4ea0..56709ede 100644
--- a/expcore/gui/elements/text.lua
+++ b/expcore/gui/elements/text.lua
@@ -40,14 +40,12 @@ local Text = {
_prototype_field=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
},
_prototype_box=Prototype.extend{
on_element_update = Prototype.event,
on_store_update = Prototype.event,
- add_store = Prototype.store(false,store_update),
- add_sync_store = Prototype.store(true,store_update)
+ add_store = Prototype.store(store_update)
}
}
@@ -73,8 +71,7 @@ function Text.new_text_field(name)
end
if self.store then
- local category = self.categorize and self.categorize(element) or nil
- local value = self:get_store(category)
+ local value = self:get_store(element)
if value then element.text = value end
end
end)
@@ -84,8 +81,7 @@ function Text.new_text_field(name)
local value = element.text
if self.store then
- local category = self.categorize and self.categorize(element) or value
- self:set_store(category,value)
+ self:set_store(element,value)
else
self:raise_event('on_element_update',event.player,element,value)
diff --git a/expcore/gui/instances.lua b/expcore/gui/instances.lua
index 86fcd11f..2db7273e 100644
--- a/expcore/gui/instances.lua
+++ b/expcore/gui/instances.lua
@@ -15,10 +15,10 @@
the caption of all of them at once; this is where this module comes it.
First you must register the way that the instances are stored and under what name, using Instances.register you will give the
- name of the collective group of instances followed by an optional categorise function which allows variants to be stored under one
+ name of the collective group of instances followed by an optional serializer function which allows variants to be stored under one
name (like one for each force or player)
- -- categorise works in the same way as store categorise
+ -- serializer works in the same way as store serializer
-- so the function will world here but no value is stored only gui elements
Instances.register('score',Gui.categorize_by_force)
@@ -34,7 +34,7 @@
element.caption = 0
end)
- Note that if you don't give a categorise function then you don't need to give a category when getting the elements.
+ Note that if you don't give a serializer function then you don't need to give a category when getting the elements.
>>>> Using unregistered instance groups
When using a registered group and the functions that go with them it is much simpler to use and more importantly includes error checking
@@ -72,9 +72,9 @@
end) -- gets all instances and sets the element caption to 0
>>>> Functions
- Instances.has_categories(name) --- Returns if a instance group has a categorise function; must be registered
+ Instances.has_categories(name) --- Returns if a instance group has a serializer function; must be registered
Instances.is_registered(name) --- Returns if the given name is a registered instance group
- Instances.register(name,categorise) --- Registers the name of an instance group to allow for storing element instances
+ Instances.register(name,serializer) --- Registers the name of an instance group to allow for storing element instances
Instances.add_element(name,element) --- Adds an element to the instance group under the correct category; must be registered
Instances.get_elements_raw(name,category) --- Gets all element instances without first removing any invalid ones; used internally and must be registered
@@ -86,46 +86,46 @@
local Global = require 'utils.global' --- @dep utils.global
local Instances = {
- categorise={},
+ serializer={},
data={}
}
Global.register(Instances.data,function(tbl)
Instances.data = tbl
end)
---- Returns if a instance group has a categorise function; must be registered
+--- Returns if a instance group has a serializer function; must be registered
-- @tparam string name the name of the instance group
--- @treturn boolean true if there is a categorise function
+-- @treturn boolean true if there is a serializer function
function Instances.has_categories(name)
- return type(Instances.categorise[name]) == 'function'
+ return type(Instances.serializer[name]) == 'function'
end
--- Returns if the given name is a registered instance group
-- @tparam string name the name of the instance group you are testing
-- @treturn boolean true if the name is registered
function Instances.is_registered(name)
- return Instances.categorise[name] ~= nil
+ return Instances.serializer[name] ~= nil
end
--- Registers the name of an instance group to allow for storing element instances
-- @tparam string name the name of the instance group; must to unique
--- @tparam[opt] function categorise function used to turn the element into a string
--- categorise param - element LuaGuiElement - the gui element to be turned into a string
--- categorise return - string - the category that the element will be added to like the player's name or force's name
+-- @tparam[opt] function serializer function used to turn the element into a string
+-- serializer param - element LuaGuiElement - the gui element to be turned into a string
+-- serializer return - string - the category that the element will be added to like the player's name or force's name
-- @treturn string the name that was added so it can be used as a variable
-function Instances.register(name,categorise)
+function Instances.register(name,serializer)
if _LIFECYCLE ~= _STAGE.control then
return error('Can only be called during the control stage', 2)
end
- if Instances.categorise[name] then
+ if Instances.serializer[name] then
return error('Instances for '..name..' already exist.',2)
end
- categorise = type(categorise) == 'function' and categorise or true
+ serializer = type(serializer) == 'function' and serializer or true
Instances.data[name] = {}
- Instances.categorise[name] = categorise
+ Instances.serializer[name] = serializer
return name
end
@@ -134,12 +134,12 @@ end
-- @tparam string name the name of the instance group to add the element to
-- @tparam LuaGuiElement element the element to add the the instance group
function Instances.add_element(name,element)
- if not Instances.categorise[name] then
+ if not Instances.serializer[name] then
return error('Invalid name for instance group: '..name,2)
end
if Instances.has_categories(name) then
- local category = Instances.categorise[name](element)
+ local category = Instances.serializer[name](element)
if not Instances.data[name][category] then Instances.data[name][category] = {} end
table.insert(Instances.data[name][category],element)
else
@@ -149,10 +149,10 @@ end
--- Gets all element instances without first removing any invalid ones; used internally and must be registered
-- @tparam string name the name of the instance group to get the instances of
--- @tparam[opt] string category the category to get the instance from, not needed when no categorise function
+-- @tparam[opt] string category the category to get the instance from, not needed when no serializer function
-- @treturn table the table of element instances of which some may be invalid
function Instances.get_elements_raw(name,category)
- if not Instances.categorise[name] then
+ if not Instances.serializer[name] then
return error('Invalid name for instance group: '..name,2)
end
@@ -165,24 +165,24 @@ end
--- Gets all valid element instances and has the option of running a callback on those that are valid
-- @tparam string name the name of the instance group to get the instances of
--- @tparam[opt] string category the category to get the instances of, not needed when no categorise function
+-- @tparam[opt] string category the category to get the instances of, not needed when no serializer function
-- @tparam[opt] function callback when given the callback will be ran on all valid elements
-- callback param - element LuaGuiElement - the current valid element
-- @treturn table the table of element instances with all invalid ones removed
function Instances.get_valid_elements(name,category,callback)
- if not Instances.categorise[name] then
+ if not Instances.serializer[name] then
return error('Invalid name for instance group: '..name,2)
end
category = category or callback
local elements = Instances.get_elements_raw(name,category)
- local categorise = Instances.has_categories(name)
+ local serializer = Instances.has_categories(name)
for key,element in pairs(elements) do
if not element or not element.valid then
elements[key] = nil
else
- if categorise and callback then callback(element)
+ if serializer and callback then callback(element)
elseif category then category(element) end
end
end
diff --git a/expcore/gui/prototype.lua b/expcore/gui/prototype.lua
index a98dece7..790375aa 100644
--- a/expcore/gui/prototype.lua
+++ b/expcore/gui/prototype.lua
@@ -27,9 +27,9 @@
Prototype:raise_event(event_name,...) --- Raises a custom event for this define, any number of params can be given
Prototype:draw_to(element,...) --- The main function for defines, when called will draw an instance of this define to the given element
- Prototype:get_store(category) --- Gets the value in this elements store, category needed if categorize function used
- Prototype:set_store(category,value) --- Sets the value in this elements store, category needed if categorize function used
- Prototype:clear_store(category) --- Sets the value in this elements store to nil, category needed if categorize function used
+ Prototype:get_store(category) --- Gets the value in this elements store, category needed if serializer function used
+ Prototype:set_store(category,value) --- Sets the value in this elements store, category needed if serializer function used
+ Prototype:clear_store(category) --- Sets the value in this elements store to nil, category needed if serializer function used
]]
local Game = require 'utils.game' --- @dep utils.game
local Store = require 'expcore.store' --- @dep expcore.store
@@ -82,29 +82,22 @@ function Constructor.extend(new_prototype)
end
--- Creates a new function which adds a store to a gui define
--- @tparam boolean sync if the function should create a synced store
-- @tparam function callback the function called when needing to update the value of an element
-- @treturn function the function that will add a store for this define
-function Constructor.store(sync,callback)
- --- Adds a store for the define that is shared between all instances of the define in the same category, categorize is a function that returns a string
+function Constructor.store(callback)
+ --- Adds a store for the define that is shared between all instances of the define in the same category, serializer is a function that returns a string
-- @tparam self table the gui define being acted on
- -- @tparam[opt] string location a unique location identifier, when omitted a uid location will be used, use when sync is set to true
- -- @tparam[opt] function categorize function used to determine the category of a LuaGuiElement, when omitted all share one single category
- -- categorize param - LuaGuiElement element - the element that needs to be converted
- -- categorize return - string - a deterministic string that references to a category such as player name or force name
+ -- @tparam[opt] function serializer function used to determine the category of a LuaGuiElement, when omitted all share one single category
+ -- serializer param - LuaGuiElement element - the element that needs to be converted
+ -- serializer return - string - a deterministic string that references to a category such as player name or force name
-- @treturn self the element define to allow chaining
- return function(self,location,categorize)
+ return function(self,serializer)
if self.store then return end
+ serializer = serializer or function() return '' end
- if not sync then
- categorize = location
- location = Store.register()
- end
+ self.store = Store.register(serializer)
- self.store = location
- self.categorize = categorize
-
- Instances.register(self.name,self.categorize)
+ Instances.register(self.name,serializer)
Store.watch(self.store,function(value,category)
self:raise_event('on_store_update',value,category)
@@ -274,12 +267,12 @@ function Prototype:draw_to(element,...)
Instances.add_element(self.name,new_element)
end
- self:raise_event('on_draw',player,new_element)
+ self:raise_event('on_draw',player,new_element,...)
return new_element
end
---- Gets the value in this elements store, category needed if categorize function used
+--- Gets the value in this elements store, category needed if serializer function used
-- @tparam string category[opt] the category to get such as player name or force name
-- @treturn any the value that is stored for this define
function Prototype:get_store(category)
@@ -287,7 +280,7 @@ function Prototype:get_store(category)
return Store.get(self.store,category)
end
---- Sets the value in this elements store, category needed if categorize function used
+--- Sets the value in this elements store, category needed if serializer function used
-- @tparam string category[opt] the category to get such as player name or force name
-- @tparam any value the value to set for this define, must be valid for its type ie for checkbox etc
-- @treturn boolean true if the value was set
@@ -296,7 +289,7 @@ function Prototype:set_store(category,value)
return Store.set(self.store,category,value)
end
---- Sets the value in this elements store to nil, category needed if categorize function used
+--- Sets the value in this elements store to nil, category needed if serializer function used
-- @tparam[opt] string category the category to get such as player name or force name
-- @treturn boolean true if the value was set
function Prototype:clear_store(category)
diff --git a/expcore/gui/test.lua b/expcore/gui/test.lua
index a7fe9952..37cc54f8 100644
--- a/expcore/gui/test.lua
+++ b/expcore/gui/test.lua
@@ -279,7 +279,7 @@ Gui.new_radiobutton('test-radiobutton-store')
end)
local radiobutton_option_set =
-Gui.new_radiobutton_option_set('gui.test.share',function(value,category)
+Gui.new_radiobutton_option_set(function(value,category)
game.print('Radiobutton option set for: '..category..' is now: '..tostring(value))
end,Gui.categorize_by_player)
diff --git a/modules/gui/warp-list.lua b/modules/gui/warp-list.lua
index a1b50dc2..c94c54fa 100644
--- a/modules/gui/warp-list.lua
+++ b/modules/gui/warp-list.lua
@@ -437,7 +437,7 @@ end)
Warps.on_update(warp_list 'update_all')
--- When the player leaves or enters range of a warp this is triggered
-Store.register(player_in_range_store,function(value,player_name)
+Store.watch(player_in_range_store,function(value,player_name)
local player = game.players[player_name]
local force = player.force
local frame = warp_list:get_frame(player_name)