mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Updated Doc
This commit is contained in:
@@ -155,7 +155,7 @@ Manager.verbose('Current state is now: "selfInit"; The verbose state is: '..tost
|
||||
-- @treturn table the new global table for that module
|
||||
Manager.global=setmetatable({__defaults={},__global={
|
||||
__call=function(tbl,default) return Manager.global(default) end,
|
||||
__index=function(tbl,key) return Manager.global() == tbl and nil or rawget(Manager.global(),key) end,
|
||||
__index=function(tbl,key) return Manager.global() == tbl and nil or rawget(Manager.global(),key) or tbl(key) end,
|
||||
__newindex=function(tbl,key,value) rawset(Manager.global(),key,value) end,
|
||||
__pairs=function(tbl)
|
||||
local tbl = Manager.global()
|
||||
@@ -185,12 +185,10 @@ Manager.global=setmetatable({__defaults={},__global={
|
||||
end
|
||||
return global
|
||||
end,
|
||||
__index=function(tbl,key) Manager.verbose('Manager Index') return rawget(tbl(),key) or rawget(_G.global,key) end,
|
||||
__index=function(tbl,key) return rawget(tbl(),key) or rawget(_G.global,key) or tbl(key) end,
|
||||
__newindex=function(tbl,key,value) rawset(tbl(),key,value) end,
|
||||
__pairs=function(tbl)
|
||||
Manager.verbose('Manager Pair 1')
|
||||
local tbl = Manager.global()
|
||||
Manager.verbose('Manager Pair 2')
|
||||
local function next_pair(tbl,k)
|
||||
k, v = next(tbl, k)
|
||||
if type(v) ~= nil then return k,v end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
new_type('command','Commands',false,'param')
|
||||
new_type('event','Commands',false,'field')
|
||||
new_type('gui','Commands')
|
||||
new_type('event','Events',false,'field')
|
||||
new_type('gui','Guis')
|
||||
@@ -39,7 +39,7 @@
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -91,8 +91,8 @@
|
||||
<td class="summary">Add a white bar to any gui frame</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></td>
|
||||
<td class="summary">Returns a rank object given a player or rank name</td>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></td>
|
||||
<td class="summary">A full ranking system for factorio.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></td>
|
||||
@@ -132,7 +132,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
882
doc/modules/ExpGamingCore.Ranking.html
Normal file
882
doc/modules/ExpGamingCore.Ranking.html
Normal file
@@ -0,0 +1,882 @@
|
||||
<!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>
|
||||
<li><a href="#Events">Events</a></li>
|
||||
<li><a href="#Class_Rank">Class Rank </a></li>
|
||||
<li><a href="#Class_Group">Class Group </a></li>
|
||||
<li><a href="#modules_expgamingcore_ranking_src_server_Functions">modules.expgamingcore.ranking.src.server Functions</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.commands.control.html">modules.expgamingcore.commands.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><strong>ExpGamingCore.Ranking</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></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>ExpGamingCore.Ranking</code></h1>
|
||||
<p>A full ranking system for factorio.</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="#output_ranks">output_ranks ([player=server])</a></td>
|
||||
<td class="summary">Outputs as a string all the ranks and the loaded order</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_base_preset">_base_preset (ranks)</a></td>
|
||||
<td class="summary">Used to set the prset ranks that will be given to players</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_rank">get_rank (mixed)</a></td>
|
||||
<td class="summary">Returns a rank object given a player or rank name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#get_group">get_group (mixed)</a></td>
|
||||
<td class="summary">Returns the group object used to sort ranks given group name or rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#print">print (rank_base, rtn[, colour=defines.color.white[, below=false]])</a></td>
|
||||
<td class="summary">Prints to all rank of greater/lower power of the rank given</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#give_rank">give_rank (player[, rank=default[, by_player='server'[, tick=game.tick]]])</a></td>
|
||||
<td class="summary">Gives a user a rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#revert">revert (player[, by_player=nil])</a></td>
|
||||
<td class="summary">Revert the last change to a players rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#find_preset">find_preset (player[, tick=nil])</a></td>
|
||||
<td class="summary">Given that the player has a rank in the preset table it is given; also will attempt to promote players if a time requirement is met</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Tables">Tables</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#global">global</a></td>
|
||||
<td class="summary">Global Table</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#ranks">ranks</a></td>
|
||||
<td class="summary">Contains the location of all the ranks, readonly during runtime</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#ranks">ranks</a></td>
|
||||
<td class="summary">Contains the location of all the rank groups, readonly during runtime</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#meta">meta</a></td>
|
||||
<td class="summary">Contains some meta data about the ranks</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Events">Events</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#rank_change">rank_change</a></td>
|
||||
<td class="summary">Called when there is a rank change for a user</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Class_Rank">Class Rank </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:allowed">Ranking._rank:allowed (action)</a></td>
|
||||
<td class="summary">Is this rank allowed to open this gui or use this command etc.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:get_players">Ranking._rank:get_players ([online=false])</a></td>
|
||||
<td class="summary">Get all the players in this rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:print">Ranking._rank:print (rtn[, colour=defines.color.white[, show_default=false]])</a></td>
|
||||
<td class="summary">Print a message to all players of this rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:edit">Ranking._rank:edit (key, value)</a></td>
|
||||
<td class="summary">Allows for a clean way to edit rank objects</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#Class_Group">Class Group </a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._group:create">Ranking._group:create (obj)</a></td>
|
||||
<td class="summary">Creates a new group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._group:add_rank">Ranking._group:add_rank (obj)</a></td>
|
||||
<td class="summary">Creats a new rank with this group as its group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._group:edit">Ranking._group:edit (key, value)</a></td>
|
||||
<td class="summary">Allows for a clean way to edit rank group objects</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#modules_expgamingcore_ranking_src_server_Functions">modules.expgamingcore.ranking.src.server Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#_comment">_comment ()</a></td>
|
||||
<td class="summary">This file will be loaded when ExpGamingCore.Server is present</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:print">Ranking._rank:print (rtn[, colour=defines.color.white[, show_default=false]])</a></td>
|
||||
<td class="summary">Print a message to all players of this rank</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "output_ranks"></a>
|
||||
<strong>output_ranks ([player=server])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Outputs as a string all the ranks and the loaded order
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
<span class="types"><span class="type">player_name</span>, <span class="type">player_index</span> or <span class="type">LuaPlayer</span></span>
|
||||
the player that the info will be printed to, nil will print to server
|
||||
(<em>default</em> server)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.output_ranks(player) <span class="comment">-- prints to player</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "_base_preset"></a>
|
||||
<strong>_base_preset (ranks)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Used to set the prset ranks that will be given to players
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">ranks</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
table of player names with the player name as the key and rank name as the value
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking._base_preset{name=rank_name,nameTwo=rank_name_two} <span class="comment">-- sets player name to have rank rank_name on join</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_rank"></a>
|
||||
<strong>get_rank (mixed)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns a rank object given a player or rank name
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">mixed</span>
|
||||
<span class="types"><span class="type">player</span>, <span class="type">player_index</span>, <span class="type">player_name</span>, <span class="type">rank_name</span>, <span class="type">Ranking._rank</span>, <span class="type">'server'</span> or <span class="type">'root'</span></span>
|
||||
what rank to get
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the rank that is linked to mixed
|
||||
</ol>
|
||||
<h3>Or</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">nil</span></span>
|
||||
there was no rank found
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">Ranking.get_rank(game.player) <span class="comment">-- returns player's rank</span></pre></li>
|
||||
<li><pre class="example">Ranking.get_rank(<span class="string">'admin'</span>) <span class="comment">-- returns rank by the name of admin</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "get_group"></a>
|
||||
<strong>get_group (mixed)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the group object used to sort ranks given group name or rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">mixed</span>
|
||||
<span class="types"><span class="type">player</span>, <span class="type">player_index</span>, <span class="type">player_name</span>, <span class="type">rank_name</span>, <span class="type">rank</span>, <span class="type">'server'</span>, <span class="type">'root'</span>, <span class="type">group_name</span> or <span class="type">group</span></span>
|
||||
what group to get
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the group that is linked to mixed
|
||||
</ol>
|
||||
<h3>Or</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">nil</span></span>
|
||||
there was no rank group found
|
||||
</ol>
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
<a href="../modules/ExpGamingCore.Ranking.html#get_rank">Ranking.get_rank</a>
|
||||
</ul>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><pre class="example">Ranking.get_group(game.player) <span class="comment">-- returns player's rank group</span></pre></li>
|
||||
<li><pre class="example">Ranking.get_group(<span class="string">'root'</span>) <span class="comment">-- returns group by name of root</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "print"></a>
|
||||
<strong>print (rank_base, rtn[, colour=defines.color.white[, below=false]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Prints to all rank of greater/lower power of the rank given
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">rank_base</span>
|
||||
<span class="types"><span class="type">Ranking._rank</span> or <span class="type">pointerToRank</span></span>
|
||||
the rank that acts as the cut off point (rank is always included)
|
||||
</li>
|
||||
<li><span class="parameter">rtn</span>
|
||||
what do you want to return to the players
|
||||
</li>
|
||||
<li><span class="parameter">colour</span>
|
||||
<span class="types"><span class="type">defines.color</span></span>
|
||||
the colour that will be used to print
|
||||
(<em>default</em> defines.color.white)
|
||||
</li>
|
||||
<li><span class="parameter">below</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
if true print to children rather than parents
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.<span class="global">print</span>(<span class="string">'admin'</span>,<span class="string">'We got a grifer'</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "give_rank"></a>
|
||||
<strong>give_rank (player[, rank=default[, by_player='server'[, tick=game.tick]]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gives a user a rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
<span class="types"><span class="type">LuaPlayer</span> or <span class="type">pointerToPlayer</span></span>
|
||||
the player to give the rank to
|
||||
</li>
|
||||
<li><span class="parameter">rank</span>
|
||||
<span class="types"><span class="type">Ranking._rank</span> or <span class="type">pointerToRank</span></span>
|
||||
the rank to give to the player
|
||||
(<em>default</em> default)
|
||||
</li>
|
||||
<li><span class="parameter">by_player</span>
|
||||
<span class="types"><span class="type">LuaPlayer</span> or <span class="type">pointerToPlayer</span></span>
|
||||
the player who is giving the rank
|
||||
(<em>default</em> 'server')
|
||||
</li>
|
||||
<li><span class="parameter">tick</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the tick that the rank is being given on, used as pass though
|
||||
(<em>default</em> game.tick)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.give_rank(<span class="number">1</span>,<span class="string">'admin'</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "revert"></a>
|
||||
<strong>revert (player[, by_player=nil])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Revert the last change to a players rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
<span class="types"><span class="type">LuaPlayer</span> or <span class="type">pointerToPlayer</span></span>
|
||||
the player to revert the rank of
|
||||
</li>
|
||||
<li><span class="parameter">by_player</span>
|
||||
the player who is doing the revert
|
||||
(<em>default</em> nil)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.revert(<span class="number">1</span>) <span class="comment">-- reverts the rank of player with index 1</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "find_preset"></a>
|
||||
<strong>find_preset (player[, tick=nil])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Given that the player has a rank in the preset table it is given; also will attempt to promote players if a time requirement is met
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
<span class="types"><span class="type">LuaPlayer</span> or <span class="type">pointerToPlayer</span></span>
|
||||
the player to test for an auto rank
|
||||
</li>
|
||||
<li><span class="parameter">tick</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the tick it happens on
|
||||
(<em>default</em> nil)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.find_preset(<span class="number">1</span>) <span class="comment">-- attemps to find the preset for player with index 1</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "global"></a>
|
||||
<strong>global</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Global Table
|
||||
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">old</span>
|
||||
contains the previous rank a use had before a rank change
|
||||
</li>
|
||||
<li><span class="parameter">preset</span>
|
||||
contains the preset ranks that users will recive apon joining
|
||||
</li>
|
||||
<li><span class="parameter">last_change</span>
|
||||
contains the name of the player who last had there rank chagned
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ranks"></a>
|
||||
<strong>ranks</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Contains the location of all the ranks, readonly during runtime
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "ranks"></a>
|
||||
<strong>ranks</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Contains the location of all the rank groups, readonly during runtime
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "meta"></a>
|
||||
<strong>meta</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Contains some meta data about the ranks
|
||||
|
||||
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">default</span>
|
||||
this is the name of the default rank
|
||||
</li>
|
||||
<li><span class="parameter">root</span>
|
||||
this is the name of the root rank
|
||||
</li>
|
||||
<li><span class="parameter">time_ranks</span>
|
||||
a list of all ranks which have a time requirement
|
||||
</li>
|
||||
<li><span class="parameter">time_highest</span>
|
||||
the power of the highest rank that has a time requirement
|
||||
</li>
|
||||
<li><span class="parameter">time_lowest</span>
|
||||
the lowest amount of time required for a time rank
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="Events"></a>Events</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "rank_change"></a>
|
||||
<strong>rank_change</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Called when there is a rank change for a user
|
||||
|
||||
|
||||
<h3>field:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">name</span>
|
||||
the rank id
|
||||
</li>
|
||||
<li><span class="parameter">tick</span>
|
||||
the tick which the event was raised on
|
||||
</li>
|
||||
<li><span class="parameter">player_index</span>
|
||||
the player whos rank was changed
|
||||
</li>
|
||||
<li><span class="parameter">by_player_index</span>
|
||||
the player who changed the rank, 0 means server
|
||||
</li>
|
||||
<li><span class="parameter">new_rank</span>
|
||||
the name of the rank that was given
|
||||
</li>
|
||||
<li><span class="parameter">old_rank</span>
|
||||
the name of the rank the player had
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header has-description"><a name="Class_Rank"></a>Class Rank </h2>
|
||||
|
||||
<div class="section-description">
|
||||
The class for the ranks
|
||||
</div>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Ranking._rank:allowed"></a>
|
||||
<strong>Ranking._rank:allowed (action)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Is this rank allowed to open this gui or use this command etc.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">action</span>
|
||||
<span class="types"><span class="type">teh</span></span>
|
||||
to test for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
is it allowed
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:allowed(<span class="string">'interface'</span>) <span class="comment">-- does the rank have permision for 'interface'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:get_players"></a>
|
||||
<strong>Ranking._rank:get_players ([online=false])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get all the players in this rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">online</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
get only online players
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
a table of all players in this rank
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:get_players()</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:print"></a>
|
||||
<strong>Ranking._rank:print (rtn[, colour=defines.color.white[, show_default=false]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Print a message to all players of this rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">rtn</span>
|
||||
any value you want to return
|
||||
</li>
|
||||
<li><span class="parameter">colour</span>
|
||||
<span class="types"><span class="type">define.color</span></span>
|
||||
the colour that will be used to print
|
||||
(<em>default</em> defines.color.white)
|
||||
</li>
|
||||
<li><span class="parameter">show_default</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
weather to use the default rank name for the print, used as a pass though
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:<span class="global">print</span>(<span class="string">'foo'</span>) <span class="comment">-- prints to all members of this rank</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:edit"></a>
|
||||
<strong>Ranking._rank:edit (key, value)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Allows for a clean way to edit rank objects
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">key</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the key to edit, often allow or disallow
|
||||
</li>
|
||||
<li><span class="parameter">value</span>
|
||||
the new value to be set
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:edit(<span class="string">'allow'</span>,{<span class="string">'interface'</span>}) <span class="comment">-- allows this rank to use 'interface'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header has-description"><a name="Class_Group"></a>Class Group </h2>
|
||||
|
||||
<div class="section-description">
|
||||
The class for the rank groups, the way to allow modules to idex a group that is always present, ranks will always look to there group as a parent
|
||||
</div>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Ranking._group:create"></a>
|
||||
<strong>Ranking._group:create (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a new group
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the fields for this object
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Ranking._group</span></span>
|
||||
returns the object to allow chaining
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking._group:create{name=<span class="string">'root'</span>} <span class="comment">-- returns group with name root</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._group:add_rank"></a>
|
||||
<strong>Ranking._group:add_rank (obj)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creats a new rank with this group as its group
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">obj</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the fields for this object
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">Ranking._group</span></span>
|
||||
returns the object to allow chaining
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">group:add_rank{name=<span class="string">'root'</span>} <span class="comment">-- returns self</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._group:edit"></a>
|
||||
<strong>Ranking._group:edit (key, value)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Allows for a clean way to edit rank group objects
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">key</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a></span>
|
||||
the key to edit, often allow or disallow
|
||||
</li>
|
||||
<li><span class="parameter">value</span>
|
||||
the new value to be set
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">group:edit(<span class="string">'allow'</span>,{<span class="string">'interface'</span>}) <span class="comment">-- allows this rank to use 'interface'</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="modules_expgamingcore_ranking_src_server_Functions"></a>modules.expgamingcore.ranking.src.server Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "_comment"></a>
|
||||
<strong>_comment ()</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
This file will be loaded when ExpGamingCore.Server is present
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:print"></a>
|
||||
<strong>Ranking._rank:print (rtn[, colour=defines.color.white[, show_default=false]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Print a message to all players of this rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">rtn</span>
|
||||
any value you want to return
|
||||
</li>
|
||||
<li><span class="parameter">colour</span>
|
||||
<span class="types"><span class="type">define.color</span></span>
|
||||
the colour that will be used to print
|
||||
(<em>default</em> defines.color.white)
|
||||
</li>
|
||||
<li><span class="parameter">show_default</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
weather to use the default rank name for the print, used as a pass though
|
||||
(<em>default</em> false)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:<span class="global">print</span>(<span class="string">'foo'</span>) <span class="comment">-- prints to all members of this rank</span></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-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -50,7 +50,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><strong>ExpGamingCore.Server</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -828,7 +828,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><strong>ExpGamingCore.Sync</strong></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -158,6 +158,10 @@
|
||||
<td class="name" nowrap><a href="#add_to_gui">add_to_gui (element)</a></td>
|
||||
<td class="summary">Adds a emeltent to the sever info gui</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#server-info">server-info</a></td>
|
||||
<td class="summary">Creates a center gui that will appear on join</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a href="#modules_expgamingcore_sync_src_ranking_Functions">modules.expgamingcore.sync.src.ranking Functions</a></h2>
|
||||
<table class="function_list">
|
||||
@@ -720,6 +724,20 @@
|
||||
<pre class="example">Sync.add_to_gui(<span class="string">'string'</span>) <span class="comment">-- return true</span></pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "server-info"></a>
|
||||
<strong>server-info</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Creates a center gui that will appear on join
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="section-header "><a name="modules_expgamingcore_sync_src_ranking_Functions"></a>modules.expgamingcore.sync.src.ranking Functions</h2>
|
||||
@@ -794,7 +812,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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>
|
||||
@@ -412,7 +412,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -421,9 +421,9 @@
|
||||
|
||||
|
||||
<ul>
|
||||
<li><span class="parameter">default</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a> or <span class="type">true</span></span>
|
||||
the default value of global, if true then default is restored
|
||||
<li><span class="parameter">if</span>
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a>, <a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.4">string</a> or <span class="type">true</span></span>
|
||||
table then the default for the global, if a string then the module to get the global of, if true then reset the global to default
|
||||
(<em>default</em> {})
|
||||
</li>
|
||||
</ul>
|
||||
@@ -436,6 +436,7 @@
|
||||
<li><pre class="example">global[key] <span class="comment">-- used like the normal global table</span></pre></li>
|
||||
<li><pre class="example">global{<span class="string">'foo'</span>,<span class="string">'bar'</span>} <span class="comment">-- sets the default value</span></pre></li>
|
||||
<li><pre class="example">global(<span class="keyword">true</span>) <span class="comment">-- restores global to default</span></pre></li>
|
||||
<li><pre class="example">global(mopdule_name) <span class="comment">-- returns that module's global</span></pre></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
@@ -446,7 +447,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -553,7 +553,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -214,7 +214,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -294,7 +294,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -1123,7 +1123,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -124,7 +124,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.control</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -160,7 +160,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -278,7 +278,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -434,7 +434,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -181,7 +181,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.popup</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -126,7 +126,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><strong>modules.expgamingcore.gui.guiparts.toolbar</strong></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.ranking.control.html">modules.expgamingcore.ranking.control</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Ranking.html">ExpGamingCore.Ranking</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><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
||||
@@ -117,7 +117,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-06-01 16:29:39 </i>
|
||||
<i style="float:right;">Last updated 2018-06-02 21:40:51 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
||||
@@ -1,381 +0,0 @@
|
||||
<!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>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ul class="nowrap">
|
||||
<li><a href="../modules/FSM.html">FSM</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.commands.control.html">modules.expgamingcore.commands.control</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.center.html">modules.expgamingcore.gui.guiparts.center</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.inputs.html">modules.expgamingcore.gui.guiparts.inputs</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.left.html">modules.expgamingcore.gui.guiparts.left</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.popup.html">modules.expgamingcore.gui.guiparts.popup</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.guiparts.toolbar.html">modules.expgamingcore.gui.guiparts.toolbar</a></li>
|
||||
<li><a href="../modules/modules.expgamingcore.gui.control.html">modules.expgamingcore.gui.control</a></li>
|
||||
<li><strong>modules.expgamingcore.ranking.control</strong></li>
|
||||
<li><a href="../modules/ExpGamingCore.Server.html">ExpGamingCore.Server</a></li>
|
||||
<li><a href="../modules/ExpGamingCore.Sync.html">ExpGamingCore.Sync</a></li>
|
||||
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></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>modules.expgamingcore.ranking.control</code></h1>
|
||||
<p>Returns a rank object given a player or rank name</p>
|
||||
<p></p>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.get_rank(game.player)
|
||||
Ranking.get_rank('admin')
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a href="#Functions">Functions</a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking.get_group">Ranking.get_group (mixed)</a></td>
|
||||
<td class="summary">Returns the group object used to sort ranks given group name or see Ranking.get_rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking.print">Ranking.print (rank_base, rtn, colour, below)</a></td>
|
||||
<td class="summary">Prints to all rank of greater/lower power of the rank given</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking.give_rank">Ranking.give_rank (player, rank[, by_player='server'[, tick=game.tick]])</a></td>
|
||||
<td class="summary">Gives a user a rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking.revert">Ranking.revert (player[, by_player=nil])</a></td>
|
||||
<td class="summary">Revert the last change to a players rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking.find_preset">Ranking.find_preset (player[, tick=nil])</a></td>
|
||||
<td class="summary">Given the player has a rank in the preset table it is given</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:allowed">Ranking._rank:allowed (action)</a></td>
|
||||
<td class="summary">Is this rank allowed to open this gui or use this command etc.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:get_players">Ranking._rank:get_players (online)</a></td>
|
||||
<td class="summary">Get all the players in this rank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Ranking._rank:print">Ranking._rank:print (rtn, colour, show_default)</a></td>
|
||||
<td class="summary">Print a message to all players of this rank</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
||||
|
||||
<dl class="function">
|
||||
<dt>
|
||||
<a name = "Ranking.get_group"></a>
|
||||
<strong>Ranking.get_group (mixed)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Returns the group object used to sort ranks given group name or see Ranking.get_rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">mixed</span>
|
||||
player|player index|player name|rank name|rank|'server'|'root'|group name|group what group to get
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
the group that is linked to mixed
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.get_group(game.player)
|
||||
Ranking.get_group(<span class="string">'root'</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking.print"></a>
|
||||
<strong>Ranking.print (rank_base, rtn, colour, below)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Prints to all rank of greater/lower power of the rank given
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">rank_base</span>
|
||||
the rank that acts as the cut off point (rank is always included)
|
||||
</li>
|
||||
<li><span class="parameter">rtn</span>
|
||||
what do you want to return to the players
|
||||
</li>
|
||||
<li><span class="parameter">colour</span>
|
||||
<span class="types"><span class="type">defines.color</span></span>
|
||||
the colour that will be used to print
|
||||
</li>
|
||||
<li><span class="parameter">below</span>
|
||||
<span class="types"><span class="type">bolean</span></span>
|
||||
if true rank below base are printed to
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.<span class="global">print</span>(<span class="string">'admin'</span>,<span class="string">'We got a grifer'</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking.give_rank"></a>
|
||||
<strong>Ranking.give_rank (player, rank[, by_player='server'[, tick=game.tick]])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Gives a user a rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
the player to give the rank to
|
||||
</li>
|
||||
<li><span class="parameter">rank</span>
|
||||
the rank to give to the player
|
||||
</li>
|
||||
<li><span class="parameter">by_player</span>
|
||||
the player who is giving the rank
|
||||
(<em>default</em> 'server')
|
||||
</li>
|
||||
<li><span class="parameter">tick</span>
|
||||
the tick that the rank is being given on
|
||||
(<em>default</em> game.tick)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.give_rank(<span class="number">1</span>,<span class="string">'admin'</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking.revert"></a>
|
||||
<strong>Ranking.revert (player[, by_player=nil])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Revert the last change to a players rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
the player to revert the rank of
|
||||
</li>
|
||||
<li><span class="parameter">by_player</span>
|
||||
the player who is doing the revert
|
||||
(<em>default</em> nil)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.revert(<span class="number">1</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking.find_preset"></a>
|
||||
<strong>Ranking.find_preset (player[, tick=nil])</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Given the player has a rank in the preset table it is given
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">player</span>
|
||||
the player to test for an auto rank
|
||||
</li>
|
||||
<li><span class="parameter">tick</span>
|
||||
<span class="types"><span class="type">number</span></span>
|
||||
the tick it happens on
|
||||
(<em>default</em> nil)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">Ranking.find_preset(<span class="number">1</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:allowed"></a>
|
||||
<strong>Ranking._rank:allowed (action)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Is this rank allowed to open this gui or use this command etc.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">action</span>
|
||||
<span class="types"><span class="type">teh</span></span>
|
||||
to test for
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><span class="type">bolean</span></span>
|
||||
is it allowed
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:allowed(<span class="string">'server-interface'</span>)</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:get_players"></a>
|
||||
<strong>Ranking._rank:get_players (online)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Get all the players in this rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">online</span>
|
||||
<span class="types"><span class="type">bolean</span></span>
|
||||
get only online players
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Returns:</h3>
|
||||
<ol>
|
||||
|
||||
<span class="types"><a class="type" href="https://www.lua.org/manual/5.2/manual.html#6.5">table</a></span>
|
||||
a table of all players in this rank
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:get_players()</pre>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name = "Ranking._rank:print"></a>
|
||||
<strong>Ranking._rank:print (rtn, colour, show_default)</strong>
|
||||
</dt>
|
||||
<dd>
|
||||
Print a message to all players of this rank
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
<ul>
|
||||
<li><span class="parameter">rtn</span>
|
||||
any value you want to return
|
||||
</li>
|
||||
<li><span class="parameter">colour</span>
|
||||
<span class="types"><span class="type">define.color</span></span>
|
||||
the colour that will be used to print
|
||||
</li>
|
||||
<li><span class="parameter">show_default</span>
|
||||
<span class="types"><span class="type">boolean</span></span>
|
||||
weather to use the default rank name for the print
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<pre class="example">rank:<span class="global">print</span>(<span class="string">'foo'</span>)</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-01 16:29:39 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,7 +3,6 @@
|
||||
-- @alias Ranking
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
local Ranking = {}
|
||||
local module_verbose = false --true|false
|
||||
|
||||
@@ -11,7 +10,7 @@ local module_verbose = false --true|false
|
||||
-- @table global
|
||||
-- @field old contains the previous rank a use had before a rank change
|
||||
-- @field preset contains the preset ranks that users will recive apon joining
|
||||
-- @filed last_change contains the name of the player who last had there rank chagned
|
||||
-- @field last_change contains the name of the player who last had there rank chagned
|
||||
local global = global{old={},preset={},last_change=nil}
|
||||
|
||||
--- Called when there is a rank change for a user
|
||||
@@ -78,7 +77,7 @@ Ranking.groups = setmetatable({},{
|
||||
--- Contains some meta data about the ranks
|
||||
-- @table Ranking.meta
|
||||
-- @field default this is the name of the default rank
|
||||
-- @filed root this is the name of the root rank
|
||||
-- @field root this is the name of the root rank
|
||||
-- @field time_ranks a list of all ranks which have a time requirement
|
||||
-- @field time_highest the power of the highest rank that has a time requirement
|
||||
-- @field time_lowest the lowest amount of time required for a time rank
|
||||
@@ -118,7 +117,7 @@ end
|
||||
-- @usage Ranking.get_rank('admin') -- returns rank by the name of admin
|
||||
-- @tparam ?player|player_index|player_name|rank_name|Ranking._rank|'server'|'root' mixed what rank to get
|
||||
-- @treturn[1] table the rank that is linked to mixed
|
||||
-- @trrturn[2] nil there was no rank found
|
||||
-- @treturn[2] nil there was no rank found
|
||||
function Ranking.get_rank(mixed)
|
||||
if not mixed then return error('Ranking.get_rank recived no paramerters') end
|
||||
local ranks = Ranking.ranks
|
||||
@@ -141,10 +140,10 @@ end
|
||||
--- Returns the group object used to sort ranks given group name or rank
|
||||
-- @usage Ranking.get_group(game.player) -- returns player's rank group
|
||||
-- @usage Ranking.get_group('root') -- returns group by name of root
|
||||
-- @tparam ?player|player_index|player_name|rank_name|rank|'server'|'root'|group name|group mixed what group to get
|
||||
-- @tparam ?player|player_index|player_name|rank_name|rank|'server'|'root'|group_name|group mixed what group to get
|
||||
-- @see Ranking.get_rank
|
||||
-- @treturn[1] table the group that is linked to mixed
|
||||
-- @trrturn[2] nil there was no rank group found
|
||||
-- @treturn[2] nil there was no rank group found
|
||||
function Ranking.get_group(mixed)
|
||||
if not mixed then return error('Ranking.get_group recived no paramerters') end
|
||||
local groups = Ranking.groups
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
--- Description - A small description that will be displayed on the doc
|
||||
-- @submodule ExpGamingCore.Ranking
|
||||
-- @alias Ranking
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
--[[
|
||||
How to use groups:
|
||||
name The name that you can use to reference it.
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
--- Description - A small description that will be displayed on the doc
|
||||
-- @submodule ExpGamingCore.Ranking
|
||||
-- @alias Ranking
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
--[[
|
||||
How to use groups:
|
||||
name the name that you can use to refence it.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- Description - A small description that will be displayed on the doc
|
||||
--- A full ranking system for factorio.
|
||||
-- @submodule ExpGamingCore.Ranking
|
||||
-- @alias Ranking
|
||||
-- @author Cooldude2606
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- Description - A small description that will be displayed on the doc
|
||||
--- Allows syncing with an outside server and info panle.
|
||||
-- @submodule ExpGamingCore.Sync
|
||||
-- @alias Sync
|
||||
-- @author Cooldude2606
|
||||
@@ -36,8 +36,7 @@ local function label_format(label,width)
|
||||
end
|
||||
|
||||
--- Creates a center gui that will appear on join
|
||||
-- @table server-info
|
||||
-- @local call to Gui.Center
|
||||
-- @gui server-info
|
||||
Gui.center.add{
|
||||
name='server-info',
|
||||
caption='Server Info',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- Description - A small description that will be displayed on the doc
|
||||
--- Allows syncing with an outside server and info panle.
|
||||
-- @submodule ExpGamingCore.Sync
|
||||
-- @alias Sync
|
||||
-- @author Cooldude2606
|
||||
|
||||
Reference in New Issue
Block a user