mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
387 lines
10 KiB
HTML
387 lines
10 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>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="nowrap">
|
|
<li><a href="../modules/expcore.guiparts.center.html">expcore.guiparts.center</a></li>
|
|
<li><a href="../modules/expcore.guiparts.inputs.html">expcore.guiparts.inputs</a></li>
|
|
<li><a href="../modules/expcore.guiparts.left.html">expcore.guiparts.left</a></li>
|
|
<li><a href="../modules/expcore.guiparts.popup.html">expcore.guiparts.popup</a></li>
|
|
<li><a href="../modules/expcore.guiparts.toolbar.html">expcore.guiparts.toolbar</a></li>
|
|
<li><a href="../modules/expcore.commands.html">expcore.commands</a></li>
|
|
<li><a href="../modules/expcore.gui.html">expcore.gui</a></li>
|
|
<li><strong>expcore.ranking</strong></li>
|
|
<li><a href="../modules/expcore.server.html">expcore.server</a></li>
|
|
<li><a href="../modules/expcore.sync.html">expcore.sync</a></li>
|
|
<li><a href="../modules/FSM.html">FSM</a></li>
|
|
<li><a href="../modules/ExpGamingLib.html">ExpGamingLib</a></li>
|
|
<li><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>
|
|
<h2>Scripts</h2>
|
|
<ul class="nowrap">
|
|
<li><a href="../scripts/control.lua.html">control.lua</a></li>
|
|
<li><a href="../scripts/index.lua.html">index.lua</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>expcore.ranking</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-05-30 00:08:40 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|