2021-05-28 08:38:15 +02:00
|
|
|
<!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>World Config</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>wconfig</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Functions">Functions</a></li>
|
|
|
|
<li><a href="#Aliases">Aliases </a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Modules</h2>
|
|
|
|
<ul class="nowrap">
|
|
|
|
<li><strong>api.lua</strong></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
<h1>Module <code>api.lua</code></h1>
|
|
|
|
<p>wconfig API</p>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
|
|
<table class="function_list">
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#wconfig.read">wconfig.read (fname)</a></td>
|
|
|
|
<td class="summary">Reads config file from world directory.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-05-28 08:44:07 +02:00
|
|
|
<td class="name" nowrap><a href="#wconfig.write">wconfig.write (fname, data[, styled])</a></td>
|
2021-05-28 08:38:15 +02:00
|
|
|
<td class="summary">Writes to config file in world directory.</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<h2><a href="#Aliases">Aliases </a></h2>
|
|
|
|
<table class="function_list">
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#minetest.read_world_config">minetest.read_world_config</a></td>
|
|
|
|
<td class="summary">Alias of <a href="api.html#wconfig.read">wconfig.read</a>.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="name" nowrap><a href="#minetest.write_world_config">minetest.write_world_config</a></td>
|
|
|
|
<td class="summary">Alias of <a href="api.html#wconfig.write">wconfig.write</a>.</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
|
|
|
|
<dl class="function">
|
|
|
|
<dt>
|
|
|
|
<a name = "wconfig.read"></a>
|
|
|
|
<strong>wconfig.read (fname)</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Reads config file from world directory.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">fname</span>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
|
|
|
Base filename with optional directory structure (e.g. "my<em>mod/my</em>config")
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
|
|
|
Table with contents read from json file or <code>nil</code>.
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "wconfig.write"></a>
|
2021-05-28 08:44:07 +02:00
|
|
|
<strong>wconfig.write (fname, data[, styled])</strong>
|
2021-05-28 08:38:15 +02:00
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Writes to config file in world directory.
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
|
|
<ul>
|
|
|
|
<li><span class="parameter">fname</span>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
|
|
|
|
Base filename with optional directory structure (e.g. "my<em>mod/my</em>config").
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">data</span>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
|
|
|
|
Table data to be written to config file.
|
|
|
|
</li>
|
|
|
|
<li><span class="parameter">styled</span>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
|
|
Outputs in a human-readable format if this is set (default: <code>true</code>).
|
2021-05-28 08:44:07 +02:00
|
|
|
(<em>optional</em>)
|
2021-05-28 08:38:15 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
<ol>
|
|
|
|
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
|
|
<code>true</code> if succeeded, <code>false</code> if not.
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<h2 class="section-header "><a name="Aliases"></a>Aliases </h2>
|
|
|
|
|
|
|
|
<dl class="function">
|
|
|
|
<dt>
|
|
|
|
<a name = "minetest.read_world_config"></a>
|
|
|
|
<strong>minetest.read_world_config</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Alias of <a href="api.html#wconfig.read">wconfig.read</a>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
<dt>
|
|
|
|
<a name = "minetest.write_world_config"></a>
|
|
|
|
<strong>minetest.write_world_config</strong>
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
Alias of <a href="api.html#wconfig.write">wconfig.write</a>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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>
|
2021-05-28 08:44:07 +02:00
|
|
|
<i style="float:right;">Last updated 2021-05-27 23:43:31 </i>
|
2021-05-28 08:38:15 +02:00
|
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
|
|
</body>
|
|
|
|
</html>
|