mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
453 lines
13 KiB
HTML
453 lines
13 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="#Fields">Fields</a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="$(kind=='Topics' and '' or 'nowrap'">
|
|
<li><a href="../modules/config._file_loader.html">config._file_loader</a></li>
|
|
<li><a href="../modules/config.action_buttons.html">config.action_buttons</a></li>
|
|
<li><a href="../modules/config.advanced_start.html">config.advanced_start</a></li>
|
|
<li><a href="../modules/config.death_logger.html">config.death_logger</a></li>
|
|
<li><a href="../modules/config.expcore-commands.auth_admin.html">config.expcore-commands.auth_admin</a></li>
|
|
<li><a href="../modules/config.expcore-commands.auth_roles.html">config.expcore-commands.auth_roles</a></li>
|
|
<li><a href="../modules/config.expcore-commands.auth_runtime_disable.html">config.expcore-commands.auth_runtime_disable</a></li>
|
|
<li><a href="../modules/config.expcore-commands.parse_general.html">config.expcore-commands.parse_general</a></li>
|
|
<li><a href="../modules/config.expcore-commands.parse_roles.html">config.expcore-commands.parse_roles</a></li>
|
|
<li><a href="../modules/config.permission_groups.html">config.permission_groups</a></li>
|
|
<li><a href="../modules/config.popup_messages.html">config.popup_messages</a></li>
|
|
<li><a href="../modules/config.rockets.html">config.rockets</a></li>
|
|
<li><a href="../modules/config.roles.html">config.roles</a></li>
|
|
<li><a href="../modules/config.scorched_earth.html">config.scorched_earth</a></li>
|
|
<li><a href="../modules/config.spawn_area.html">config.spawn_area</a></li>
|
|
<li><a href="../modules/config.warnings.html">config.warnings</a></li>
|
|
<li><a href="../modules/control.html">control</a></li>
|
|
<li><a href="../modules/Commands.html">Commands</a></li>
|
|
<li><a href="../modules/Public.html">Public</a></li>
|
|
<li><a href="../modules/expcore.gui.html">expcore.gui</a></li>
|
|
<li><a href="../modules/expcore.gui.buttons.html">expcore.gui.buttons</a></li>
|
|
<li><a href="../modules/expcore.gui.center.html">expcore.gui.center</a></li>
|
|
<li><a href="../modules/expcore.gui.checkboxs.html">expcore.gui.checkboxs</a></li>
|
|
<li><a href="../modules/expcore.gui.core.html">expcore.gui.core</a></li>
|
|
<li><a href="../modules/expcore.gui.dropdown.html">expcore.gui.dropdown</a></li>
|
|
<li><a href="../modules/expcore.gui.elem-button.html">expcore.gui.elem-button</a></li>
|
|
<li><a href="../modules/expcore.gui.instances.html">expcore.gui.instances</a></li>
|
|
<li><a href="../modules/expcore.gui.left.html">expcore.gui.left</a></li>
|
|
<li><a href="../modules/expcore.gui.popups.html">expcore.gui.popups</a></li>
|
|
<li><a href="../modules/expcore.gui.progress-bar.html">expcore.gui.progress-bar</a></li>
|
|
<li><a href="../modules/expcore.gui.slider.html">expcore.gui.slider</a></li>
|
|
<li><a href="../modules/expcore.gui.test.html">expcore.gui.test</a></li>
|
|
<li><a href="../modules/expcore.gui.text.html">expcore.gui.text</a></li>
|
|
<li><a href="../modules/expcore.gui.toolbar.html">expcore.gui.toolbar</a></li>
|
|
<li><a href="../modules/Permissions_Groups.html">Permissions_Groups</a></li>
|
|
<li><a href="../modules/Commands.html">Commands</a></li>
|
|
<li><a href="../modules/expcore.store.html">expcore.store</a></li>
|
|
<li><a href="../modules/modules.addons.advanced-start.html">modules.addons.advanced-start</a></li>
|
|
<li><a href="../modules/modules.addons.chat-popups.html">modules.addons.chat-popups</a></li>
|
|
<li><a href="../modules/modules.addons.damage-popups.html">modules.addons.damage-popups</a></li>
|
|
<li><a href="../modules/modules.gui.player-list.html">modules.gui.player-list</a></li>
|
|
<li><a href="../modules/modules.gui.rocket-info.html">modules.gui.rocket-info</a></li>
|
|
<li><a href="../modules/modules.gui.science-info.html">modules.gui.science-info</a></li>
|
|
<li><a href="../modules/modules.gui.task-list.html">modules.gui.task-list</a></li>
|
|
<li><a href="../modules/utils.alien_evolution_progress.html">utils.alien_evolution_progress</a></li>
|
|
<li><strong>utils.core</strong></li>
|
|
<li><a href="../modules/utils.debug.html">utils.debug</a></li>
|
|
<li><a href="../modules/utils.event.html">utils.event</a></li>
|
|
<li><a href="../modules/utils.event_core.html">utils.event_core</a></li>
|
|
<li><a href="../modules/utils.math.html">utils.math</a></li>
|
|
<li><a href="../modules/utils.recipe_locker.html">utils.recipe_locker</a></li>
|
|
<li><a href="../modules/utils.state_machine.html">utils.state_machine</a></li>
|
|
<li><a href="../modules/utils.table.html">utils.table</a></li>
|
|
<li><a href="../modules/utils.task.html">utils.task</a></li>
|
|
<li><a href="../modules/utils.timestamp.html">utils.timestamp</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>utils.core</code></h1>
|
|
<p>Measures distance between pos1 and pos2</p>
|
|
<p></p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.print_except">Module.print_except (msg, player, color)</a></td>
|
|
<td class="summary">Takes msg and prints it to all players except provided player</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.print_admins">Module.print_admins (msg, source)</a></td>
|
|
<td class="summary">Prints a message to all online admins</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.get_actor">Module.get_actor ()</a></td>
|
|
<td class="summary">Returns a valid string with the name of the actor of a command.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.format_time">Module.format_time (ticks)</a></td>
|
|
<td class="summary">Takes a time in ticks and returns a string with the time in format "x hour(s) x minute(s)"</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.cant_run">Module.cant_run (name)</a></td>
|
|
<td class="summary">Prints a message letting the player know they cannot run a command</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.log_command">Module.log_command (actor, command, parameters)</a></td>
|
|
<td class="summary">Logs the use of a command and its user</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.verify_mult_types">Module.verify_mult_types (arg, arg_types)</a></td>
|
|
<td class="summary">Asserts the argument is one of type arg_types</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.random_RGB">Module.random_RGB ()</a></td>
|
|
<td class="summary">Returns a random RGB color as a table</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.set_and_return">Module.set_and_return (tbl, key, value)</a></td>
|
|
<td class="summary">Sets a table element to value while also returning value.</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a href="#Fields">Fields</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.move_position">Module.move_position</a></td>
|
|
<td class="summary">Moves a position according to the parameters given
|
|
Notice: only accepts cardinal directions as direction</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.opposite_direction">Module.opposite_direction</a></td>
|
|
<td class="summary">Takes a direction and gives you the opposite</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#Module.is_module_available">Module.is_module_available</a></td>
|
|
<td class="summary">Takes the string of a module and returns whether is it available or not</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "Module.print_except"></a>
|
|
<strong>Module.print_except (msg, player, color)</strong>
|
|
</dt>
|
|
<dd>
|
|
Takes msg and prints it to all players except provided player
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">msg</span>
|
|
<string|table> table if locale is used
|
|
</li>
|
|
<li><span class="parameter">player</span>
|
|
<LuaPlayer> the player not to send the message to
|
|
</li>
|
|
<li><span class="parameter">color</span>
|
|
<table> the color to use for the message, defaults to white
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.print_admins"></a>
|
|
<strong>Module.print_admins (msg, source)</strong>
|
|
</dt>
|
|
<dd>
|
|
Prints a message to all online admins
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">msg</span>
|
|
<string|table> table if locale is used
|
|
</li>
|
|
<li><span class="parameter">source</span>
|
|
<LuaPlayer|string|nil> string must be the name of a player, nil for server.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.get_actor"></a>
|
|
<strong>Module.get_actor ()</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns a valid string with the name of the actor of a command.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.format_time"></a>
|
|
<strong>Module.format_time (ticks)</strong>
|
|
</dt>
|
|
<dd>
|
|
Takes a time in ticks and returns a string with the time in format "x hour(s) x minute(s)"
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">ticks</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.cant_run"></a>
|
|
<strong>Module.cant_run (name)</strong>
|
|
</dt>
|
|
<dd>
|
|
Prints a message letting the player know they cannot run a command
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">name</span>
|
|
string name of the command
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.log_command"></a>
|
|
<strong>Module.log_command (actor, command, parameters)</strong>
|
|
</dt>
|
|
<dd>
|
|
Logs the use of a command and its user
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">actor</span>
|
|
string with the actor's name (usually acquired by calling get_actor)
|
|
</li>
|
|
<li><span class="parameter">command</span>
|
|
the command's name as table element
|
|
</li>
|
|
<li><span class="parameter">parameters</span>
|
|
the command's parameters as a table (optional)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.verify_mult_types"></a>
|
|
<strong>Module.verify_mult_types (arg, arg_types)</strong>
|
|
</dt>
|
|
<dd>
|
|
Asserts the argument is one of type arg_types
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">arg</span>
|
|
the variable to check
|
|
</li>
|
|
<li><span class="parameter">arg_types</span>
|
|
the type as a table of sings
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
boolean
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.random_RGB"></a>
|
|
<strong>Module.random_RGB ()</strong>
|
|
</dt>
|
|
<dd>
|
|
Returns a random RGB color as a table
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.set_and_return"></a>
|
|
<strong>Module.set_and_return (tbl, key, value)</strong>
|
|
</dt>
|
|
<dd>
|
|
Sets a table element to value while also returning value.
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">tbl</span>
|
|
table to change the element of
|
|
</li>
|
|
<li><span class="parameter">key</span>
|
|
string
|
|
</li>
|
|
<li><span class="parameter">value</span>
|
|
nil|boolean|number|string|table to set the element to
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
value
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a name="Fields"></a>Fields</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "Module.move_position"></a>
|
|
<strong>Module.move_position</strong>
|
|
</dt>
|
|
<dd>
|
|
Moves a position according to the parameters given
|
|
Notice: only accepts cardinal directions as direction
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">position</span>
|
|
<table> table containing a map position
|
|
</li>
|
|
<li><span class="parameter">direction</span>
|
|
<defines.direction> north, east, south, west
|
|
</li>
|
|
<li><span class="parameter">distance</span>
|
|
<number>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.opposite_direction"></a>
|
|
<strong>Module.opposite_direction</strong>
|
|
</dt>
|
|
<dd>
|
|
Takes a direction and gives you the opposite
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">direction</span>
|
|
<defines.direction> north, east, south, west, northeast, northwest, southeast, southwest
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Module.is_module_available"></a>
|
|
<strong>Module.is_module_available</strong>
|
|
</dt>
|
|
<dd>
|
|
Takes the string of a module and returns whether is it available or not
|
|
|
|
|
|
<ul>
|
|
<li><span class="parameter">name</span>
|
|
<string> the name of the module (ex. 'utils.core')
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
|
<i style="float:right;">Last updated 2019-05-29 22:22:59 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|