Added Module: FactorioStdLib

This commit is contained in:
Cooldude2606
2018-05-29 22:00:25 +01:00
parent 0ec7bb919e
commit 3939b13759
31 changed files with 1013 additions and 533 deletions

519
doc/modules/Color.html Normal file
View File

@@ -0,0 +1,519 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>ldoc</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/expcore.guiparts.center.html">expcore.guiparts.center</a></li>
<li><a href="../modules/expcore.guiparts.inputs.html">expcore.guiparts.inputs</a></li>
<li><a href="../modules/expcore.guiparts.left.html">expcore.guiparts.left</a></li>
<li><a href="../modules/expcore.guiparts.popup.html">expcore.guiparts.popup</a></li>
<li><a href="../modules/expcore.guiparts.toolbar.html">expcore.guiparts.toolbar</a></li>
<li><a href="../modules/expcore.commands.html">expcore.commands</a></li>
<li><a href="../modules/expcore.gui.html">expcore.gui</a></li>
<li><a href="../modules/expcore.ranking.html">expcore.ranking</a></li>
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><strong>Color</strong></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
<li><a href="../modules/defines.time.html">defines.time</a></li>
</ul>
<h2>Scripts</h2>
<ul class="nowrap">
<li><a href="../scripts/control.lua.html">control.lua</a></li>
<li><a href="../scripts/index.lua.html">index.lua</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>Color</code></h1>
<p>A defines module for retrieving colors by name.</p>
<p>
Extends the Factorio defines table.</p>
<h3>Usage:</h3>
<ul>
<pre class="example">require(&apos;stdlib/defines/color&apos;)
</pre>
</ul>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#set">set ([color=white[, alpha=1]])</a></td>
<td class="summary">Set a value for the alpha channel in the given color table.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#to_table">to_table (c_arr)</a></td>
<td class="summary">Converts a color in the array format to a color in the table format.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#from_rgb">from_rgb ([r=0[, g=0[, b=0[, a=255]]]])</a></td>
<td class="summary">Converts a color in the rgb format to a color table</td>
</tr>
<tr>
<td class="name" nowrap><a href="#from_hex">from_hex (hex[, alpha=1])</a></td>
<td class="summary">Get a color table with a hexadecimal string.</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#defines.color">defines.color</a></td>
<td class="summary">A table of colors allowing retrieval by color name.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#defines.anticolor">defines.anticolor</a></td>
<td class="summary">Returns white for dark colors or black for lighter colors.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#defines.lightcolor">defines.lightcolor</a></td>
<td class="summary">Returns a lighter color of a named color.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "set"></a>
<strong>set ([color=white[, alpha=1]])</strong>
</dt>
<dd>
Set a value for the alpha channel in the given color table.
`color.a` represents the alpha channel in the given color table.
<ul>
<li>If ***alpha*** is given, set `color.a` to it.
<li>If ***alpha*** is not given, and if the given color table does not have a value for `color.a`, set `color.a` to 1.
<li>If ***alpha*** is not given, and if the given color table already has a value for `color.a`, then leave `color.a` alone.
</ul>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../modules/Color.html#defines.color">defines.color</a> or <span class="type">Concepts.Color</span></span>
the color to configure
(<em>default</em> white)
</li>
<li><span class="parameter">alpha</span>
<span class="types"><span class="type">float</span></span>
the alpha value (*[0 - 1]*) to set for the given color
(<em>default</em> 1)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Concepts.Color</span></span>
a color table that has the specified value for the alpha channel
</ol>
</dd>
<dt>
<a name = "to_table"></a>
<strong>to_table (c_arr)</strong>
</dt>
<dd>
Converts a color in the array format to a color in the table format.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">c_arr</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
the color to convert
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Concepts.Color</span></span>
a converted color &mdash; { r = c\_arr[1], g = c\_arr[2], b = c\_arr[3], a = c\_arr[4] }
</ol>
</dd>
<dt>
<a name = "from_rgb"></a>
<strong>from_rgb ([r=0[, g=0[, b=0[, a=255]]]])</strong>
</dt>
<dd>
Converts a color in the rgb format to a color table
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">r</span>
<span class="types"><span class="type">int</span></span>
0-255 red
(<em>default</em> 0)
</li>
<li><span class="parameter">g</span>
<span class="types"><span class="type">int</span></span>
0-255 green
(<em>default</em> 0)
</li>
<li><span class="parameter">b</span>
<span class="types"><span class="type">int</span></span>
0-255 blue
(<em>default</em> 0)
</li>
<li><span class="parameter">a</span>
<span class="types"><span class="type">int</span></span>
0-255 alpha
(<em>default</em> 255)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Concepts.Color</span></span>
</ol>
</dd>
<dt>
<a name = "from_hex"></a>
<strong>from_hex (hex[, alpha=1])</strong>
</dt>
<dd>
Get a color table with a hexadecimal string.
Optionally provide the value for the alpha channel.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">hex</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
hexadecimal color string (#ffffff, not #fff)
</li>
<li><span class="parameter">alpha</span>
<span class="types"><span class="type">float</span></span>
the alpha value to set; such that ***[ 0 &#8924; value &#8924; 1 ]***
(<em>default</em> 1)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Concepts.Color</span></span>
a color table with RGB converted from Hex and with alpha
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "defines.color"></a>
<strong>defines.color</strong>
</dt>
<dd>
A table of colors allowing retrieval by color name.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">white</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">black</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">darkgrey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">grey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">lightgrey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">red</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">darkred</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">lightred</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">green</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">darkgreen</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">lightgreen</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">blue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">darkblue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">lightblue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">orange</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">yellow</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">pink</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">purple</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
<li><span class="parameter">brown</span>
<span class="types"><span class="type">Concepts.Color</span></span>
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">color = defines.color.red</pre>
</ul>
</dd>
<dt>
<a name = "defines.anticolor"></a>
<strong>defines.anticolor</strong>
</dt>
<dd>
Returns white for dark colors or black for lighter colors.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">green</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">grey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">lightblue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">lightgreen</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">lightgrey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">lightred</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">orange</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">white</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">yellow</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.black
</li>
<li><span class="parameter">black</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">blue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">brown</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">darkblue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">darkgreen</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">darkgrey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">darkred</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">pink</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">purple</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
<li><span class="parameter">red</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.white
</li>
</ul>
</dd>
<dt>
<a name = "defines.lightcolor"></a>
<strong>defines.lightcolor</strong>
</dt>
<dd>
Returns a lighter color of a named color.
<h3>Fields:</h3>
<ul>
<li><span class="parameter">white</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.lightgrey
</li>
<li><span class="parameter">grey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.darkgrey
</li>
<li><span class="parameter">lightgrey</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.grey
</li>
<li><span class="parameter">red</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.lightred
</li>
<li><span class="parameter">green</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.lightgreen
</li>
<li><span class="parameter">blue</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.lightblue
</li>
<li><span class="parameter">yellow</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.orange
</li>
<li><span class="parameter">pink</span>
<span class="types"><span class="type">Concepts.Color</span></span>
defines.color.purple
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><strong>modules.expgaminglib.control</strong></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><strong>ExpGamingLib</strong></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -66,44 +66,47 @@
<div id="content">
<h1>Module <code>modules.expgaminglib.control</code></h1>
<p>Loads a table into _G even when sandboxed; will not overwrite values or append to tables; will not work during runtime to avoid desyncs</p>
<h1>Module <code>ExpGamingLib</code></h1>
<p>Adds some common functions used though out all ExpGaming modules</p>
<p></p>
<h3>Usage:</h3>
<h3>Info:</h3>
<ul>
<pre class="example">unpack_to_G{key1=&apos;foo&apos;,key2=&apos;bar&apos;}
</pre>
<li><strong>Author</strong>: Cooldude2606</li>
</ul>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#ExpLib.get_env">ExpLib.get_env ()</a></td>
<td class="name" nowrap><a href="#unpack_to_G">unpack_to_G (tbl)</a></td>
<td class="summary">Loads a table into _G even when sandboxed; will not overwrite values or append to tables; will not work during runtime to avoid desyncs</td>
</tr>
<tr>
<td class="name" nowrap><a href="#get_env">get_env ()</a></td>
<td class="summary">Used to get the current ENV with all _G keys removed; useful when saving function to global</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ExpLib.is_type">ExpLib.is_type (v[, test_type=nil])</a></td>
<td class="name" nowrap><a href="#is_type">is_type (v[, test_type=nil])</a></td>
<td class="summary">Compear types faster for faster valadation of prams</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ExpLib.player_return">ExpLib.player_return (rtn[, colour=defines.colour.white[, player=game.player]])</a></td>
<td class="name" nowrap><a href="#player_return">player_return (rtn[, colour=defines.colour.white[, player=game.player]])</a></td>
<td class="summary">Will return a value of any type to the player/server console, allows colour for in-game players</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ExpLib.tick_to_hour">ExpLib.tick_to_hour (tick)</a></td>
<td class="name" nowrap><a href="#tick_to_hour">tick_to_hour (tick)</a></td>
<td class="summary">Convert ticks to hours</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ExpLib.tick_to_min">ExpLib.tick_to_min (tick)</a></td>
<td class="name" nowrap><a href="#tick_to_min">tick_to_min (tick)</a></td>
<td class="summary">Convert ticks to minutes</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ExpLib.tick_to_display_format">ExpLib.tick_to_display_format (tick)</a></td>
<td class="name" nowrap><a href="#tick_to_display_format">tick_to_display_format (tick)</a></td>
<td class="summary">Converts a tick into a clean format for end user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#ExpLib.gui_tree">ExpLib.gui_tree (root)</a></td>
<td class="name" nowrap><a href="#gui_tree">gui_tree (root)</a></td>
<td class="summary">Used as a way to view the structure of a gui, used for debuging</td>
</tr>
</table>
@@ -116,8 +119,33 @@
<dl class="function">
<dt>
<a name = "ExpLib.get_env"></a>
<strong>ExpLib.get_env ()</strong>
<a name = "unpack_to_G"></a>
<strong>unpack_to_G (tbl)</strong>
</dt>
<dd>
Loads a table into _G even when sandboxed; will not overwrite values or append to tables; will not work during runtime to avoid desyncs
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">tbl</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
table to be unpacked
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">unpack_to_G{key1=<span class="string">'foo'</span>,key2=<span class="string">'bar'</span>}</pre>
</ul>
</dd>
<dt>
<a name = "get_env"></a>
<strong>get_env ()</strong>
</dt>
<dd>
Used to get the current ENV with all _G keys removed; useful when saving function to global
@@ -140,8 +168,8 @@
</dd>
<dt>
<a name = "ExpLib.is_type"></a>
<strong>ExpLib.is_type (v[, test_type=nil])</strong>
<a name = "is_type"></a>
<strong>is_type (v[, test_type=nil])</strong>
</dt>
<dd>
Compear types faster for faster valadation of prams
@@ -176,8 +204,8 @@
</dd>
<dt>
<a name = "ExpLib.player_return"></a>
<strong>ExpLib.player_return (rtn[, colour=defines.colour.white[, player=game.player]])</strong>
<a name = "player_return"></a>
<strong>player_return (rtn[, colour=defines.colour.white[, player=game.player]])</strong>
</dt>
<dd>
Will return a value of any type to the player/server console, allows colour for in-game players
@@ -212,8 +240,8 @@
</dd>
<dt>
<a name = "ExpLib.tick_to_hour"></a>
<strong>ExpLib.tick_to_hour (tick)</strong>
<a name = "tick_to_hour"></a>
<strong>tick_to_hour (tick)</strong>
</dt>
<dd>
Convert ticks to hours
@@ -243,8 +271,8 @@
</dd>
<dt>
<a name = "ExpLib.tick_to_min"></a>
<strong>ExpLib.tick_to_min (tick)</strong>
<a name = "tick_to_min"></a>
<strong>tick_to_min (tick)</strong>
</dt>
<dd>
Convert ticks to minutes
@@ -274,8 +302,8 @@
</dd>
<dt>
<a name = "ExpLib.tick_to_display_format"></a>
<strong>ExpLib.tick_to_display_format (tick)</strong>
<a name = "tick_to_display_format"></a>
<strong>tick_to_display_format (tick)</strong>
</dt>
<dd>
Converts a tick into a clean format for end user
@@ -306,8 +334,8 @@
</dd>
<dt>
<a name = "ExpLib.gui_tree"></a>
<strong>ExpLib.gui_tree (root)</strong>
<a name = "gui_tree"></a>
<strong>gui_tree (root)</strong>
</dt>
<dd>
Used as a way to view the structure of a gui, used for debuging
@@ -343,7 +371,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -33,7 +33,7 @@
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Fields">Fields</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
@@ -50,8 +50,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><strong>FSM</strong></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -73,7 +73,6 @@
<h3>Usage:</h3>
<ul>
<pre class="example">Manager = require(&quot;FactorioSoftmodManager&quot;)
Used to load all other modules that are indexed in index.lua
</pre>
</ul>
<h3>Info:</h3>
@@ -92,27 +91,31 @@
<td class="name" nowrap><a href="#verbose">verbose (rtn, action)</a></td>
<td class="summary">Used to call the output of the verbose when the current state allows it</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#setVerbose">setVerbose</a></td>
<td class="name" nowrap><a href="#setVerbose">setVerbose (settings)</a></td>
<td class="summary">Main logic for allowing verbose at different stages though out the script</td>
</tr>
<tr>
<td class="name" nowrap><a href="#sandbox">sandbox</a></td>
<td class="name" nowrap><a href="#sandbox">sandbox (callback[, env])</a></td>
<td class="summary">Creates a sand box envorment and runs a callback in that sand box; provents global pollution</td>
</tr>
<tr>
<td class="name" nowrap><a href="#loadModules">loadModules</a></td>
<td class="name" nowrap><a href="#loadModules">loadModules ()</a></td>
<td class="summary">Loads the modules that are present in the index list</td>
</tr>
<tr>
<td class="name" nowrap><a href="#error">error</a></td>
<td class="name" nowrap><a href="#error">error (err, callback)</a></td>
<td class="summary">A more detailed replacement for the lua error function to allow for handlers to be added; repleaces default error so error can be used instead of Manager.error</td>
</tr>
<tr>
<td class="name" nowrap><a href="#names">names</a></td>
<td class="name" nowrap><a href="#event">event (event_name, callback)</a></td>
<td class="summary">Event handler that modules can use, each module can register one function per event</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Manager.event.names">Manager.event.names</a></td>
<td class="summary">Sub set to Manger.event and acts as a coverter between event_name and event_id</td>
</tr>
</table>
@@ -178,20 +181,17 @@
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "setVerbose"></a>
<strong>setVerbose</strong>
<strong>setVerbose (settings)</strong>
</dt>
<dd>
Main logic for allowing verbose at different stages though out the script
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<li><span class="parameter">settings</span>
<span class="types"><span class="type">newTbl</span></span>
the table that will be searched for settings to be updated
</li>
@@ -210,19 +210,20 @@
</dd>
<dt>
<a name = "sandbox"></a>
<strong>sandbox</strong>
<strong>sandbox (callback[, env])</strong>
</dt>
<dd>
Creates a sand box envorment and runs a callback in that sand box; provents global pollution
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">function</span>
<span class="types"><span class="type">callback</span></span>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
the function that will be ran in the sandbox
</li>
<li><span class="parameter">any</span>
other params that the function will use
<li><span class="parameter">env</span>
any other params that the function will use
(<em>optional</em>)
</li>
</ul>
@@ -240,7 +241,7 @@
</dd>
<dt>
<a name = "loadModules"></a>
<strong>loadModules</strong>
<strong>loadModules ()</strong>
</dt>
<dd>
Loads the modules that are present in the index list
@@ -261,24 +262,21 @@
</dd>
<dt>
<a name = "error"></a>
<strong>error</strong>
<strong>error (err, callback)</strong>
</dt>
<dd>
A more detailed replacement for the lua error function to allow for handlers to be added; repleaces default error so error can be used instead of Manager.error
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">name</span></span>
|| fucntion the name that is given to the callback || the callback that will be used
<li><span class="parameter">err</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a> or <span class="type">fucntion</span></span>
the string to be passed to handlers; if a function it will register a handler
</li>
<li><span class="parameter">string</span>
<span class="types"><span class="type">name</span></span>
|| fucntion the name that is given to the callback || the callback that will be used
</li>
<li><span class="parameter">function</span>
<span class="types"><span class="type">callback</span></span>
if name is given as a string this will be the callback used
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
if given the err param will be used to given the handler a name
</li>
</ul>
@@ -298,18 +296,53 @@
</dd>
<dt>
<a name = "names"></a>
<strong>names</strong>
<a name = "event"></a>
<strong>event (event_name, callback)</strong>
</dt>
<dd>
Event handler that modules can use, each module can register one function per event
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">event_name</span>
<span class="types"><span class="type">int</span> or <a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
that referes to an event
</li>
<li><span class="parameter">callback</span>
<span class="types"><span class="type">function</span></span>
the function that will be set for that event
</li>
</ul>
<h3>Usage:</h3>
<ul>
<li><pre class="example">Manager.event[event_name] = callback <span class="comment">-- sets the callback for that event</span></pre></li>
<li><pre class="example">Manager.event[event_name] = <span class="keyword">nil</span> <span class="comment">-- clears the callback for that event</span></pre></li>
<li><pre class="example">Manager.event(event_name,callback) <span class="comment">-- sets the callback for that event</span></pre></li>
<li><pre class="example">Manager.event[event_name] <span class="comment">-- returns the callback for that event or the event id if not registered</span></pre></li>
<li><pre class="example">Manager.event(event_name) <span class="comment">-- runs all the call backs for that event</span></pre></li>
<li><pre class="example">Manager.event() <span class="comment">-- returns the stop value for the event proccessor, if returned during an event will stop all other callbacks</span></pre></li>
<li><pre class="example">#Manager.event <span class="comment">-- returns the number of callbacks that are registered</span></pre></li>
<li><pre class="example"><span class="global">pairs</span>(Manager.events) <span class="comment">-- returns event_id,table of callbacks</span></pre></li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Manager.event.names"></a>
<strong>Manager.event.names</strong>
</dt>
<dd>
Sub set to Manger.event and acts as a coverter between event_name and event_id
<ul>
<li><span class="parameter">names</span>
</li>
</ul>
@@ -319,7 +352,7 @@
<h3>Usage:</h3>
<ul>
<pre class="example">Manager.event[event_name] <span class="comment">-- see above, can not be accessed via Manager.event.names</span></pre>
<pre class="example">Manager.event[event_name]</pre>
</ul>
</dd>
@@ -330,7 +363,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><strong>Game</strong></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -224,7 +224,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -50,7 +50,7 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><strong>defines.color</strong></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
@@ -512,7 +512,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:19:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -141,7 +141,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -129,7 +129,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -165,7 +165,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -283,7 +283,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -439,7 +439,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -186,7 +186,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -131,7 +131,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -122,7 +122,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -379,7 +379,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><strong>expcore.server</strong></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -564,7 +564,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><strong>expcore.sync</strong></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><a href="../modules/table.html">table</a></li>
@@ -535,7 +535,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><strong>string</strong></li>
<li><a href="../modules/table.html">table</a></li>
@@ -303,7 +303,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -49,8 +49,8 @@
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
<li><a href="../modules/FSM.html">FSM</a></li>
<li><a href="../modules/modules.expgaminglib.control.html">modules.expgaminglib.control</a></li>
<li><a href="../modules/defines.color.html">defines.color</a></li>
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
<li><a href="../modules/Color.html">Color</a></li>
<li><a href="../modules/Game.html">Game</a></li>
<li><a href="../modules/string.html">string</a></li>
<li><strong>table</strong></li>
@@ -1138,7 +1138,7 @@ some_func(<span class="number">1</span>,<span class="number">2</span>) <span cla
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2018-05-29 20:15:05 </i>
<i style="float:right;">Last updated 2018-05-29 20:54:20 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>