mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
673 lines
20 KiB
HTML
673 lines
20 KiB
HTML
<!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="#Class_table">Class table </a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="nowrap">
|
|
<li><a href="../modules/FSM.html">FSM</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Command.html">ExpGamingCore.Command</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.html">ExpGamingCore.Gui</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.Center.html">ExpGamingCore.Gui.Center</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.Inputs.html">ExpGamingCore.Gui.Inputs</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.Left.html">ExpGamingCore.Gui.Left</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.Popup.html">ExpGamingCore.Gui.Popup</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.Test.html">ExpGamingCore.Gui.Test</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Gui.Toolbar.html">ExpGamingCore.Gui.Toolbar</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Role.html">ExpGamingCore.Role</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
|
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
|
<li><strong>ExpGamingLib</strong></li>
|
|
<li><a href="../modules/StdLib.Color.html">StdLib.Color</a></li>
|
|
<li><a href="../modules/StdLib.Game.html">StdLib.Game</a></li>
|
|
<li><a href="../modules/StdLib.String.html">StdLib.String</a></li>
|
|
<li><a href="../modules/StdLib.Table.html">StdLib.Table</a></li>
|
|
<li><a href="../modules/StdLib.Time.html">StdLib.Time</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>ExpGamingLib</code></h1>
|
|
<p>Adds some common functions used though out all ExpGaming modules</p>
|
|
<p></p>
|
|
<h3>Info:</h3>
|
|
<ul>
|
|
<li><strong>License</strong>: https://github.com/explosivegaming/scenario/blob/master/LICENSE</li>
|
|
<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="#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="#add_metatable">add_metatable (tbl[, callback=tostring[, string=table.tostring]])</a></td>
|
|
<td class="summary">Creats a table that will act like a string and a function</td>
|
|
</tr>
|
|
<tr>
|
|
<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="#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="#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="#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="#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="#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>
|
|
<h2><a href="#Class_table">Class table </a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.val_to_str">table.val_to_str (v)</a></td>
|
|
<td class="summary">Returns a value in a form able to be read as a value, any value to string</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.key_to_str">table.key_to_str (k)</a></td>
|
|
<td class="summary">Returns a value in a form able to be read as a key, any key to string</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.tostring">table.tostring (tbl)</a></td>
|
|
<td class="summary">Returns a table in a form able to be read as a table</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.json">table.json (lua_table)</a></td>
|
|
<td class="summary">Simmilar to table.tostring but converts a lua table to a json one</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.autokey">table.autokey (tbl, str)</a></td>
|
|
<td class="summary">Returns the closest match to a key</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.alphanumsort">table.alphanumsort (tbl)</a></td>
|
|
<td class="summary">Returns the list is a sorted way that would be expected by people (this is by key)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#table.keysort">table.keysort (tbl)</a></td>
|
|
<td class="summary">Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<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="../modules/ExpGamingLib.html#table">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
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the env table with _G keys removed
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">get_env() returns current ENV with _G keys removed</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "add_metatable"></a>
|
|
<strong>add_metatable (tbl[, callback=tostring[, string=table.tostring]])</strong>
|
|
</dt>
|
|
<dd>
|
|
Creats a table that will act like a string and a function
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tbl</span>
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the table that will have its metatable set
|
|
</li>
|
|
<li><span class="parameter">callback</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
the function that will be used for the call
|
|
(<em>default</em> tostring)
|
|
</li>
|
|
<li><span class="parameter">string</span>
|
|
<span class="types"><span class="type">function</span> or <a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
a function that resolves to a string or a string
|
|
(<em>default</em> table.tostring)
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the new table with its metatable set
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">add_metatable({},<span class="keyword">function</span>) <span class="comment">-- returns table</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "is_type"></a>
|
|
<strong>is_type (v[, test_type=nil])</strong>
|
|
</dt>
|
|
<dd>
|
|
Compear types faster for faster valadation of prams
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">v</span>
|
|
the value to be tested
|
|
</li>
|
|
<li><span class="parameter">test_type</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the type to test for if not given then it tests for nil
|
|
(<em>default</em> nil)
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bolean</span></span>
|
|
is v of type test_type
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<li><pre class="example">is_type(<span class="string">'foo'</span>,<span class="string">'string'</span>) <span class="comment">-- return true</span></pre></li>
|
|
<li><pre class="example">is_type(<span class="string">'foo'</span>) <span class="comment">-- return false</span></pre></li>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<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
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">rtn</span>
|
|
any value of any type that will be returned to the player or console
|
|
</li>
|
|
<li><span class="parameter">colour</span>
|
|
<span class="types"><span class="type">defines.color</span> or <a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the colour of the text for the player, ingroned when printing to console
|
|
(<em>default</em> defines.colour.white)
|
|
</li>
|
|
<li><span class="parameter">player</span>
|
|
<span class="types"><span class="type">LuaPlayer</span></span>
|
|
the player that return will go to, if no game.player then returns to server
|
|
(<em>default</em> game.player)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<li><pre class="example">player_return(<span class="string">'Hello, World!'</span>) <span class="comment">-- returns 'Hello, World!' to game.player or server console</span></pre></li>
|
|
<li><pre class="example">player_return(<span class="string">'Hello, World!'</span>,<span class="string">'green'</span>) <span class="comment">-- returns 'Hello, World!' to game.player with colour green or server console</span></pre></li>
|
|
<li><pre class="example">player_return(<span class="string">'Hello, World!'</span>,<span class="keyword">nil</span>,player) <span class="comment">-- returns 'Hello, World!' to the given player</span></pre></li>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "tick_to_hour"></a>
|
|
<strong>tick_to_hour (tick)</strong>
|
|
</dt>
|
|
<dd>
|
|
Convert ticks to hours
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tick</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
tick to convert to hours
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">number</span></span>
|
|
the number of whole hours from this tick
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">tick_to_hour(<span class="number">216001</span>) <span class="comment">-- return 1</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "tick_to_min"></a>
|
|
<strong>tick_to_min (tick)</strong>
|
|
</dt>
|
|
<dd>
|
|
Convert ticks to minutes
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tick</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
tick to convert to minutes
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">number</span></span>
|
|
the number of whole minutes from this tick
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">tick_to_hour(<span class="number">3601</span>) <span class="comment">-- return 1</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<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
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tick</span>
|
|
<span class="types"><span class="type">number</span></span>
|
|
the tick to convert
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the formated string
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<li><pre class="example">tick_to_display_format(<span class="number">3600</span>) <span class="comment">-- return '1.00 M'</span></pre></li>
|
|
<li><pre class="example">tick_to_display_format(<span class="number">234000</span>) <span class="comment">-- return '1 H 5 M'</span></pre></li>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<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
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">root</span>
|
|
<span class="types"><span class="type">LuaGuiElement</span></span>
|
|
the root to start the tree from
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the table that describes the gui
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">Gui_tree(root) returns all children of gui recusivly</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2 class="section-header has-description"><a name="Class_table"></a>Class table </h2>
|
|
|
|
<div class="section-description">
|
|
Extents the table class
|
|
</div>
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "table.val_to_str"></a>
|
|
<strong>table.val_to_str (v)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns a value in a form able to be read as a value, any value to string
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">v</span>
|
|
value to convert
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the converted value
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="global">table</span>.val_to_str{a=<span class="string">'foo'</span>} <span class="comment">-- return '"foo"'</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "table.key_to_str"></a>
|
|
<strong>table.key_to_str (k)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns a value in a form able to be read as a key, any key to string
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">k</span>
|
|
key to convert
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the converted key
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="global">table</span>.val_to_str{a=<span class="string">'foo'</span>} <span class="comment">-- return '["a"]'</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "table.tostring"></a>
|
|
<strong>table.tostring (tbl)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns a table in a form able to be read as a table
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tbl</span>
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
table to convert
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the converted table
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="global">table</span>.<span class="global">tostring</span>{k1=<span class="string">'foo'</span>,k2=<span class="string">'bar'</span>} <span class="comment">-- return '{["k1"]="foo",["k2"]="bar"}'</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "table.json"></a>
|
|
<strong>table.json (lua_table)</strong>
|
|
</dt>
|
|
<dd>
|
|
Simmilar to table.tostring but converts a lua table to a json one
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">lua_table</span>
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the table to convert
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the table in a json format
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">talbe.json{k1=<span class="string">'foo'</span>,k2=<span class="string">'bar'</span>} <span class="comment">-- return '{"k1":"foo","k2":"bar"}'</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "table.autokey"></a>
|
|
<strong>table.autokey (tbl, str)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns the closest match to a key
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tbl</span>
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the table that will be searched
|
|
</li>
|
|
<li><span class="parameter">str</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
|
the string that will be looked for in the keys
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="global">table</span>.autokey({foo=<span class="number">1</span>,bar=<span class="number">2</span>},<span class="string">'f'</span>) <span class="comment">-- return 1</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "table.alphanumsort"></a>
|
|
<strong>table.alphanumsort (tbl)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns the list is a sorted way that would be expected by people (this is by key)
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tbl</span>
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the table to be sorted
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the sorted table
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">tbl = <span class="global">table</span>.alphanumsort(tbl)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "table.keysort"></a>
|
|
<strong>table.keysort (tbl)</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns the list is a sorted way that would be expected by people (this is by key) (faster alterative than above)
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tbl</span>
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the table to be sorted
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../modules/ExpGamingLib.html#table">table</a></span>
|
|
the sorted table
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">tbl = <span class="global">table</span>.alphanumsort(tbl)</pre>
|
|
</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-06-07 12:58:23 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|