123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <!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>modpol</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="#Fields">Fields</a></li>
- </ul>
- <h2>Basic Functions</h2>
- <ul class="nowrap">
- <li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
- <li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
- <li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
- <li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
- <li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
- </ul>
- <h2>Core Modules</h2>
- <ul class="nowrap">
- <li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
- <li><a href="../modules/change_modules.html">change_modules</a></li>
- <li><a href="../modules/consent.html">consent</a></li>
- <li><a href="../modules/join_org.html">join_org</a></li>
- <li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
- <li><a href="../modules/leave_org.html">leave_org</a></li>
- <li><a href="../modules/message_org.html">message_org</a></li>
- <li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
- <li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
- <li><a href="../modules/remove_org.html">remove_org</a></li>
- <li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
- <li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
- <li><a href="../modules/module_template.html">module_template</a></li>
- </ul>
- <h2>Minetest Modules</h2>
- <ul class="nowrap">
- <li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
- </ul>
- </div>
- <div id="content">
- <h1>Module <code>module_template</code></h1>
- <p>Template for module writers</p>
- <p></p>
- <h2><a href="#Functions">Functions</a></h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
- <td class="summary">(Required): Initiate function
- Modules have access to the following instance variables:
- <li><code>self.org</code> (the org the module was called in),</li>
- <li><code>self.initiator</code> (the user that callced the module),</li>
- <li><code>self.id</code> (the process id of the module instance)</li></td>
- </tr>
- </table>
- <h2><a href="#Tables">Tables</a></h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#data">data</a></td>
- <td class="summary">(Required) Data for module
- Variables that module uses during the course of a process.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#config">config</a></td>
- <td class="summary">(Required): Config for module
- Defines the input parameters to the module initiate function.</td>
- </tr>
- </table>
- <h2><a href="#Fields">Fields</a></h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#modpol.modules.module_template">modpol.modules.module_template</a></td>
- <td class="summary">(Required) Add to module table</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2 class="section-header "><a name="Functions"></a>Functions</h2>
- <dl class="function">
- <dt>
- <a name = "initiate"></a>
- <strong>initiate (result)</strong>
- </dt>
- <dd>
- (Required): Initiate function
- Modules have access to the following instance variables:
- <li><code>self.org</code> (the org the module was called in),</li>
- <li><code>self.initiator</code> (the user that callced the module),</li>
- <li><code>self.id</code> (the process id of the module instance)</li>
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">result</span>
- (optional) Callback if this module is embedded in other modules
- </li>
- </ul>
- </dd>
- </dl>
- <h2 class="section-header "><a name="Tables"></a>Tables</h2>
- <dl class="function">
- <dt>
- <a name = "data"></a>
- <strong>data</strong>
- </dt>
- <dd>
- (Required) Data for module
- Variables that module uses during the course of a process.
- Can be blank
- </dd>
- <dt>
- <a name = "config"></a>
- <strong>config</strong>
- </dt>
- <dd>
- (Required): Config for module
- Defines the input parameters to the module initiate function.
- Can be blank
- When calling a module from within another module,
- variables not defined in config will be ignored.
- Default values set in config can be overridden
- <h3>Fields:</h3>
- <ul>
- <li><span class="parameter">field_1</span>
- ex: votes_required, default = 5
- </li>
- <li><span class="parameter">field_2</span>
- ex: voting_type, default = "majority"
- </li>
- </ul>
- </dd>
- </dl>
- <h2 class="section-header "><a name="Fields"></a>Fields</h2>
- <dl class="function">
- <dt>
- <a name = "modpol.modules.module_template"></a>
- <strong>modpol.modules.module_template</strong>
- </dt>
- <dd>
- (Required) Add to module table
- </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 2022-01-20 10:54:01 </i>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|