mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 12:07:17 +02:00
Updated HTML docs
This commit is contained in:
parent
86fb09d6bf
commit
86c930be7a
1221 changed files with 76528 additions and 29095 deletions
|
|
@ -30,6 +30,7 @@
|
|||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">evennia.utils.create</a></li>
|
||||
</ul>
|
||||
<div class="develop">develop branch</div>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
|
|
@ -39,25 +40,15 @@
|
|||
|
||||
<section id="module-evennia.utils.create">
|
||||
<span id="evennia-utils-create"></span><h1>evennia.utils.create<a class="headerlink" href="#module-evennia.utils.create" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This module gathers all the essential database-creation
|
||||
functions for the game engine’s various object types.</p>
|
||||
<p>Only objects created ‘stand-alone’ are in here, e.g. object Attributes
|
||||
are always created directly through their respective objects.</p>
|
||||
<p>Each creation_* function also has an alias named for the entity being
|
||||
created, such as create_object() and object(). This is for
|
||||
consistency with the utils.search module and allows you to do the
|
||||
shorter “create.object()”.</p>
|
||||
<p>The respective object managers hold more methods for manipulating and
|
||||
searching objects already existing in the database.</p>
|
||||
<dl class="simple">
|
||||
<dt>Models covered:</dt><dd><p>Objects
|
||||
Scripts
|
||||
Help
|
||||
Message
|
||||
Channel
|
||||
Accounts</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>This module gathers all the essential database-creation functions for the game
|
||||
engine’s various object types.</p>
|
||||
<p>Only objects created ‘stand-alone’ are in here. E.g. object Attributes are
|
||||
always created through their respective objects handlers.</p>
|
||||
<p>Each <strong>creation_*</strong> function also has an alias named for the entity being created,
|
||||
such as create_object() and object(). This is for consistency with the
|
||||
utils.search module and allows you to do the shorter <strong>create.object()</strong>.</p>
|
||||
<p>The respective object managers hold more methods for manipulating and searching
|
||||
objects already existing in the database.</p>
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.create.create_object">
|
||||
<code class="sig-prename descclassname">evennia.utils.create.</code><code class="sig-name descname">create_object</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">location</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">home</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">permissions</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">locks</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">aliases</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">destination</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">report_to</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nohome</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">attributes</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nattributes</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/create.html#create_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.create.create_object" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -67,15 +58,14 @@ Accounts</p>
|
|||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>typeclass</strong> (<em>class</em><em> or </em><em>str</em>) – Class or python path to a typeclass.</p></li>
|
||||
<li><p><strong>key</strong> (<em>str</em>) – Name of the new object. If not set, a name of
|
||||
#dbref will be set.</p></li>
|
||||
<strong>#dbref</strong> will be set.</p></li>
|
||||
<li><p><strong>home</strong> (<em>Object</em><em> or </em><em>str</em>) – Obj or #dbref to use as the object’s
|
||||
home location.</p></li>
|
||||
<li><p><strong>permissions</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – A list of permission strings or tuples (permstring, category).</p></li>
|
||||
<li><p><strong>locks</strong> (<em>str</em>) – one or more lockstrings, separated by semicolons.</p></li>
|
||||
<li><p><strong>aliases</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – A list of alternative keys or tuples (aliasstring, category).</p></li>
|
||||
<li><p><strong>tags</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – List of tag keys or tuples (tagkey, category) or (tagkey, category, data).</p></li>
|
||||
<li><p><strong>destination</strong> (<em>Object</em><em> or </em><em>str</em>) – Obj or #dbref to use as an Exit’s
|
||||
target.</p></li>
|
||||
<li><p><strong>destination</strong> (<em>Object</em><em> or </em><em>str</em>) – Obj or #dbref to use as an Exit’s target.</p></li>
|
||||
<li><p><strong>report_to</strong> (<em>Object</em>) – The object to return error messages to.</p></li>
|
||||
<li><p><strong>nohome</strong> (<em>bool</em>) – This allows the creation of objects without a
|
||||
default home location; only used when creating the default
|
||||
|
|
@ -91,10 +81,8 @@ adding this rarely makes sense since this data will not survive a reload.</p></l
|
|||
<dd class="field-even"><p><em>object (Object)</em> – A newly created object of the given typeclass.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><a class="reference internal" href="evennia.objects.models.html#evennia.objects.models.ObjectDB.DoesNotExist" title="evennia.objects.models.ObjectDB.DoesNotExist"><strong>ObjectDB.DoesNotExist</strong></a> – If trying to create an Object with</p></li>
|
||||
<li><p><strong>location</strong> – </p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><a class="reference internal" href="evennia.objects.models.html#evennia.objects.models.ObjectDB.DoesNotExist" title="evennia.objects.models.ObjectDB.DoesNotExist"><strong>ObjectDB.DoesNotExist</strong></a> – If trying to create an Object with
|
||||
<strong>location</strong> or <strong>home</strong> that can’t be found.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -132,9 +120,8 @@ created or if the <strong>start</strong> method must be called explicitly.</p></
|
|||
<li><p><strong>report_to</strong> (<em>Object</em>) – The object to return error messages to.</p></li>
|
||||
<li><p><strong>desc</strong> (<em>str</em>) – Optional description of script</p></li>
|
||||
<li><p><strong>tags</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – List of tags or tuples (tag, category).</p></li>
|
||||
<li><p><strong>attributes</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – List of tuples <strong>(key, value)</strong>, <strong>(key, value, category)</strong>,
|
||||
<strong>(key, value, category, lockstring)</strong> or
|
||||
<strong>(key, value, category, lockstring, default_access)</strong>.</p></li>
|
||||
<li><p><strong>attributes</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – List if tuples (key, value) or (key, value, category)
|
||||
(key, value, lockstring) or (key, value, lockstring, default_access).</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
|
|
@ -172,21 +159,21 @@ in-game setting information and so on.</p>
|
|||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.create.create_message">
|
||||
<code class="sig-prename descclassname">evennia.utils.create.</code><code class="sig-name descname">create_message</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">senderobj</span></em>, <em class="sig-param"><span class="n">message</span></em>, <em class="sig-param"><span class="n">channels</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">receivers</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">locks</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">header</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/create.html#create_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.create.create_message" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-prename descclassname">evennia.utils.create.</code><code class="sig-name descname">create_message</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">senderobj</span></em>, <em class="sig-param"><span class="n">message</span></em>, <em class="sig-param"><span class="n">receivers</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">locks</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">header</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/create.html#create_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.create.create_message" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Create a new communication Msg. Msgs represent a unit of
|
||||
database-persistent communication between entites.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>senderobj</strong> (<em>Object</em><em> or </em><em>Account</em>) – The entity sending the Msg.</p></li>
|
||||
<li><p><strong>senderobj</strong> (<em>Object</em><em>, </em><em>Account</em><em>, </em><em>Script</em><em>, </em><em>str</em><em> or </em><em>list</em>) – The entity (or
|
||||
entities) sending the Msg. If a <strong>str</strong>, this is the id-string
|
||||
for an external sender type.</p></li>
|
||||
<li><p><strong>message</strong> (<em>str</em>) – Text with the message. Eventual headers, titles
|
||||
etc should all be included in this text string. Formatting
|
||||
will be retained.</p></li>
|
||||
<li><p><strong>channels</strong> (<em>Channel</em><em>, </em><em>key</em><em> or </em><em>list</em>) – A channel or a list of channels to
|
||||
send to. The channels may be actual channel objects or their
|
||||
unique key strings.</p></li>
|
||||
<li><p><strong>receivers</strong> (<em>Object</em><em>, </em><em>Account</em><em>, </em><em>str</em><em> or </em><em>list</em>) – An Account/Object to send
|
||||
to, or a list of them. May be Account objects or accountnames.</p></li>
|
||||
<li><p><strong>receivers</strong> (<em>Object</em><em>, </em><em>Account</em><em>, </em><em>Script</em><em>, </em><em>str</em><em> or </em><em>list</em>) – An Account/Object to send
|
||||
to, or a list of them. If a string, it’s an identifier for an external
|
||||
receiver.</p></li>
|
||||
<li><p><strong>locks</strong> (<em>str</em>) – Lock definition string.</p></li>
|
||||
<li><p><strong>tags</strong> (<em>list</em>) – A list of tags or tuples <strong>(tag, category)</strong>.</p></li>
|
||||
<li><p><strong>header</strong> (<em>str</em>) – Mime-type or other optional information for the message</p></li>
|
||||
|
|
@ -194,10 +181,9 @@ to, or a list of them. May be Account objects or accountnames.</p></li>
|
|||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>The Comm system is created very open-ended, so it’s fully possible
|
||||
to let a message both go to several channels and to several
|
||||
receivers at the same time, it’s up to the command definitions to
|
||||
limit this as desired.</p>
|
||||
<p>The Comm system is created to be very open-ended, so it’s fully
|
||||
possible to let a message both go several receivers at the same time,
|
||||
it’s up to the command definitions to limit this as desired.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -315,7 +301,6 @@ operations and is thus not suitable for play-testing the game.</p>
|
|||
<li><a href="../../0.9.5/api/evennia.utils.create.html">0.9.5 (v0.9.5 branch)</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
|
|
@ -332,6 +317,7 @@ operations and is thus not suitable for play-testing the game.</p>
|
|||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">evennia.utils.create</a></li>
|
||||
</ul>
|
||||
<div class="develop">develop branch</div>
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2020, The Evennia developer community.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue