Fixed stores in gui

This commit is contained in:
Cooldude2606
2019-10-15 22:37:48 +01:00
parent 258ca8dbde
commit 3b5c69cfd1
103 changed files with 213 additions and 243 deletions

View File

@@ -348,7 +348,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -349,7 +349,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -376,7 +376,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -585,7 +585,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -349,7 +349,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -404,7 +404,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -460,7 +460,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -404,7 +404,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -320,7 +320,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -404,7 +404,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -376,7 +376,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -388,7 +388,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -500,7 +500,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -361,7 +361,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -388,7 +388,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -365,7 +365,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -360,7 +360,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -404,7 +404,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -458,7 +458,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -416,7 +416,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -611,7 +611,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -389,7 +389,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -360,7 +360,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -388,7 +388,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -321,7 +321,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -585,7 +585,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -557,7 +557,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -389,7 +389,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -443,7 +443,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -484,7 +484,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -569,7 +569,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -506,7 +506,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -237,7 +237,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -485,7 +485,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -294,7 +294,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -320,7 +320,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -442,7 +442,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -354,7 +354,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -338,7 +338,7 @@ see ./expcore/commands.lua for more details</p>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -354,7 +354,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -416,7 +416,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -237,7 +237,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -240,7 +240,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -295,7 +295,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -812,7 +812,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -384,7 +384,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -414,7 +414,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -324,7 +324,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -414,7 +414,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -834,7 +834,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -292,7 +292,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -354,7 +354,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -388,7 +388,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -744,7 +744,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -384,7 +384,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -355,7 +355,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -684,7 +684,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1208,7 +1208,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1329,7 +1329,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1110,7 +1110,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -984,7 +984,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -998,7 +998,7 @@ Tasks.update_task(task_id,<span class="string">'We need more iron!'</span>,game.
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1465,7 +1465,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1563,7 +1563,7 @@ Warps.make_warp_tag(warp_id)</code></pre>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1972,7 +1972,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -2746,7 +2746,7 @@ Common.table_insert(tbl,<span class="number">50</span>,tbl2)</code></pre>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -715,7 +715,7 @@
<td class="summary">Sets the stored value of the radiobutton or the option set if present</td>
</tr>
<tr>
<td class="name"><a href="#Checkbox.new_option_set">Checkbox.new_option_set(name, callback, categorize)</a></td>
<td class="name"><a href="#Checkbox.new_option_set">Checkbox.new_option_set(callback, categorize)</a></td>
<td class="summary">Registers a new option set that can be linked to radiobuttons (only one can be true at a time)</td>
</tr>
<tr>
@@ -963,14 +963,14 @@
</tr>
<tr>
<td class="name"><a href="#Instances.has_categories">Instances.has_categories(name)</a></td>
<td class="summary">Returns if a instance group has a categorise function; must be registered</td>
<td class="summary">Returns if a instance group has a serializer function; must be registered</td>
</tr>
<tr>
<td class="name"><a href="#Instances.is_registered">Instances.is_registered(name)</a></td>
<td class="summary">Returns if the given name is a registered instance group</td>
</tr>
<tr>
<td class="name"><a href="#Instances.register">Instances.register(name[, categorise])</a></td>
<td class="name"><a href="#Instances.register">Instances.register(name[, serializer])</a></td>
<td class="summary">Registers the name of an instance group to allow for storing element instances</td>
</tr>
<tr>
@@ -1019,7 +1019,7 @@
<td class="summary">Extents a prototype with the base functions of all gui prototypes, no metatables</td>
</tr>
<tr>
<td class="name"><a href="#Constructor.store">Constructor.store(sync, callback)</a></td>
<td class="name"><a href="#Constructor.store">Constructor.store(callback)</a></td>
<td class="summary">Creates a new function which adds a store to a gui define</td>
</tr>
<tr>
@@ -1077,15 +1077,15 @@
</tr>
<tr>
<td class="name"><a href="#Prototype:get_store">Prototype:get_store(category)</a></td>
<td class="summary">Gets the value in this elements store, category needed if categorize function used</td>
<td class="summary">Gets the value in this elements store, category needed if serializer function used</td>
</tr>
<tr>
<td class="name"><a href="#Prototype:set_store">Prototype:set_store(category, value)</a></td>
<td class="summary">Sets the value in this elements store, category needed if categorize function used</td>
<td class="summary">Sets the value in this elements store, category needed if serializer function used</td>
</tr>
<tr>
<td class="name"><a href="#Prototype:clear_store">Prototype:clear_store([category])</a></td>
<td class="summary">Sets the value in this elements store to nil, category needed if categorize function used</td>
<td class="summary">Sets the value in this elements store to nil, category needed if serializer function used</td>
</tr>
</tbody>
</table>
@@ -6301,7 +6301,7 @@
<div class="divider divider-custom"></div>
<div class="block section-item-header">
<a href="#Checkbox.new_option_set" class="fragment-hashtag">#</a>
<span class="section-item-title" id="Checkbox.new_option_set">Checkbox.new_option_set(name, callback, categorize)</span>
<span class="section-item-title" id="Checkbox.new_option_set">Checkbox.new_option_set(callback, categorize)</span>
</div>
</dt>
<dd>
@@ -6319,22 +6319,6 @@
<li class="section-subitem-li">
<strong><em>name</em></strong>
<strong> : </strong>
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
the name of the option set, must be unique
</li>
<li class="section-subitem-li">
<strong><em>callback</em></strong>
@@ -9067,7 +9051,7 @@
<dd>
<div class="section-item-body">
<p class="section-item-summary">Returns if a instance group has a categorise function; must be registered</p>
<p class="section-item-summary">Returns if a instance group has a serializer function; must be registered</p>
<p class="section-item-description"></p>
<!-- parameters start -->
@@ -9101,7 +9085,7 @@
<ul>
<li>
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
<span class="return-text">true if there is a categorise function</span>
<span class="return-text">true if there is a serializer function</span>
</li>
</ul>
<!-- returns end -->
@@ -9175,7 +9159,7 @@
<div class="divider divider-custom"></div>
<div class="block section-item-header">
<a href="#Instances.register" class="fragment-hashtag">#</a>
<span class="section-item-title" id="Instances.register">Instances.register(name[, categorise])</span>
<span class="section-item-title" id="Instances.register">Instances.register(name[, serializer])</span>
</div>
</dt>
<dd>
@@ -9211,15 +9195,15 @@
<li class="section-subitem-li">
<strong><em>categorise</em></strong>
<strong><em>serializer</em></strong>
<strong> : </strong>
(<span class="types"><a class="type" href="https://www.lua.org/pil/2.6.html">function</a></span>)
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
(<em>optional</em>)
</li>
@@ -9359,7 +9343,7 @@
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
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
(<em>optional</em>)
</li>
@@ -9433,7 +9417,7 @@
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#string">string</a></span>)
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
(<em>optional</em>)
</li>
@@ -9848,7 +9832,7 @@
<div class="divider divider-custom"></div>
<div class="block section-item-header">
<a href="#Constructor.store" class="fragment-hashtag">#</a>
<span class="section-item-title" id="Constructor.store">Constructor.store(sync, callback)</span>
<span class="section-item-title" id="Constructor.store">Constructor.store(callback)</span>
</div>
</dt>
<dd>
@@ -9866,22 +9850,6 @@
<li class="section-subitem-li">
<strong><em>sync</em></strong>
<strong> : </strong>
(<span class="types"><a class="type" href="http://lua-api.factorio.com/latest/Builtin-Types.html#boolean">boolean</a></span>)
if the function should create a synced store
</li>
<li class="section-subitem-li">
<strong><em>callback</em></strong>
@@ -10666,7 +10634,7 @@
<dd>
<div class="section-item-body">
<p class="section-item-summary">Gets the value in this elements store, category needed if categorize function used</p>
<p class="section-item-summary">Gets the value in this elements store, category needed if serializer function used</p>
<p class="section-item-description"></p>
<!-- parameters start -->
@@ -10723,7 +10691,7 @@
<dd>
<div class="section-item-body">
<p class="section-item-summary">Sets the value in this elements store, category needed if categorize function used</p>
<p class="section-item-summary">Sets the value in this elements store, category needed if serializer function used</p>
<p class="section-item-description"></p>
<!-- parameters start -->
@@ -10796,7 +10764,7 @@
<dd>
<div class="section-item-body">
<p class="section-item-summary">Sets the value in this elements store to nil, category needed if categorize function used</p>
<p class="section-item-summary">Sets the value in this elements store to nil, category needed if serializer function used</p>
<p class="section-item-description"></p>
<!-- parameters start -->
@@ -10987,7 +10955,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1432,7 +1432,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -3152,7 +3152,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -301,6 +301,10 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
<td class="name"><a href="#watchers">watchers</a></td>
<td class="summary">An array of watchers that stores will trigger, key is store uids</td>
</tr>
<tr>
<td class="name"><a href="#file_paths">file_paths</a></td>
<td class="summary">An index used for debuging to find the file where different stores where registered</td>
</tr>
</tbody>
</table>
<table class="section-content-list">
@@ -453,6 +457,33 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
<!-- returns end -->
<!-- see also start -->
<!-- see also end -->
<!-- usage start -->
<!-- usage end -->
</dd>
<dt>
<div class="divider divider-custom"></div>
<div class="block section-item-header">
<a href="#file_paths" class="fragment-hashtag">#</a>
<span class="section-item-title" id="file_paths">file_paths</span>
</div>
</dt>
<dd>
<div class="section-item-body">
<p class="section-item-summary">An index used for debuging to find the file where different stores where registered</p>
<p class="section-item-description"></p>
<!-- parameters start -->
<!-- parameters end -->
<!-- returns start -->
<!-- returns end -->
<!-- see also start -->
<!-- see also end -->
@@ -1433,7 +1464,7 @@ Store.set(player_scores,game.player,<span class="number">10</span>) <span class=
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -544,7 +544,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -626,7 +626,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -629,7 +629,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -449,7 +449,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -632,7 +632,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -837,7 +837,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -514,7 +514,7 @@ see ./expcore/commands.lua for more details</span></td>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -351,7 +351,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -419,7 +419,7 @@ fraction will decide a chance to spawn. 1 alien for 2 spawner's will have 50% on
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1164,7 +1164,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -654,7 +654,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -323,7 +323,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1292,7 +1292,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -434,7 +434,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -353,7 +353,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -441,7 +441,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -752,7 +752,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -1418,7 +1418,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -651,7 +651,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -442,7 +442,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -789,7 +789,7 @@ Public License instead of this License. But first, please read
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

@@ -333,7 +333,7 @@
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
</div>
<div class="content-footer column col-9 col-sm-12">
<i>Last updated 2019-10-13 00:25:15 UTC</i>
<i>Last updated 2019-10-15 22:37:40 UTC</i>
</div>
</div>
</div>

View File

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

View File

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

View File

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

View File

@@ -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)

View File

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

View File

@@ -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{

View File

@@ -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)

View File

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

Some files were not shown because too many files have changed in this diff Show More