123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- <!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>Manual for advtrains_doc_integration</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>Documentation System Integration for Advtrains</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/advtrains_doc_integration.bc.html">advtrains_doc_integration.bc</a></li>
- <li><a href="../modules/advtrains_doc_integration.describe.html">advtrains_doc_integration.describe</a></li>
- <li><a href="../modules/advtrains_doc_integration.hypertext.html">advtrains_doc_integration.hypertext</a></li>
- <li><a href="../modules/advtrains_doc_integration.html">advtrains_doc_integration</a></li>
- <li><a href="../modules/advtrains_doc_integration.latex.html">advtrains_doc_integration.latex</a></li>
- <li><a href="../modules/advtrains_doc_integration.mathutils.html">advtrains_doc_integration.mathutils</a></li>
- <li><strong>advtrains_doc_integration.utils</strong></li>
- </ul>
- <h2>Topics</h2>
- <ul class="">
- <li><a href="../topics/README.md.html">README</a></li>
- </ul>
- </div>
- <div id="content">
- <h1>Module <code>advtrains_doc_integration.utils</code></h1>
- <p>Utility functions.</p>
- <p>
- </p>
- <h2><a href="#Functions">Functions</a></h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#map">map (tbl, func)</a></td>
- <td class="summary">Create a table by applying a function to each element.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#spairs">spairs (tbl[, sort])</a></td>
- <td class="summary">Create an iterator that iterates through the table in the order of
- the keys sorted in a certain order.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_coupler_name">get_coupler_name (str)</a></td>
- <td class="summary">Gets the name of the coupler</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#adjust_soundspec">adjust_soundspec (spec)</a></td>
- <td class="summary">Adjust the soundspec to table form.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#texture_escape">texture_escape (str)</a></td>
- <td class="summary">Escape the texture string.</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2 class="section-header "><a name="Functions"></a>Functions</h2>
- <dl class="function">
- <dt>
- <a name = "map"></a>
- <strong>map (tbl, func)</strong>
- </dt>
- <dd>
- Create a table by applying a function to each element.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">tbl</span>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
- The table to map from.
- </li>
- <li><span class="parameter">func</span>
- <span class="types"><span class="type">function</span></span>
- The function to apply.
- </li>
- </ul>
- <h3>Returns:</h3>
- <ol>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
- The resulting table.
- </ol>
- </dd>
- <dt>
- <a name = "spairs"></a>
- <strong>spairs (tbl[, sort])</strong>
- </dt>
- <dd>
- Create an iterator that iterates through the table in the order of
- the keys sorted in a certain order.
- Note that the behavior is undefined if a key is added during the iteration.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">tbl</span>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
- The table to iterate
- </li>
- <li><span class="parameter">sort</span>
- <span class="types"><span class="type">function</span></span>
- The function passed to <a href="https://www.lua.org/manual/5.4/manual.html#pdf-table.sort">table.sort</a> for
- sorting the keys. The default sorting order is used if the function
- is not provided.
- (<em>optional</em>)
- </li>
- </ul>
- <h3>Returns:</h3>
- <ol>
- An iterator suitable for use with Lua's <code>for</code> loop.
- </ol>
- </dd>
- <dt>
- <a name = "get_coupler_name"></a>
- <strong>get_coupler_name (str)</strong>
- </dt>
- <dd>
- Gets the name of the coupler
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">str</span>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
- The technical name of the coupler
- </li>
- </ul>
- <h3>Returns:</h3>
- <ol>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
- The name of the coupler
- </ol>
- </dd>
- <dt>
- <a name = "adjust_soundspec"></a>
- <strong>adjust_soundspec (spec)</strong>
- </dt>
- <dd>
- Adjust the soundspec to table form.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">spec</span>
- <span class="types"><a class="type" href="https://api.minetest.net/sounds/#simplesoundspec">SimpleSoundSpec</a></span>
- The soundspec to adjust.
- </li>
- </ul>
- <h3>Returns:</h3>
- <ol>
- <span class="types"><a class="type" href="https://api.minetest.net/sounds/#simplesoundspec">SimpleSoundSpec</a></span>
- The adjusted soundspec.
- </ol>
- </dd>
- <dt>
- <a name = "texture_escape"></a>
- <strong>texture_escape (str)</strong>
- </dt>
- <dd>
- Escape the texture string.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">str</span>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
- The texture string to escape.
- </li>
- </ul>
- <h3>Returns:</h3>
- <ol>
- <span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
- The escaped texture string.
- </ol>
- </dd>
- </dl>
- </div> <!-- id="content" -->
- </div> <!-- id="main" -->
- <div id="about">
- <i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
- <i style="float:right;">Last updated 2024-01-29 22:34:40 </i>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|