evennia/docs/1.0-dev/api/evennia.contrib.html
2020-06-15 21:52:33 +02:00

12677 lines
No EOL
935 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>evennia.contrib package &#8212; Evennia 1.0-dev documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-evennia.contrib">
<span id="evennia-contrib-package"></span><h1>evennia.contrib package<a class="headerlink" href="#module-evennia.contrib" title="Permalink to this headline"></a></h1>
<p>This sub-package holds Evennias contributions - code that may be
useful but are deemed too game-specific to go into the core library.</p>
<p>See README.md for more info.</p>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.awsstorage.html">evennia.contrib.awsstorage package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.awsstorage.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.awsstorage.html#module-evennia.contrib.awsstorage.aws_s3_cdn">evennia.contrib.awsstorage.aws_s3_cdn module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.awsstorage.html#module-evennia.contrib.awsstorage.tests">evennia.contrib.awsstorage.tests module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.ingame_python.html">evennia.contrib.ingame_python package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.callbackhandler">evennia.contrib.ingame_python.callbackhandler module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.commands">evennia.contrib.ingame_python.commands module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.eventfuncs">evennia.contrib.ingame_python.eventfuncs module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.scripts">evennia.contrib.ingame_python.scripts module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.tests">evennia.contrib.ingame_python.tests module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.typeclasses">evennia.contrib.ingame_python.typeclasses module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.ingame_python.html#module-evennia.contrib.ingame_python.utils">evennia.contrib.ingame_python.utils module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.security.html">evennia.contrib.security package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.security.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.security.auditing.html">evennia.contrib.security.auditing package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.security.auditing.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.security.auditing.html#module-evennia.contrib.security.auditing.outputs">evennia.contrib.security.auditing.outputs module</a></li>
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.security.auditing.html#module-evennia.contrib.security.auditing.server">evennia.contrib.security.auditing.server module</a></li>
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.security.auditing.html#module-evennia.contrib.security.auditing.tests">evennia.contrib.security.auditing.tests module</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.turnbattle.html">evennia.contrib.turnbattle package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.turnbattle.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.turnbattle.html#module-evennia.contrib.turnbattle.tb_basic">evennia.contrib.turnbattle.tb_basic module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.turnbattle.html#module-evennia.contrib.turnbattle.tb_equip">evennia.contrib.turnbattle.tb_equip module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.turnbattle.html#module-evennia.contrib.turnbattle.tb_items">evennia.contrib.turnbattle.tb_items module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.turnbattle.html#module-evennia.contrib.turnbattle.tb_magic">evennia.contrib.turnbattle.tb_magic module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.turnbattle.html#module-evennia.contrib.turnbattle.tb_range">evennia.contrib.turnbattle.tb_range module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.tutorial_examples.html">evennia.contrib.tutorial_examples package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#module-evennia.contrib.tutorial_examples.bodyfunctions">evennia.contrib.tutorial_examples.bodyfunctions module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#module-evennia.contrib.tutorial_examples.cmdset_red_button">evennia.contrib.tutorial_examples.cmdset_red_button module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#evennia-contrib-tutorial-examples-example-batch-code-module">evennia.contrib.tutorial_examples.example_batch_code module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#module-evennia.contrib.tutorial_examples.red_button">evennia.contrib.tutorial_examples.red_button module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#module-evennia.contrib.tutorial_examples.red_button_scripts">evennia.contrib.tutorial_examples.red_button_scripts module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_examples.html#module-evennia.contrib.tutorial_examples.tests">evennia.contrib.tutorial_examples.tests module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.tutorial_world.html">evennia.contrib.tutorial_world package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_world.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_world.html#module-evennia.contrib.tutorial_world.mob">evennia.contrib.tutorial_world.mob module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_world.html#module-evennia.contrib.tutorial_world.objects">evennia.contrib.tutorial_world.objects module</a></li>
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tutorial_world.html#module-evennia.contrib.tutorial_world.rooms">evennia.contrib.tutorial_world.rooms module</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-evennia.contrib.barter">
<span id="evennia-contrib-barter-module"></span><h2>evennia.contrib.barter module<a class="headerlink" href="#module-evennia.contrib.barter" title="Permalink to this headline"></a></h2>
<p>Barter system</p>
<p>Evennia contribution - Griatch 2012</p>
<p>This implements a full barter system - a way for players to safely
trade items between each other using code rather than simple free-form
talking. The advantage of this is increased buy/sell safety but it
also streamlines the process and makes it faster when doing many
transactions (since goods are automatically exchanged once both
agree).</p>
<p>This system is primarily intended for a barter economy, but can easily
be used in a monetary economy as well just let the “goods” on one
side be coin objects (this is more flexible than a simple “buy”
command since you can mix coins and goods in your trade).</p>
<p>In this module, a “barter” is generally referred to as a “trade”.</p>
<ul class="simple">
<li><p>Trade example</p></li>
</ul>
<p>A trade (barter) action works like this: A and B are the parties.</p>
<ol class="arabic simple">
<li><p>opening a trade</p></li>
</ol>
<p>A: trade B: Hi, I have a nice extra sword. You wanna trade?
B sees: A says: “Hi, I have a nice extra sword. You wanna trade?”</p>
<blockquote>
<div><p>A wants to trade with you. Enter trade A &lt;emote&gt; to accept.</p>
</div></blockquote>
<p>B: trade A: Hm, I could use a good sword …
A sees: B says: “Hm, I could use a good sword …</p>
<blockquote>
<div><p>B accepts the trade. Use trade help for aid.</p>
</div></blockquote>
<p>B sees: You are now trading with A. Use trade help for aid.</p>
<ol class="arabic simple" start="2">
<li><p>negotiating</p></li>
</ol>
<p>A: offer sword: This is a nice sword. I would need some rations in trade.
B sees: A says: “This is a nice sword. I would need some rations in trade.”</p>
<blockquote>
<div><p>[A offers Sword of might.]</p>
</div></blockquote>
<p>B evaluate sword
B sees: &lt;Swords description and possibly stats&gt;
B: offer ration: This is a prime ration.
A sees: B says: “This is a prime ration.”</p>
<blockquote>
<div><p>[B offers iron ration]</p>
</div></blockquote>
<p>A: say Hey, this is a nice sword, I need something more for it.
B sees: A says: “Hey this is a nice sword, I need something more for it.”
B: offer sword,apple: Alright. I will also include a magic apple. Thats my last offer.
A sees: B says: “Alright, I will also include a magic apple. Thats my last offer.”</p>
<blockquote>
<div><p>[B offers iron ration and magic apple]</p>
</div></blockquote>
<p>A accept: You are killing me here, but alright.
B sees: A says: “You are killing me here, but alright.”</p>
<blockquote>
<div><p>[A accepts your offer. You must now also accept.]</p>
</div></blockquote>
<dl class="simple">
<dt>B accept: Good, nice making business with you.</dt><dd><p>You accept the deal. Deal is made and goods changed hands.</p>
</dd>
<dt>A sees: B says: “Good, nice making business with you.”</dt><dd><p>B accepts the deal. Deal is made and goods changed hands.</p>
</dd>
</dl>
<p>At this point the trading system is exited and the negotiated items
are automatically exchanged between the parties. In this example B was
the only one changing their offer, but also A could have changed their
offer until the two parties found something they could agree on. The
emotes are optional but useful for RP-heavy worlds.</p>
<ul class="simple">
<li><p>Technical info</p></li>
</ul>
<p>The trade is implemented by use of a TradeHandler. This object is a
common place for storing the current status of negotiations. It is
created on the object initiating the trade, and also stored on the
other party once that party agrees to trade. The trade request times
out after a certain time - this is handled by a Script. Once trade
starts, the CmdsetTrade cmdset is initiated on both parties along with
the commands relevant for the trading.</p>
<ul class="simple">
<li><p>Ideas for NPC bartering:</p></li>
</ul>
<p>This module is primarily intended for trade between two players. But
it can also in principle be used for a player negotiating with an
AI-controlled NPC. If the NPC uses normal commands they can use it
directly but more efficient is to have the NPC object send its
replies directly through the tradehandler to the player. One may want
to add some functionality to the decline command, so players can
decline specific objects in the NPC offer (decline &lt;object&gt;) and allow
the AI to maybe offer something else and make it into a proper
barter. Along with an AI that “needs” things or has some sort of
personality in the trading, this can make bartering with NPCs at least
moderately more interesting than just plain buy.</p>
<ul class="simple">
<li><p>Installation:</p></li>
</ul>
<p>Just import the CmdTrade command into (for example) the default
cmdset. This will make the trade (or barter) command available
in-game.</p>
<dl class="class">
<dt id="evennia.contrib.barter.CmdAccept">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdAccept</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdAccept"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdAccept" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>accept the standing offer</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>accept [:emote]
agreee [:emote]</p>
</dd>
</dl>
<p>This will accept the current offer. The other party must also accept
for the deal to go through. You can use the decline command to change
your mind as long as the other party has not yet accepted. You can inspect
the current offer using the offers command.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('agree', 'accept')</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'accept', 'agree'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['agree']</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdAccept.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdAccept.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.func" title="Permalink to this definition"></a></dt>
<dd><p>accept the offer</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trading'</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept.key">
<code class="sig-name descname">key</code><em class="property"> = 'accept'</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdAccept.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'agree', 'category': 'trading', 'key': 'accept', 'tags': '', 'text': &quot;\n accept the standing offer\n\n Usage:\n accept [:emote]\n agreee [:emote]\n\n This will accept the current offer. The other party must also accept\n for the deal to go through. You can use the 'decline' command to change\n your mind as long as the other party has not yet accepted. You can inspect\n the current offer using the 'offers' command.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdDecline">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdDecline</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdDecline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdDecline" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>decline the standing offer</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>decline [:emote]</p>
</dd>
</dl>
<p>This will decline a previously accepted offer (so this allows you to
change your mind). You can only use this as long as the other party
has not yet accepted the deal. Also, changing the offer will automatically
decline the old offer.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('decline',)</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'decline'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdDecline.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdDecline.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.func" title="Permalink to this definition"></a></dt>
<dd><p>decline the offer</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trading'</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline.key">
<code class="sig-name descname">key</code><em class="property"> = 'decline'</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdDecline.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'trading', 'key': 'decline', 'tags': '', 'text': &quot;\n decline the standing offer\n\n Usage:\n decline [:emote]\n\n This will decline a previously 'accept'ed offer (so this allows you to\n change your mind). You can only use this as long as the other party\n has not yet accepted the deal. Also, changing the offer will automatically\n decline the old offer.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdEvaluate">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdEvaluate</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdEvaluate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>evaluate objects on offer</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>evaluate &lt;offered object&gt;</p>
</dd>
</dl>
<p>This allows you to examine any object currently on offer, to
determine if its worth your while.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('eval', 'evaluate')</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'eval', 'evaluate'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['eval']</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdEvaluate.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdEvaluate.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.func" title="Permalink to this definition"></a></dt>
<dd><p>evaluate an object</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trading'</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate.key">
<code class="sig-name descname">key</code><em class="property"> = 'evaluate'</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdEvaluate.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'eval', 'category': 'trading', 'key': 'evaluate', 'tags': '', 'text': &quot;\n evaluate objects on offer\n\n Usage:\n evaluate &lt;offered object&gt;\n\n This allows you to examine any object currently on offer, to\n determine if it's worth your while.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdFinish">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdFinish</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdFinish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdFinish" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>end the trade prematurely</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>end trade [:say]
finish trade [:say]</p>
</dd>
</dl>
<p>This ends the trade prematurely. No trade will take place.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('end trade', 'finish trade')</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'end trade', 'finish trade'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['finish trade']</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdFinish.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdFinish.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.func" title="Permalink to this definition"></a></dt>
<dd><p>end trade</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trading'</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish.key">
<code class="sig-name descname">key</code><em class="property"> = 'end trade'</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdFinish.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'finish trade', 'category': 'trading', 'key': 'end trade', 'tags': '', 'text': '\n end the trade prematurely\n\n Usage:\n end trade [:say]\n finish trade [:say]\n\n This ends the trade prematurely. No trade will take place.\n\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdOffer">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdOffer</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdOffer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdOffer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>offer one or more items in trade.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>offer &lt;object&gt; [, object2, …][:emote]</p>
</dd>
</dl>
<p>Offer objects in trade. This will replace the currently
standing offer.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('offer',)</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'offer'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdOffer.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdOffer.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.func" title="Permalink to this definition"></a></dt>
<dd><p>implement the offer</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trading'</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer.key">
<code class="sig-name descname">key</code><em class="property"> = 'offer'</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdOffer.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'trading', 'key': 'offer', 'tags': '', 'text': '\n offer one or more items in trade.\n\n Usage:\n offer &lt;object&gt; [, object2, ...][:emote]\n\n Offer objects in trade. This will replace the currently\n standing offer.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdStatus">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdStatus</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdStatus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdStatus" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>show a list of the current deal</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>status
deal
offers</p>
</dd>
</dl>
<p>Shows the currently suggested offers on each sides of the deal. To
accept the current deal, use the accept command. Use offer to
change your deal. You might also want to use say, emote etc to
try to influence the other part in the deal.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('offers', 'status', 'deal')</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'deal', 'offers', 'status'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['offers', 'deal']</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdStatus.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdStatus.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.func" title="Permalink to this definition"></a></dt>
<dd><p>Show the current deal</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trading'</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus.key">
<code class="sig-name descname">key</code><em class="property"> = 'status'</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdStatus.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'offers deal', 'category': 'trading', 'key': 'status', 'tags': '', 'text': &quot;\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdTrade">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdTrade</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdTrade"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdTrade" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>Initiate trade with another party</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>trade &lt;other party&gt; [:say]
trade &lt;other party&gt; accept [:say]
trade &lt;other party&gt; decline [:say]</p>
</dd>
</dl>
<p>Initiate trade with another party. The other party needs to repeat
this command with trade accept/decline within a minute in order to
properly initiate the trade action. You can use the decline option
yourself if you want to retract an already suggested trade. The
optional say part works like the say command and allows you to add
info to your choice.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('trade', 'barter')</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'barter', 'trade'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['barter']</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdTrade.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdTrade.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.func" title="Permalink to this definition"></a></dt>
<dd><p>Initiate trade</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade.key">
<code class="sig-name descname">key</code><em class="property"> = 'trade'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTrade.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'barter', 'category': 'general', 'key': 'trade', 'tags': '', 'text': '\n Initiate trade with another party\n\n Usage:\n trade &lt;other party&gt; [:say]\n trade &lt;other party&gt; accept [:say]\n trade &lt;other party&gt; decline [:say]\n\n Initiate trade with another party. The other party needs to repeat\n this command with trade accept/decline within a minute in order to\n properly initiate the trade action. You can use the decline option\n yourself if you want to retract an already suggested trade. The\n optional say part works like the say command and allows you to add\n info to your choice.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdTradeBase">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdTradeBase</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdTradeBase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>Base command for Trade commands to inherit from. Implements the
custom parsing.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('command',)</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'command'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase.key">
<code class="sig-name descname">key</code><em class="property"> = 'command'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdTradeBase.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdTradeBase.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.parse" title="Permalink to this definition"></a></dt>
<dd><p>Parse the relevant parts and make it easily
available to the command</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeBase.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Base command for Trade commands to inherit from. Implements the\n custom parsing.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdTradeHelp">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdTradeHelp</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdTradeHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.barter.CmdTradeBase" title="evennia.contrib.barter.CmdTradeBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.barter.CmdTradeBase</span></code></a></p>
<p>help command for the trade system.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>trade help</p>
</dd>
</dl>
<p>Displays help for the trade commands.</p>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('trade help',)</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'trade help'}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.CmdTradeHelp.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdTradeHelp.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.func" title="Permalink to this definition"></a></dt>
<dd><p>Show the help</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'trade'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp.key">
<code class="sig-name descname">key</code><em class="property"> = 'trade help'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdTradeHelp.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'trade', 'key': 'trade help', 'tags': '', 'text': '\n help command for the trade system.\n\n Usage:\n trade help\n\n Displays help for the trade commands.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.CmdsetTrade">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">CmdsetTrade</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdsetTrade"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdsetTrade" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>This cmdset is added when trade is initated. It is handled by the
trade event handler.</p>
<dl class="method">
<dt id="evennia.contrib.barter.CmdsetTrade.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#CmdsetTrade.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.CmdsetTrade.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called when cmdset is created</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdsetTrade.key">
<code class="sig-name descname">key</code><em class="property"> = 'cmdset_trade'</em><a class="headerlink" href="#evennia.contrib.barter.CmdsetTrade.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.CmdsetTrade.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.barter.CmdsetTrade'</em><a class="headerlink" href="#evennia.contrib.barter.CmdsetTrade.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.TradeHandler">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">TradeHandler</code><span class="sig-paren">(</span><em class="sig-param">part_a</em>, <em class="sig-param">part_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Objects of this class handles the ongoing trade, notably storing the current
offers from each side and wether both have accepted or not.</p>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">part_a</em>, <em class="sig-param">part_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initializes the trade. This is called when part A tries to
initiate a trade with part B. The trade will not start until
part B repeats this command (B will then call the self.join()
command)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>part_a</strong> (<em>object</em>) The party trying to start barter.</p></li>
<li><p><strong>part_b</strong> (<em>object</em>) The party asked to barter.</p></li>
</ul>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>We also store the back-reference from the respective party
to this object.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.accept">
<code class="sig-name descname">accept</code><span class="sig-paren">(</span><em class="sig-param">party</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.accept"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.accept" title="Permalink to this definition"></a></dt>
<dd><p>Accept the current offer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>party</strong> (<em>object</em>) The party accepting the deal.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt><cite>True</cite> if this closes the deal, <cite>False</cite></dt><dd><p>otherwise</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>result (object)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>This will only close the deal if both parties have
accepted independently. This is done by calling the
<cite>finish()</cite> method.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.decline">
<code class="sig-name descname">decline</code><span class="sig-paren">(</span><em class="sig-param">party</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.decline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.decline" title="Permalink to this definition"></a></dt>
<dd><p>Decline the offer (or change ones mind).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>party</strong> (<em>object</em>) Party declining the deal.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt><cite>True</cite> if there was really an</dt><dd><p><cite>accepted</cite> status to change, <cite>False</cite> otherwise.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>did_decline (bool)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>If previously having used the <cite>accept</cite> command, this
function will only work as long as the other party has not
yet accepted.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.finish">
<code class="sig-name descname">finish</code><span class="sig-paren">(</span><em class="sig-param">force=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.finish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.finish" title="Permalink to this definition"></a></dt>
<dd><p>Conclude trade - move all offers and clean up</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>force</strong> (<em>bool</em><em>, </em><em>optional</em>) Force cleanup regardless of if the
trade was accepted or not (if not, no goods will change
hands but trading will stop anyway)</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>If the finish was successful.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>result (bool)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.get_other">
<code class="sig-name descname">get_other</code><span class="sig-paren">(</span><em class="sig-param">party</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.get_other"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.get_other" title="Permalink to this definition"></a></dt>
<dd><p>Returns the other party of the trade</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>party</strong> (<em>object</em>) One of the parties of the negotiation</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The other party, not the first party.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>party_other (object)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.join">
<code class="sig-name descname">join</code><span class="sig-paren">(</span><em class="sig-param">part_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.join" title="Permalink to this definition"></a></dt>
<dd><p>This is used once B decides to join the trade</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>part_b</strong> (<em>object</em>) The party accepting the barter.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.list">
<code class="sig-name descname">list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.list" title="Permalink to this definition"></a></dt>
<dd><p>List current offers.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A tuple with two lists, (A_offers, B_offers).</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>offers (tuple)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.msg_other">
<code class="sig-name descname">msg_other</code><span class="sig-paren">(</span><em class="sig-param">sender</em>, <em class="sig-param">string</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.msg_other"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.msg_other" title="Permalink to this definition"></a></dt>
<dd><p>Relay a message to the <em>other</em> party without needing to know
which party that is. This allows the calling command to not
have to worry about which party they are in the handler.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sender</strong> (<em>object</em>) One of A or B. The method will figure
out the <em>other</em> party to send to.</p></li>
<li><p><strong>string</strong> (<em>str</em>) Text to send.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.offer">
<code class="sig-name descname">offer</code><span class="sig-paren">(</span><em class="sig-param">party</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.offer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.offer" title="Permalink to this definition"></a></dt>
<dd><p>Change the current standing offer. We leave it up to the
command to do the actual checks that the offer consists
of real, valid, objects.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>party</strong> (<em>object</em>) Who is making the offer</p></li>
<li><p><strong>args</strong> (<em>objects</em><em> or </em><em>str</em>) Offerings.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.search">
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param">offername</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.search" title="Permalink to this definition"></a></dt>
<dd><p>Search current offers.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>offername</strong> (<em>str</em><em> or </em><em>int</em>) Object to search for, or its index in
the list of offered items.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>An object on offer, based on the search criterion.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>offer (object)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeHandler.unjoin">
<code class="sig-name descname">unjoin</code><span class="sig-paren">(</span><em class="sig-param">part_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeHandler.unjoin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeHandler.unjoin" title="Permalink to this definition"></a></dt>
<dd><p>This is used if B decides not to join the trade.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>part_b</strong> (<em>object</em>) The party leaving the barter.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.barter.TradeTimeout">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.barter.</code><code class="sig-name descname">TradeTimeout</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeTimeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DefaultScript</span></code></a></p>
<p>This times out the trade request, in case player B did not reply in time.</p>
<dl class="exception">
<dt id="evennia.contrib.barter.TradeTimeout.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.barter.TradeTimeout.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.TradeTimeout._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for TradeTimeout&gt;</em><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeTimeout.at_repeat">
<code class="sig-name descname">at_repeat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeTimeout.at_repeat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.at_repeat" title="Permalink to this definition"></a></dt>
<dd><p>called once</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeTimeout.at_script_creation">
<code class="sig-name descname">at_script_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeTimeout.at_script_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.at_script_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called when script is first created</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.barter.TradeTimeout.is_valid">
<code class="sig-name descname">is_valid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/barter.html#TradeTimeout.is_valid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.is_valid" title="Permalink to this definition"></a></dt>
<dd><p>Only valid if the trade has not yet started</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.TradeTimeout.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.barter.TradeTimeout'</em><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.barter.TradeTimeout.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'TradeTimeout'</em><a class="headerlink" href="#evennia.contrib.barter.TradeTimeout.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.building_menu">
<span id="evennia-contrib-building-menu-module"></span><h2>evennia.contrib.building_menu module<a class="headerlink" href="#module-evennia.contrib.building_menu" title="Permalink to this headline"></a></h2>
<p>Module containing the building menu system.</p>
<p>Evennia contributor: vincent-lg 2018</p>
<p>Building menus are in-game menus, not unlike <cite>EvMenu</cite> though using a
different approach. Building menus have been specifically designed to edit
information as a builder. Creating a building menu in a command allows
builders quick-editing of a given object, like a room. If you follow the
steps below to add the contrib, you will have access to an <cite>&#64;edit</cite> command
that will edit any default object offering to change its key and description.</p>
<ol class="arabic">
<li><p>Import the <cite>GenericBuildingCmd</cite> class from this contrib in your <cite>mygame/commands/default_cmdset.py</cite> file:</p>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">`python</span>
<span class="pre">from</span> <span class="pre">evennia.contrib.building_menu</span> <span class="pre">import</span> <span class="pre">GenericBuildingCmd</span>
<span class="pre">`</span></code></p>
</div></blockquote>
</li>
<li><p>Below, add the command in the <cite>CharacterCmdSet</cite>:</p>
<blockquote>
<div><p><a href="#id1"><span class="problematic" id="id2">``</span></a><a href="#id3"><span class="problematic" id="id4">`</span></a>python
# … These lines should exist in the file
class CharacterCmdSet(default_cmds.CharacterCmdSet):</p>
<blockquote>
<div><p>key = “DefaultCharacter”</p>
<dl class="simple">
<dt>def at_cmdset_creation(self):</dt><dd><p>super(CharacterCmdSet, self).at_cmdset_creation()
# … add the line below
self.add(GenericBuildingCmd())</p>
</dd>
</dl>
</div></blockquote>
<p><a href="#id5"><span class="problematic" id="id6">``</span></a><a href="#id7"><span class="problematic" id="id8">`</span></a></p>
</div></blockquote>
</li>
</ol>
<p>The <cite>&#64;edit</cite> command will allow you to edit any object. You will need to
specify the object name or ID as an argument. For instance: <cite>&#64;edit here</cite>
will edit the current room. However, building menus can perform much more
than this very simple example, read on for more details.</p>
<p>Building menus can be set to edit about anything. Here is an example of
output you could obtain when editing the room:</p>
<dl>
<dt><a href="#id9"><span class="problematic" id="id10">``</span></a><a href="#id11"><span class="problematic" id="id12">`</span></a></dt><dd><p>Editing the room: Limbo(#2)</p>
<p>[T]itle: the limbo room
[D]escription</p>
<blockquote>
<div><p>This is the limbo room. You can easily change this default description,
either by using the <a href="#id13"><span class="problematic" id="id14">|</span></a><a class="reference external" href="mailto:y&#37;&#52;&#48;desc/edit|n">y<span>&#64;</span>desc/edit|n</a> command, or simply by entering this
menu (enter <a href="#id15"><span class="problematic" id="id16">|</span></a>yd|n).</p>
</div></blockquote>
<dl class="simple">
<dt>[E]xits:</dt><dd><p>north to A parking(#4)</p>
</dd>
</dl>
<p>[Q]uit this menu</p>
</dd>
</dl>
<p><a href="#id17"><span class="problematic" id="id18">``</span></a><a href="#id19"><span class="problematic" id="id20">`</span></a></p>
<p>From there, you can open the title choice by pressing t. You can then
change the room title by simply entering text, and go back to the
main menu entering &#64; (all this is customizable). Press q to quit this menu.</p>
<p>The first thing to do is to create a new module and place a class
inheriting from <cite>BuildingMenu</cite> in it.</p>
<p><a href="#id21"><span class="problematic" id="id22">``</span></a><a href="#id23"><span class="problematic" id="id24">`</span></a>python
from evennia.contrib.building_menu import BuildingMenu</p>
<dl class="simple">
<dt>class RoomBuildingMenu(BuildingMenu):</dt><dd><p># …</p>
</dd>
</dl>
<p><a href="#id25"><span class="problematic" id="id26">``</span></a><a href="#id27"><span class="problematic" id="id28">`</span></a></p>
<p>Next, override the <cite>init</cite> method. You can add choices (like the title,
description, and exits choices as seen above) by using the <cite>add_choice</cite>
method.</p>
<p><a href="#id29"><span class="problematic" id="id30">``</span></a>`
class RoomBuildingMenu(BuildingMenu):</p>
<blockquote>
<div><dl class="simple">
<dt>def init(self, room):</dt><dd><p>self.add_choice(“title”, “t”, attr=”key”)</p>
</dd>
</dl>
</div></blockquote>
<p><a href="#id31"><span class="problematic" id="id32">``</span></a><a href="#id33"><span class="problematic" id="id34">`</span></a></p>
<p>That will create the first choice, the title choice. If one opens your menu
and enter t, she will be in the title choice. She can change the title
(it will write in the rooms <cite>key</cite> attribute) and then go back to the
main menu using <cite>&#64;</cite>.</p>
<p><cite>add_choice</cite> has a lot of arguments and offers a great deal of
flexibility. The most useful ones is probably the usage of callbacks,
as you can set almost any argument in <cite>add_choice</cite> to be a callback, a
function that you have defined above in your module. This function will be
called when the menu element is triggered.</p>
<p>Notice that in order to edit a description, the best method to call isnt
<cite>add_choice</cite>, but <cite>add_choice_edit</cite>. This is a convenient shortcut
which is available to quickly open an <cite>EvEditor</cite> when entering this choice
and going back to the menu when the editor closes.</p>
<p><a href="#id35"><span class="problematic" id="id36">``</span></a>`
class RoomBuildingMenu(BuildingMenu):</p>
<blockquote>
<div><dl class="simple">
<dt>def init(self, room):</dt><dd><p>self.add_choice(“title”, “t”, attr=”key”)
self.add_choice_edit(“description”, key=”d”, attr=”db.desc”)</p>
</dd>
</dl>
</div></blockquote>
<p><a href="#id37"><span class="problematic" id="id38">``</span></a><a href="#id39"><span class="problematic" id="id40">`</span></a></p>
<p>When you wish to create a building menu, you just need to import your
class, create it specifying your intended caller and object to edit,
then call <cite>open</cite>:</p>
<p><a href="#id41"><span class="problematic" id="id42">``</span></a><a href="#id43"><span class="problematic" id="id44">`</span></a>python
from &lt;wherever&gt; import RoomBuildingMenu</p>
<p>class CmdEdit(Command):</p>
<blockquote>
<div><p>key = “redit”</p>
<dl class="simple">
<dt>def func(self):</dt><dd><p>menu = RoomBuildingMenu(self.caller, self.caller.location)
menu.open()</p>
</dd>
</dl>
</div></blockquote>
<p><a href="#id45"><span class="problematic" id="id46">``</span></a><a href="#id47"><span class="problematic" id="id48">`</span></a></p>
<p>This is a very short introduction. For more details, see the online tutorial
(<a class="reference external" href="https://github.com/evennia/evennia/wiki/Building-menus">https://github.com/evennia/evennia/wiki/Building-menus</a>) or read the
heavily-documented code below.</p>
<dl class="class">
<dt id="evennia.contrib.building_menu.BuildingMenu">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">BuildingMenu</code><span class="sig-paren">(</span><em class="sig-param">caller=None</em>, <em class="sig-param">obj=None</em>, <em class="sig-param">title='Building menu: {obj}'</em>, <em class="sig-param">keys=None</em>, <em class="sig-param">parents=None</em>, <em class="sig-param">persistent=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Class allowing to create and set building menus to edit specific objects.</p>
<p>A building menu is somewhat similar to <cite>EvMenu</cite>, but designed to edit
objects by builders, although it can be used for players in some contexts.
You could, for instance, create a building menu to edit a room with a
sub-menu for the rooms key, another for the rooms description,
another for the rooms exits, and so on.</p>
<p>To add choices (simple sub-menus), you should call <cite>add_choice</cite> (see the
full documentation of this method). With most arguments, you can
specify either a plain string or a callback. This callback will be
called when the operation is to be performed.</p>
<p>Some methods are provided for frequent needs (see the <cite>add_choice_*</cite>
methods). Some helper functions are defined at the top of this
module in order to be used as arguments to <cite>add_choice</cite>
in frequent cases.</p>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">caller=None</em>, <em class="sig-param">obj=None</em>, <em class="sig-param">title='Building menu: {obj}'</em>, <em class="sig-param">keys=None</em>, <em class="sig-param">parents=None</em>, <em class="sig-param">persistent=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Constructor, you shouldnt override. See <cite>init</cite> instead.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) the caller.</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) the object to be edited, like a room.</p></li>
<li><p><strong>title</strong> (<em>str</em><em>, </em><em>optional</em>) the menu title.</p></li>
<li><p><strong>keys</strong> (<em>list of str</em><em>, </em><em>optional</em>) the starting menu keys (None
to start from the first level).</p></li>
<li><p><strong>parents</strong> (<em>tuple</em><em>, </em><em>optional</em>) information for parent menus,
automatically supplied.</p></li>
<li><p><strong>persistent</strong> (<em>bool</em><em>, </em><em>optional</em>) should this building menu
survive a reload/restart?</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If some of these options have to be changed, it is
preferable to do so in the <cite>init</cite> method and not to
override <cite>__init__</cite>. For instance:</p>
<blockquote>
<div><dl class="simple">
<dt>class RoomBuildingMenu(BuildingMenu):</dt><dd><dl class="simple">
<dt>def init(self, room):</dt><dd><p>self.title = “Menu for room: {obj.key}(#{obj.id})”
# …</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu._add_keys_choice">
<code class="sig-name descname">_add_keys_choice</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu._add_keys_choice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu._add_keys_choice" title="Permalink to this definition"></a></dt>
<dd><p>Add the choices keys if some choices dont have valid keys.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu._save">
<code class="sig-name descname">_save</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu._save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu._save" title="Permalink to this definition"></a></dt>
<dd><p>Save the menu in a attributes on the caller.</p>
<p>If <cite>persistent</cite> is set to <cite>True</cite>, also save in a persistent attribute.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.add_choice">
<code class="sig-name descname">add_choice</code><span class="sig-paren">(</span><em class="sig-param">title</em>, <em class="sig-param">key=None</em>, <em class="sig-param">aliases=None</em>, <em class="sig-param">attr=None</em>, <em class="sig-param">text=None</em>, <em class="sig-param">glance=None</em>, <em class="sig-param">on_enter=None</em>, <em class="sig-param">on_nomatch=None</em>, <em class="sig-param">on_leave=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.add_choice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.add_choice" title="Permalink to this definition"></a></dt>
<dd><p>Add a choice, a valid sub-menu, in the current builder menu.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>title</strong> (<em>str</em>) the choices title.</p></li>
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) the key of the letters to type to access
the sub-neu. If not set, try to guess it based on the
choice title.</p></li>
<li><p><strong>aliases</strong> (<em>list of str</em><em>, </em><em>optional</em>) the aliases for this choice.</p></li>
<li><p><strong>attr</strong> (<em>str</em><em>, </em><em>optional</em>) the name of the attribute of obj to set.
This is really useful if you want to edit an
attribute of the object (thats a frequent need). If
you dont want to do so, just use the <cite>on_*</cite> arguments.</p></li>
<li><p><strong>text</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) a text to be displayed when
the menu is opened It can be a callable.</p></li>
<li><p><strong>glance</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) an at-a-glance summary of the
sub-menu shown in the main menu. It can be set to
display the current value of the attribute in the
main menu itself.</p></li>
<li><p><strong>on_enter</strong> (<em>callable</em><em>, </em><em>optional</em>) a callable to call when the
caller enters into this choice.</p></li>
<li><p><strong>on_nomatch</strong> (<em>callable</em><em>, </em><em>optional</em>) a callable to call when
the caller enters something in this choice. If you
dont set this argument but you have specified
<cite>attr</cite>, then <cite>obj</cite>.`attr` will be set with the value
entered by the user.</p></li>
<li><p><strong>on_leave</strong> (<em>callable</em><em>, </em><em>optional</em>) a callable to call when the
caller leaves the choice.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the newly-created choice.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>choice (<a class="reference internal" href="#evennia.contrib.building_menu.Choice" title="evennia.contrib.building_menu.Choice">Choice</a>)</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>ValueError if the choice cannot be added.</strong> </p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Most arguments can be callables, like functions. This has the
advantage of allowing great flexibility. If you specify
a callable in most of the arguments, the callable should return
the value expected by the argument (a str more often than
not). For instance, you could set a function to be called
to get the menu text, which allows for some filtering:</p>
<blockquote>
<div><dl class="simple">
<dt>def text_exits(menu):</dt><dd><p>return “Some text to display”</p>
</dd>
<dt>class RoomBuildingMenu(BuildingMenu):</dt><dd><dl class="simple">
<dt>def init(self):</dt><dd><p>self.add_choice(“exits”, key=”x”, text=text_exits)</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<p>The allowed arguments in a callable are specific to the
argument names (they are not sensitive to orders, not all
arguments have to be present). For more information, see
<cite>_call_or_get</cite>.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.add_choice_edit">
<code class="sig-name descname">add_choice_edit</code><span class="sig-paren">(</span><em class="sig-param">title='description'</em>, <em class="sig-param">key='d'</em>, <em class="sig-param">aliases=None</em>, <em class="sig-param">attr='db.desc'</em>, <em class="sig-param">glance='\n {obj.db.desc}'</em>, <em class="sig-param">on_enter=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.add_choice_edit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.add_choice_edit" title="Permalink to this definition"></a></dt>
<dd><p>Add a simple choice to edit a given attribute in the EvEditor.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>title</strong> (<em>str</em><em>, </em><em>optional</em>) the choices title.</p></li>
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) the choices key.</p></li>
<li><p><strong>aliases</strong> (<em>list of str</em><em>, </em><em>optional</em>) the choices aliases.</p></li>
<li><p><strong>glance</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) the at-a-glance description.</p></li>
<li><p><strong>on_enter</strong> (<em>callable</em><em>, </em><em>optional</em>) a different callable to edit
the attribute.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the newly-created choice.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>choice (<a class="reference internal" href="#evennia.contrib.building_menu.Choice" title="evennia.contrib.building_menu.Choice">Choice</a>)</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is just a shortcut method, calling <cite>add_choice</cite>.
If <cite>on_enter</cite> is not set, use <cite>menu_edit</cite> which opens
an EvEditor to edit the specified attribute.
When the caller closes the editor (with :q), the menu
will be re-opened.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.add_choice_quit">
<code class="sig-name descname">add_choice_quit</code><span class="sig-paren">(</span><em class="sig-param">title='quit the menu'</em>, <em class="sig-param">key='q'</em>, <em class="sig-param">aliases=None</em>, <em class="sig-param">on_enter=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.add_choice_quit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.add_choice_quit" title="Permalink to this definition"></a></dt>
<dd><p>Add a simple choice just to quit the building menu.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>title</strong> (<em>str</em><em>, </em><em>optional</em>) the choices title.</p></li>
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) the choices key.</p></li>
<li><p><strong>aliases</strong> (<em>list of str</em><em>, </em><em>optional</em>) the choices aliases.</p></li>
<li><p><strong>on_enter</strong> (<em>callable</em><em>, </em><em>optional</em>) a different callable
to quit the building menu.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is just a shortcut method, calling <cite>add_choice</cite>.
If <cite>on_enter</cite> is not set, use <cite>menu_quit</cite> which simply
closes the menu and displays a message. It also
removes the CmdSet from the caller. If you supply
another callable instead, make sure to do the same.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.close">
<code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.close" title="Permalink to this definition"></a></dt>
<dd><p>Close the building menu, removing the CmdSet.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.current_choice">
<em class="property">property </em><code class="sig-name descname">current_choice</code><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.current_choice" title="Permalink to this definition"></a></dt>
<dd><p>Return the current choice or None.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the current choice or None.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>choice (<a class="reference internal" href="#evennia.contrib.building_menu.Choice" title="evennia.contrib.building_menu.Choice">Choice</a>)</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>We use the menu keys to identify the current position of
the caller in the menu. The menu <cite>keys</cite> hold a list of
keys that should match a choice to be usable.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.display">
<code class="sig-name descname">display</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.display"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.display" title="Permalink to this definition"></a></dt>
<dd><p>Display the entire menu or a single choice, depending on the keys.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.display_choice">
<code class="sig-name descname">display_choice</code><span class="sig-paren">(</span><em class="sig-param">choice</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.display_choice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.display_choice" title="Permalink to this definition"></a></dt>
<dd><p>Display the specified choice.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>choice</strong> (<a class="reference internal" href="#evennia.contrib.building_menu.Choice" title="evennia.contrib.building_menu.Choice"><em>Choice</em></a>) the menu choice.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.display_title">
<code class="sig-name descname">display_title</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.display_title"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.display_title" title="Permalink to this definition"></a></dt>
<dd><p>Return the menu title to be displayed.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.init">
<code class="sig-name descname">init</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.init" title="Permalink to this definition"></a></dt>
<dd><p>Create the sub-menu to edit the specified object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) the object to edit.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is probably to be overridden in your subclasses.
Use <cite>add_choice</cite> and its variants to create menu choices.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenu.joker_key">
<code class="sig-name descname">joker_key</code><em class="property"> = '*'</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.joker_key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenu.keys_go_back">
<code class="sig-name descname">keys_go_back</code><em class="property"> = ['&#64;']</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.keys_go_back" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenu.min_shortcut">
<code class="sig-name descname">min_shortcut</code><em class="property"> = 1</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.min_shortcut" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.move">
<code class="sig-name descname">move</code><span class="sig-paren">(</span><em class="sig-param">key=None</em>, <em class="sig-param">back=False</em>, <em class="sig-param">quiet=False</em>, <em class="sig-param">string=''</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.move"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.move" title="Permalink to this definition"></a></dt>
<dd><p>Move inside the menu.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>any</em>) the portion of the key to add to the current
menu keys. If you wish to go back in the menu
tree, dont provide a <cite>key</cite>, just set <cite>back</cite> to <cite>True</cite>.</p></li>
<li><p><strong>back</strong> (<em>bool</em><em>, </em><em>optional</em>) go back in the menu (<cite>False</cite> by default).</p></li>
<li><p><strong>quiet</strong> (<em>bool</em><em>, </em><em>optional</em>) should the menu or choice be
displayed afterward?</p></li>
<li><p><strong>string</strong> (<em>str</em><em>, </em><em>optional</em>) the string sent by the caller to move.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method will need to be called directly should you
use more than two levels in your menu. For instance,
in your room menu, if you want to have an “exits”
option, and then be able to enter “north” in this
choice to edit an exit. The specific exit choice
could be a different menu (with a different class), but
it could also be an additional level in your original menu.
If thats the case, you will need to use this method.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.open">
<code class="sig-name descname">open</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.open" title="Permalink to this definition"></a></dt>
<dd><p>Open the building menu for the caller.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method should be called once when the building menu
has been instanciated. From there, the building menu will
be re-created automatically when the server
reloads/restarts, assuming <cite>persistent</cite> is set to <cite>True</cite>.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.open_parent_menu">
<code class="sig-name descname">open_parent_menu</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.open_parent_menu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.open_parent_menu" title="Permalink to this definition"></a></dt>
<dd><p>Open the parent menu, using <cite>self.parents</cite>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You probably dont need to call this method directly,
since the caller can go back to the parent menu using the
<cite>keys_go_back</cite> automatically.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.open_submenu">
<code class="sig-name descname">open_submenu</code><span class="sig-paren">(</span><em class="sig-param">submenu_class</em>, <em class="sig-param">submenu_obj</em>, <em class="sig-param">parent_keys=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.open_submenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.open_submenu" title="Permalink to this definition"></a></dt>
<dd><p>Open a sub-menu, closing the current menu and opening the new one.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>submenu_class</strong> (<em>str</em>) the submenu class as a Python path.</p></li>
<li><p><strong>submenu_obj</strong> (<em>Object</em>) the object to give to the submenu.</p></li>
<li><p><strong>parent_keys</strong> (<em>list of str</em><em>, </em><em>optional</em>) the parent keys when
the submenu is closed.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When the user enters <cite>&#64;</cite> in the submenu, she will go back to
the current menu, with the <cite>parent_keys</cite> set as its keys.
Therefore, you should set it on the keys of the choice that
should be opened when the user leaves the submenu.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the new building menu or None.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>new_menu (<a class="reference internal" href="#evennia.contrib.building_menu.BuildingMenu" title="evennia.contrib.building_menu.BuildingMenu">BuildingMenu</a>)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.relevant_choices">
<em class="property">property </em><code class="sig-name descname">relevant_choices</code><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.relevant_choices" title="Permalink to this definition"></a></dt>
<dd><p>Only return the relevant choices according to the current meny key.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the relevant choices.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>relevant (list of Choice object)</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>We use the menu keys to identify the current position of
the caller in the menu. The menu <cite>keys</cite> hold a list of
keys that should match a choice to be usable.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenu.restore">
<em class="property">static </em><code class="sig-name descname">restore</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.restore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.restore" title="Permalink to this definition"></a></dt>
<dd><p>Restore the building menu for the caller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) the caller.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method should be automatically called if a menu is
saved in the caller, but the object itself cannot be found.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenu.sep_keys">
<code class="sig-name descname">sep_keys</code><em class="property"> = '.'</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenu.sep_keys" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.building_menu.BuildingMenuCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">BuildingMenuCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenuCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenuCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>Building menu CmdSet.</p>
<dl class="method">
<dt id="evennia.contrib.building_menu.BuildingMenuCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#BuildingMenuCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenuCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Populates the cmdset with commands.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenuCmdSet.key">
<code class="sig-name descname">key</code><em class="property"> = 'building_menu'</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenuCmdSet.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenuCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.building_menu.BuildingMenuCmdSet'</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenuCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.BuildingMenuCmdSet.priority">
<code class="sig-name descname">priority</code><em class="property"> = 5</em><a class="headerlink" href="#evennia.contrib.building_menu.BuildingMenuCmdSet.priority" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.building_menu.Choice">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">Choice</code><span class="sig-paren">(</span><em class="sig-param">title</em>, <em class="sig-param">key=None</em>, <em class="sig-param">aliases=None</em>, <em class="sig-param">attr=None</em>, <em class="sig-param">text=None</em>, <em class="sig-param">glance=None</em>, <em class="sig-param">on_enter=None</em>, <em class="sig-param">on_nomatch=None</em>, <em class="sig-param">on_leave=None</em>, <em class="sig-param">menu=None</em>, <em class="sig-param">caller=None</em>, <em class="sig-param">obj=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#Choice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.Choice" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>A choice object, created by <cite>add_choice</cite>.</p>
<dl class="method">
<dt id="evennia.contrib.building_menu.Choice.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">title</em>, <em class="sig-param">key=None</em>, <em class="sig-param">aliases=None</em>, <em class="sig-param">attr=None</em>, <em class="sig-param">text=None</em>, <em class="sig-param">glance=None</em>, <em class="sig-param">on_enter=None</em>, <em class="sig-param">on_nomatch=None</em>, <em class="sig-param">on_leave=None</em>, <em class="sig-param">menu=None</em>, <em class="sig-param">caller=None</em>, <em class="sig-param">obj=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#Choice.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.Choice.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Constructor.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>title</strong> (<em>str</em>) the choices title.</p></li>
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) the key of the letters to type to access
the choice. If not set, try to guess it based on the title.</p></li>
<li><p><strong>aliases</strong> (<em>list of str</em><em>, </em><em>optional</em>) the allowed aliases for this choice.</p></li>
<li><p><strong>attr</strong> (<em>str</em><em>, </em><em>optional</em>) the name of the attribute of obj to set.</p></li>
<li><p><strong>text</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) a text to be displayed for this
choice. It can be a callable.</p></li>
<li><p><strong>glance</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) an at-a-glance summary of the
sub-menu shown in the main menu. It can be set to
display the current value of the attribute in the
main menu itself.</p></li>
<li><p><strong>menu</strong> (<a class="reference internal" href="#evennia.contrib.building_menu.BuildingMenu" title="evennia.contrib.building_menu.BuildingMenu"><em>BuildingMenu</em></a><em>, </em><em>optional</em>) the parent building menu.</p></li>
<li><p><strong>on_enter</strong> (<em>callable</em><em>, </em><em>optional</em>) a callable to call when the
caller enters into the choice.</p></li>
<li><p><strong>on_nomatch</strong> (<em>callable</em><em>, </em><em>optional</em>) a callable to call when no
match is entered in the choice.</p></li>
<li><p><strong>on_leave</strong> (<em>callable</em><em>, </em><em>optional</em>) a callable to call when the caller
leaves the choice.</p></li>
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em><em>, </em><em>optional</em>) the caller.</p></li>
<li><p><strong>obj</strong> (<em>Object</em><em>, </em><em>optional</em>) the object to edit.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.Choice.enter">
<code class="sig-name descname">enter</code><span class="sig-paren">(</span><em class="sig-param">string</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#Choice.enter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.Choice.enter" title="Permalink to this definition"></a></dt>
<dd><p>Called when the user opens the choice.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>string</strong> (<em>str</em>) the entered string.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.Choice.format_text">
<code class="sig-name descname">format_text</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#Choice.format_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.Choice.format_text" title="Permalink to this definition"></a></dt>
<dd><p>Format the choice text and return it, or an empty string.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.Choice.keys">
<em class="property">property </em><code class="sig-name descname">keys</code><a class="headerlink" href="#evennia.contrib.building_menu.Choice.keys" title="Permalink to this definition"></a></dt>
<dd><p>Return a tuple of keys separated by <cite>sep_keys</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.Choice.leave">
<code class="sig-name descname">leave</code><span class="sig-paren">(</span><em class="sig-param">string</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#Choice.leave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.Choice.leave" title="Permalink to this definition"></a></dt>
<dd><p>Called when the user closes the choice.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>string</strong> (<em>str</em>) the entered string.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.Choice.nomatch">
<code class="sig-name descname">nomatch</code><span class="sig-paren">(</span><em class="sig-param">string</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#Choice.nomatch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.Choice.nomatch" title="Permalink to this definition"></a></dt>
<dd><p>Called when the user entered something in the choice.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>string</strong> (<em>str</em>) the entered string.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The return value of <cite>nomatch</cite> if set or
<cite>True</cite>. The rule is that if <cite>no_match</cite> returns <cite>True</cite>,
then the choice or menu is displayed.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>to_display (bool)</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.building_menu.CmdNoInput">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">CmdNoInput</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#CmdNoInput"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>No input has been found.</p>
<dl class="method">
<dt id="evennia.contrib.building_menu.CmdNoInput.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#CmdNoInput.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.__init__" title="Permalink to this definition"></a></dt>
<dd><p>The lockhandler works the same as for objects.
optional kwargs will be set as properties on the Command at runtime,
overloading evential same-named class properties.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('__noinput_command',)</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'__noinput_command'}</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.CmdNoInput.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#CmdNoInput.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.func" title="Permalink to this definition"></a></dt>
<dd><p>Display the menu or choice text.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput.key">
<code class="sig-name descname">key</code><em class="property"> = '__noinput_command'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoInput.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': 'No input has been found.'}</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.building_menu.CmdNoMatch">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">CmdNoMatch</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#CmdNoMatch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>No input has been found.</p>
<dl class="method">
<dt id="evennia.contrib.building_menu.CmdNoMatch.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#CmdNoMatch.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.__init__" title="Permalink to this definition"></a></dt>
<dd><p>The lockhandler works the same as for objects.
optional kwargs will be set as properties on the Command at runtime,
overloading evential same-named class properties.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('__nomatch_command',)</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'__nomatch_command'}</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.CmdNoMatch.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#CmdNoMatch.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.func" title="Permalink to this definition"></a></dt>
<dd><p>Call the proper menu or redirect to nomatch.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch.key">
<code class="sig-name descname">key</code><em class="property"> = '__nomatch_command'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.CmdNoMatch.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': 'No input has been found.'}</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">GenericBuildingCmd</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#GenericBuildingCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>Generic building command.</p>
<dl class="simple">
<dt>Syntax:</dt><dd><p>&#64;edit [object]</p>
</dd>
</dl>
<p>Open a building menu to edit the specified object. This menu allows to
change the objects key and description.</p>
<p class="rubric">Examples</p>
<p>&#64;edit here
&#64;edit self
&#64;edit #142</p>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;edit',)</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;edit'}</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#GenericBuildingCmd.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the actual executing part of the command. It is
called directly after self.parse(). See the docstring of this
module for which object properties are available (beyond those
set in self.parse())</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;edit'</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '&#64;edit', 'tags': '', 'text': &quot;\n Generic building command.\n\n Syntax:\n &#64;edit [object]\n\n Open a building menu to edit the specified object. This menu allows to\n change the object's key and description.\n\n Examples:\n &#64;edit here\n &#64;edit self\n &#64;edit #142\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.building_menu.GenericBuildingMenu">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">GenericBuildingMenu</code><span class="sig-paren">(</span><em class="sig-param">caller=None</em>, <em class="sig-param">obj=None</em>, <em class="sig-param">title='Building menu: {obj}'</em>, <em class="sig-param">keys=None</em>, <em class="sig-param">parents=None</em>, <em class="sig-param">persistent=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#GenericBuildingMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingMenu" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.building_menu.BuildingMenu" title="evennia.contrib.building_menu.BuildingMenu"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.building_menu.BuildingMenu</span></code></a></p>
<p>A generic building menu, allowing to edit any object.</p>
<p>This is more a demonstration menu. By default, it allows to edit the
object key and description. Nevertheless, it will be useful to demonstrate
how building menus are meant to be used.</p>
<dl class="method">
<dt id="evennia.contrib.building_menu.GenericBuildingMenu.init">
<code class="sig-name descname">init</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#GenericBuildingMenu.init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingMenu.init" title="Permalink to this definition"></a></dt>
<dd><p>Build the meny, adding the key and description choices.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) any object to be edited, like a character or room.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The quit choice will be automatically added, though you can
call <cite>add_choice_quit</cite> to add this choice with different options.</p>
</div>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu._call_or_get">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">_call_or_get</code><span class="sig-paren">(</span><em class="sig-param">value</em>, <em class="sig-param">menu=None</em>, <em class="sig-param">choice=None</em>, <em class="sig-param">string=None</em>, <em class="sig-param">obj=None</em>, <em class="sig-param">caller=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#_call_or_get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu._call_or_get" title="Permalink to this definition"></a></dt>
<dd><p>Call the value, if appropriate, or just return it.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>value</strong> (<em>any</em>) the value to obtain. It might be a callable (see note).</p>
</dd>
</dl>
<dl>
<dt>Kwargs:</dt><dd><dl class="simple">
<dt>menu (BuildingMenu, optional): the building menu to pass to value</dt><dd><p>if it is a callable.</p>
</dd>
</dl>
<p>choice (Choice, optional): the choice to pass to value if a callable.
string (str, optional): the raw string to pass to value if a callback.
obj (Object): the object to pass to value if a callable.
caller (Account or Object, optional): the caller to pass to value</p>
<blockquote>
<div><p>if a callable.</p>
</div></blockquote>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The value itself. If the argument is a function, call it with
specific arguments (see note).</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If <cite>value</cite> is a function, call it with varying arguments. The
list of arguments will depend on the argument names in your callable.
- An argument named <cite>menu</cite> will contain the building menu or None.
- The <cite>choice</cite> argument will contain the choice or None.
- The <cite>string</cite> argument will contain the raw string or None.
- The <cite>obj</cite> argument will contain the object or None.
- The <cite>caller</cite> argument will contain the caller or None.
- Any other argument will contain the object (<cite>obj</cite>).
Thus, you could define callbacks like this:</p>
<blockquote>
<div><p>def on_enter(menu, caller, obj):
def on_nomatch(string, choice, menu):
def on_leave(caller, room): # note that room will contain <cite>obj</cite></p>
</div></blockquote>
</div>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu._menu_loadfunc">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">_menu_loadfunc</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#_menu_loadfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu._menu_loadfunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu._menu_quitfunc">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">_menu_quitfunc</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#_menu_quitfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu._menu_quitfunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu._menu_savefunc">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">_menu_savefunc</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">buf</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#_menu_savefunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu._menu_savefunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu.menu_edit">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">menu_edit</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">choice</em>, <em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#menu_edit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.menu_edit" title="Permalink to this definition"></a></dt>
<dd><p>Open the EvEditor to edit a specified attribute.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) the caller.</p></li>
<li><p><strong>choice</strong> (<a class="reference internal" href="#evennia.contrib.building_menu.Choice" title="evennia.contrib.building_menu.Choice"><em>Choice</em></a>) the choice object.</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) the object to edit.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu.menu_quit">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">menu_quit</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">menu</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#menu_quit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.menu_quit" title="Permalink to this definition"></a></dt>
<dd><p>Quit the menu, closing the CmdSet.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) the caller.</p></li>
<li><p><strong>menu</strong> (<a class="reference internal" href="#evennia.contrib.building_menu.BuildingMenu" title="evennia.contrib.building_menu.BuildingMenu"><em>BuildingMenu</em></a>) the building menu to close.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This callback is used by default when using the
<cite>BuildingMenu.add_choice_quit</cite> method. This method is called
automatically if the menu has no parent.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.building_menu.menu_setattr">
<code class="sig-prename descclassname">evennia.contrib.building_menu.</code><code class="sig-name descname">menu_setattr</code><span class="sig-paren">(</span><em class="sig-param">menu</em>, <em class="sig-param">choice</em>, <em class="sig-param">obj</em>, <em class="sig-param">string</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/building_menu.html#menu_setattr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.building_menu.menu_setattr" title="Permalink to this definition"></a></dt>
<dd><p>Set the value at the specified attribute.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>menu</strong> (<a class="reference internal" href="#evennia.contrib.building_menu.BuildingMenu" title="evennia.contrib.building_menu.BuildingMenu"><em>BuildingMenu</em></a>) the menu object.</p></li>
<li><p><strong>choice</strong> (<em>Chocie</em>) the specific choice.</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) the object to modify.</p></li>
<li><p><strong>string</strong> (<em>str</em>) the string with the new value.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This function is supposed to be used as a default to
<cite>BuildingMenu.add_choice</cite>, when an attribute name is specified
(in the <cite>attr</cite> argument) but no function <cite>on_nomatch</cite> is defined.</p>
</div>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.chargen">
<span id="evennia-contrib-chargen-module"></span><h2>evennia.contrib.chargen module<a class="headerlink" href="#module-evennia.contrib.chargen" title="Permalink to this headline"></a></h2>
<p>Contribution - Griatch 2011</p>
<p>&gt; Note - with the advent of MULTISESSION_MODE=2, this is not really as
necessary anymore - the ooclook and &#64;charcreate commands in that mode
replaces this module with better functionality. This remains here for
inspiration.</p>
<p>This is a simple character creation commandset for the Account level.
It shows some more info and gives the Account the option to create a
character without any more customizations than their name (further
options are unique for each game anyway).</p>
<p>In MULTISESSION_MODEs 0 and 1, you will automatically log into an
existing Character. When using <cite>&#64;ooc</cite> you will then end up in this
cmdset.</p>
<p>Installation:</p>
<p>Import this module to <cite>mygame/commands/default_cmdsets.py</cite> and
add <cite>chargen.OOCCMdSetCharGen</cite> to the <cite>AccountCmdSet</cite> class
(it says where to add it). Reload.</p>
<dl class="class">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.chargen.</code><code class="sig-name descname">CmdOOCCharacterCreate</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/chargen.html#CmdOOCCharacterCreate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>creates a character</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>create &lt;character name&gt;</p>
</dd>
</dl>
<p>This will create a new character, assuming
the given character name does not already exist.</p>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('create',)</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'create'}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/chargen.html#CmdOOCCharacterCreate.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.func" title="Permalink to this definition"></a></dt>
<dd><p>Tries to create the Character object. We also put an
attribute on ourselves to remember it.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.key">
<code class="sig-name descname">key</code><em class="property"> = 'create'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n creates a character\n\n Usage:\n create &lt;character name&gt;\n\n This will create a new character, assuming\n the given character name does not already exist.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.chargen.CmdOOCLook">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.chargen.</code><code class="sig-name descname">CmdOOCLook</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/chargen.html#CmdOOCLook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.general.CmdLook" title="evennia.commands.default.general.CmdLook"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.general.CmdLook</span></code></a></p>
<p>ooc look</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>look
look &lt;character&gt;</p>
</dd>
</dl>
<p>This is an OOC version of the look command. Since an Account doesnt
have an in-game existence, there is no concept of location or
“self”.</p>
<p>If any characters are available for you to control, you may look
at them with this command.</p>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('look', 'ls', 'l')</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'l', 'look', 'ls'}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.chargen.CmdOOCLook.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/chargen.html#CmdOOCLook.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.func" title="Permalink to this definition"></a></dt>
<dd><p>Implements the ooc look command</p>
<p>We use an attribute _character_dbrefs on the account in order
to figure out which characters are “theirs”. A drawback of this
is that only the CmdCharacterCreate command adds this attribute,
and thus e.g. account #1 will not be listed (although it will work).
Existence in this list does not depend on puppeting rights though,
that is checked by the &#64;ic command directly.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook.key">
<code class="sig-name descname">key</code><em class="property"> = 'look'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.CmdOOCLook.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n ooc look\n\n Usage:\n look\n look &lt;character&gt;\n\n This is an OOC version of the look command. Since an Account doesn\'t\n have an in-game existence, there is no concept of location or\n &quot;self&quot;.\n\n If any characters are available for you to control, you may look\n at them with this command.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.chargen.OOCCmdSetCharGen">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.chargen.</code><code class="sig-name descname">OOCCmdSetCharGen</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/chargen.html#OOCCmdSetCharGen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.chargen.OOCCmdSetCharGen" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.cmdset_account.AccountCmdSet" title="evennia.commands.default.cmdset_account.AccountCmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.cmdset_account.AccountCmdSet</span></code></a></p>
<p>Extends the default OOC cmdset.</p>
<dl class="method">
<dt id="evennia.contrib.chargen.OOCCmdSetCharGen.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/chargen.html#OOCCmdSetCharGen.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.chargen.OOCCmdSetCharGen.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Install everything from the default set, then overload</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.chargen.OOCCmdSetCharGen.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.chargen.OOCCmdSetCharGen'</em><a class="headerlink" href="#evennia.contrib.chargen.OOCCmdSetCharGen.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.clothing">
<span id="evennia-contrib-clothing-module"></span><h2>evennia.contrib.clothing module<a class="headerlink" href="#module-evennia.contrib.clothing" title="Permalink to this headline"></a></h2>
<p>Clothing - Provides a typeclass and commands for wearable clothing,
which is appended to a characters description when worn.</p>
<p>Evennia contribution - Tim Ashley Jenkins 2017</p>
<p>Clothing items, when worn, are added to the characters description
in a list. For example, if wearing the following clothing items:</p>
<blockquote>
<div><p>a thin and delicate necklace
a pair of regular ol shoes
one nice hat
a very pretty dress</p>
</div></blockquote>
<p>A characters description may look like this:</p>
<blockquote>
<div><p>Superuser(#1)
This is User #1.</p>
<p>Superuser is wearing one nice hat, a thin and delicate necklace,
a very pretty dress and a pair of regular ol shoes.</p>
</div></blockquote>
<p>Characters can also specify the style of wear for their clothing - I.E.
to wear a scarf tied into a tight knot around the neck or draped
loosely across the shoulders - to add an easy avenue of customization.
For example, after entering:</p>
<blockquote>
<div><p>wear scarf draped loosely across the shoulders</p>
</div></blockquote>
<p>The garment appears like so in the description:</p>
<blockquote>
<div><p>Superuser(#1)
This is User #1.</p>
<p>Superuser is wearing a fanciful-looking scarf draped loosely
across the shoulders.</p>
</div></blockquote>
<p>Items of clothing can be used to cover other items, and many options
are provided to define your own clothing types and their limits and
behaviors. For example, to have undergarments automatically covered
by outerwear, or to put a limit on the number of each type of item
that can be worn. The system as-is is fairly freeform - you
can cover any garment with almost any other, for example - but it
can easily be made more restrictive, and can even be tied into a
system for armor or other equipment.</p>
<p>To install, import this module and have your default character
inherit from ClothedCharacter in your games characters.py file:</p>
<blockquote>
<div><p>from evennia.contrib.clothing import ClothedCharacter</p>
<p>class Character(ClothedCharacter):</p>
</div></blockquote>
<p>And then add ClothedCharacterCmdSet in your character set in your
games commands/default_cmdsets.py:</p>
<blockquote>
<div><p>from evennia.contrib.clothing import ClothedCharacterCmdSet</p>
<dl>
<dt>class CharacterCmdSet(default_cmds.CharacterCmdSet):</dt><dd><p>
at_cmdset_creation(self):</p>
<blockquote>
<div><p>super().at_cmdset_creation()
self.add(ClothedCharacterCmdSet) # &lt; add this</p>
</div></blockquote>
</dd>
</dl>
</div></blockquote>
<p>From here, you can use the default builder commands to create clothes
with which to test the system:</p>
<blockquote>
<div><p>&#64;create a pretty shirt : evennia.contrib.clothing.Clothing
&#64;set shirt/clothing_type = top
wear shirt</p>
</div></blockquote>
<dl class="class">
<dt id="evennia.contrib.clothing.ClothedCharacter">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">ClothedCharacter</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#ClothedCharacter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultCharacter" title="evennia.objects.objects.DefaultCharacter"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultCharacter</span></code></a></p>
<p>Character that displays worn clothing when looked at. You can also
just copy the return_appearance hook defined below to your own games
character typeclass.</p>
<dl class="exception">
<dt id="evennia.contrib.clothing.ClothedCharacter.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.clothing.ClothedCharacter.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.ClothedCharacter._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for ClothedCharacter&gt;</em><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.ClothedCharacter.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.clothing.ClothedCharacter'</em><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.ClothedCharacter.return_appearance">
<code class="sig-name descname">return_appearance</code><span class="sig-paren">(</span><em class="sig-param">looker</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#ClothedCharacter.return_appearance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter.return_appearance" title="Permalink to this definition"></a></dt>
<dd><p>This formats a description. It is the hook a look command
should call.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>looker</strong> (<em>Object</em>) Object doing the looking.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The name of every clothing item carried and worn by the character
is appended to their description. If the clothings db.worn value
is set to True, only the name is appended, but if the value is a
string, the string is appended to the end of the name, to allow
characters to specify how clothing is worn.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.ClothedCharacter.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'ClothedCharacter'</em><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacter.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.ClothedCharacterCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">ClothedCharacterCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#ClothedCharacterCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacterCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.cmdset_character.CharacterCmdSet" title="evennia.commands.default.cmdset_character.CharacterCmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.cmdset_character.CharacterCmdSet</span></code></a></p>
<p>Command set for clothing, including new versions of give and drop
that take worn and covered clothing into account, as well as a new
version of inventory that differentiates between carried and worn
items.</p>
<dl class="method">
<dt id="evennia.contrib.clothing.ClothedCharacterCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#ClothedCharacterCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacterCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Populates the cmdset</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.ClothedCharacterCmdSet.key">
<code class="sig-name descname">key</code><em class="property"> = 'DefaultCharacter'</em><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacterCmdSet.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.ClothedCharacterCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.clothing.ClothedCharacterCmdSet'</em><a class="headerlink" href="#evennia.contrib.clothing.ClothedCharacterCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.Clothing">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">Clothing</code><span class="sig-paren">(</span><em class="sig-param">id</em>, <em class="sig-param">db_key</em>, <em class="sig-param">db_typeclass_path</em>, <em class="sig-param">db_date_created</em>, <em class="sig-param">db_lock_storage</em>, <em class="sig-param">db_account</em>, <em class="sig-param">db_sessid</em>, <em class="sig-param">db_location</em>, <em class="sig-param">db_home</em>, <em class="sig-param">db_destination</em>, <em class="sig-param">db_cmdset_storage</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#Clothing"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.Clothing" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject</span></code></a></p>
<dl class="exception">
<dt id="evennia.contrib.clothing.Clothing.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.clothing.Clothing.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.clothing.Clothing.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.clothing.Clothing.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.Clothing._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for Clothing&gt;</em><a class="headerlink" href="#evennia.contrib.clothing.Clothing._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.Clothing.at_get">
<code class="sig-name descname">at_get</code><span class="sig-paren">(</span><em class="sig-param">getter</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#Clothing.at_get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.Clothing.at_get" title="Permalink to this definition"></a></dt>
<dd><p>Makes absolutely sure clothes arent already set as worn
when theyre picked up, in case theyve somehow had their
location changed without getting removed.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.Clothing.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.clothing.Clothing'</em><a class="headerlink" href="#evennia.contrib.clothing.Clothing.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.Clothing.remove">
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param">wearer</em>, <em class="sig-param">quiet=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#Clothing.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.Clothing.remove" title="Permalink to this definition"></a></dt>
<dd><p>Removes worn clothes and optionally echoes to the room.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>wearer</strong> (<em>obj</em>) character object wearing this clothing object</p>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>quiet (bool): If false, does not message the room</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.Clothing.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'Clothing'</em><a class="headerlink" href="#evennia.contrib.clothing.Clothing.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.Clothing.wear">
<code class="sig-name descname">wear</code><span class="sig-paren">(</span><em class="sig-param">wearer</em>, <em class="sig-param">wearstyle</em>, <em class="sig-param">quiet=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#Clothing.wear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.Clothing.wear" title="Permalink to this definition"></a></dt>
<dd><p>Sets clothes to worn and optionally echoes to the room.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>wearer</strong> (<em>obj</em>) character object wearing this clothing object</p></li>
<li><p><strong>wearstyle</strong> (<em>True</em><em> or </em><em>str</em>) string describing the style of wear or True for none</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>quiet (bool): If false, does not message the room</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Optionally sets db.worn with a wearstyle that appends a short passage to
the end of the name of the clothing to describe how its worn that shows
up in the wearers desc - I.E. around his neck or tied loosely around
her waist. If db.worn is set to True then just the name will be shown.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdCover">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdCover</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdCover"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdCover" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Covers a worn item of clothing with another youre holding or wearing.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>cover &lt;obj&gt; [with] &lt;obj&gt;</p>
</dd>
</dl>
<p>When you cover a clothing item, it is hidden and no longer appears in
your description until its uncovered or the item covering it is removed.
You cant remove an item of clothing if its covered.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('cover',)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'cover'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdCover.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdCover.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.func" title="Permalink to this definition"></a></dt>
<dd><p>This performs the actual command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'clothing'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover.key">
<code class="sig-name descname">key</code><em class="property"> = 'cover'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdCover.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'cover', 'tags': '', 'text': &quot;\n Covers a worn item of clothing with another you're holding or wearing.\n\n Usage:\n cover &lt;obj&gt; [with] &lt;obj&gt;\n\n When you cover a clothing item, it is hidden and no longer appears in\n your description until it's uncovered or the item covering it is removed.\n You can't remove an item of clothing if it's covered.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdDrop">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdDrop</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdDrop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>drop something</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>drop &lt;obj&gt;</p>
</dd>
</dl>
<p>Lets you drop an object from your inventory into the
location you are currently in.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('drop',)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'drop'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.arg_regex">
<code class="sig-name descname">arg_regex</code><em class="property"> = re.compile('\\s|$', re.IGNORECASE)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.arg_regex" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdDrop.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdDrop.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.func" title="Permalink to this definition"></a></dt>
<dd><p>Implement command</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.key">
<code class="sig-name descname">key</code><em class="property"> = 'drop'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdDrop.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'drop', 'tags': '', 'text': '\n drop something\n\n Usage:\n drop &lt;obj&gt;\n\n Lets you drop an object from your inventory into the\n location you are currently in.\n '}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdGive">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdGive</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdGive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdGive" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>give away something to someone</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>give &lt;inventory obj&gt; = &lt;target&gt;</p>
</dd>
</dl>
<p>Gives an items from your inventory to another character,
placing it in their inventory.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('give',)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'give'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.arg_regex">
<code class="sig-name descname">arg_regex</code><em class="property"> = re.compile('\\s|$', re.IGNORECASE)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.arg_regex" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdGive.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdGive.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.func" title="Permalink to this definition"></a></dt>
<dd><p>Implement give</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.key">
<code class="sig-name descname">key</code><em class="property"> = 'give'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdGive.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'give', 'tags': '', 'text': '\n give away something to someone\n\n Usage:\n give &lt;inventory obj&gt; = &lt;target&gt;\n\n Gives an items from your inventory to another character,\n placing it in their inventory.\n '}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdInventory">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdInventory</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdInventory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>view inventory</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>inventory
inv</p>
</dd>
</dl>
<p>Shows your inventory.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('inventory', 'i', 'inv')</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'i', 'inv', 'inventory'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inv']</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.arg_regex">
<code class="sig-name descname">arg_regex</code><em class="property"> = re.compile('$', re.IGNORECASE)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.arg_regex" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdInventory.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdInventory.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.func" title="Permalink to this definition"></a></dt>
<dd><p>check inventory</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.key">
<code class="sig-name descname">key</code><em class="property"> = 'inventory'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdInventory.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdRemove">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdRemove</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdRemove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Takes off an item of clothing.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>remove &lt;obj&gt;</p>
</dd>
</dl>
<p>Removes an item of clothing you are wearing. You cant remove
clothes that are covered up by something else - you must take
off the covering item first.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('remove',)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'remove'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdRemove.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdRemove.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.func" title="Permalink to this definition"></a></dt>
<dd><p>This performs the actual command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'clothing'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove.key">
<code class="sig-name descname">key</code><em class="property"> = 'remove'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdRemove.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'remove', 'tags': '', 'text': &quot;\n Takes off an item of clothing.\n\n Usage:\n remove &lt;obj&gt;\n\n Removes an item of clothing you are wearing. You can't remove\n clothes that are covered up by something else - you must take\n off the covering item first.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdUncover">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdUncover</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdUncover"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Reveals a worn item of clothing thats currently covered up.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>uncover &lt;obj&gt;</p>
</dd>
</dl>
<p>When you uncover an item of clothing, you allow it to appear in your
description without having to take off the garment thats currently
covering it. You cant uncover an item of clothing if the item covering
it is also covered by something else.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('uncover',)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'uncover'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdUncover.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdUncover.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.func" title="Permalink to this definition"></a></dt>
<dd><p>This performs the actual command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'clothing'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover.key">
<code class="sig-name descname">key</code><em class="property"> = 'uncover'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdUncover.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'uncover', 'tags': '', 'text': &quot;\n Reveals a worn item of clothing that's currently covered up.\n\n Usage:\n uncover &lt;obj&gt;\n\n When you uncover an item of clothing, you allow it to appear in your\n description without having to take off the garment that's currently\n covering it. You can't uncover an item of clothing if the item covering\n it is also covered by something else.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.clothing.CmdWear">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">CmdWear</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdWear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdWear" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Puts on an item of clothing you are holding.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>wear &lt;obj&gt; [wear style]</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>wear shirt
wear scarf wrapped loosely about the shoulders</p>
<p>All the clothes you are wearing are appended to your description.
If you provide a wear style after the command, the message you
provide will be displayed after the clothings name.</p>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('wear',)</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'wear'}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.clothing.CmdWear.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#CmdWear.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.func" title="Permalink to this definition"></a></dt>
<dd><p>This performs the actual command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'clothing'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear.key">
<code class="sig-name descname">key</code><em class="property"> = 'wear'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.clothing.CmdWear.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'wear', 'tags': '', 'text': &quot;\n Puts on an item of clothing you are holding.\n\n Usage:\n wear &lt;obj&gt; [wear style]\n\n Examples:\n wear shirt\n wear scarf wrapped loosely about the shoulders\n\n All the clothes you are wearing are appended to your description.\n If you provide a 'wear style' after the command, the message you\n provide will be displayed after the clothing's name.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.clothing.clothing_type_count">
<code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">clothing_type_count</code><span class="sig-paren">(</span><em class="sig-param">clothes_list</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#clothing_type_count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.clothing_type_count" title="Permalink to this definition"></a></dt>
<dd><p>Returns a dictionary of the number of each clothing type
in a given list of clothing objects.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>clothes_list</strong> (<em>list</em>) A list of clothing items from which
to count the number of clothing types
represented among them.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>A dictionary of clothing types represented</dt><dd><p>in the given list and the number of each
clothing type represented.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>types_count (dict)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.clothing.get_worn_clothes">
<code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">get_worn_clothes</code><span class="sig-paren">(</span><em class="sig-param">character</em>, <em class="sig-param">exclude_covered=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#get_worn_clothes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.get_worn_clothes" title="Permalink to this definition"></a></dt>
<dd><p>Get a list of clothes worn by a given character.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>character</strong> (<em>obj</em>) The character to get a list of worn clothes from.</p>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><dl class="simple">
<dt>exclude_covered (bool): If True, excludes clothes covered by other</dt><dd><p>clothing from the returned list.</p>
</dd>
</dl>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>A list of clothing items worn by the</dt><dd><p>given character, ordered according to
the CLOTHING_TYPE_ORDER option specified
in this module.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>ordered_clothes_list (list)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.clothing.order_clothes_list">
<code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">order_clothes_list</code><span class="sig-paren">(</span><em class="sig-param">clothes_list</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#order_clothes_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.order_clothes_list" title="Permalink to this definition"></a></dt>
<dd><p>Orders a given clothes list by the order specified in CLOTHING_TYPE_ORDER.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>clothes_list</strong> (<em>list</em>) List of clothing items to put in order</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>The same list as passed, but re-ordered</dt><dd><p>according to the hierarchy of clothing types
specified in CLOTHING_TYPE_ORDER.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>ordered_clothes_list (list)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.clothing.single_type_count">
<code class="sig-prename descclassname">evennia.contrib.clothing.</code><code class="sig-name descname">single_type_count</code><span class="sig-paren">(</span><em class="sig-param">clothes_list</em>, <em class="sig-param">type</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/clothing.html#single_type_count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.clothing.single_type_count" title="Permalink to this definition"></a></dt>
<dd><p>Returns an integer value of the number of a given type of clothing in a list.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>clothes_list</strong> (<em>list</em>) List of clothing objects to count from</p></li>
<li><p><strong>type</strong> (<em>str</em>) Clothing type to count</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Number of garments of the specified type in the given</dt><dd><p>list of clothing objects</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>type_count (int)</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.color_markups">
<span id="evennia-contrib-color-markups-module"></span><h2>evennia.contrib.color_markups module<a class="headerlink" href="#module-evennia.contrib.color_markups" title="Permalink to this headline"></a></h2>
<p>Color markups</p>
<p>Contribution, Griatch 2017</p>
<p>Additional color markup styles for Evennia (extending or replacing the default <a href="#id49"><span class="problematic" id="id50">|</span></a>r, <a href="#id51"><span class="problematic" id="id52">|</span></a>234 etc).</p>
<p>Installation:</p>
<p>Import the desired style variables from this module into mygame/server/conf/settings.py and add them
to these settings variables. Each are specified as a list, and multiple such lists can be added to
each variable to support multiple formats. Note that list order affects which regexes are applied
first. You must restart both Portal and Server for color tags to update.</p>
<p>Assign to the following settings variables:</p>
<blockquote>
<div><p>COLOR_ANSI_EXTRA_MAP - a mapping between regexes and ANSI colors
COLOR_XTERM256_EXTRA_FG - regex for defining XTERM256 foreground colors
COLOR_XTERM256_EXTRA_BG - regex for defining XTERM256 background colors
COLOR_XTERM256_EXTRA_GFG - regex for defining XTERM256 grayscale foreground colors
COLOR_XTERM256_EXTRA_GBG - regex for defining XTERM256 grayscale background colors
COLOR_ANSI_BRIGHT_BG_EXTRA_MAP = ANSI does not support bright backgrounds; we fake</p>
<blockquote>
<div><p>this by mapping ANSI markup to matching bright XTERM256 backgrounds</p>
</div></blockquote>
<dl class="simple">
<dt>COLOR_NO_DEFAULT - Set True/False. If False (default), extend the default markup, otherwise</dt><dd><p>replace it completely.</p>
</dd>
</dl>
</div></blockquote>
<p>To add the {- “curly-bracket” style, add the following to your settings file, then reboot both
Server and Portal:</p>
<p>from evennia.contrib import color_markups
COLOR_ANSI_EXTRA_MAP = color_markups.CURLY_COLOR_ANSI_EXTRA_MAP
COLOR_XTERM256_EXTRA_FG = color_markups.CURLY_COLOR_XTERM256_EXTRA_FG
COLOR_XTERM256_EXTRA_BG = color_markups.CURLY_COLOR_XTERM256_EXTRA_BG
COLOR_XTERM256_EXTRA_GFG = color_markups.CURLY_COLOR_XTERM256_EXTRA_GFG
COLOR_XTERM256_EXTRA_GBG = color_markups.CURLY_COLOR_XTERM256_EXTRA_GBG
COLOR_ANSI_BRIGHT_BG_EXTRA_MAP = color_markups.CURLY_COLOR_ANSI_BRIGHT_BG_EXTRA_MAP</p>
<p>To add the %c- “mux/mush” style, add the following to your settings file, then reboot both Server
and Portal:</p>
<p>from evennia.contrib import color_markups
COLOR_ANSI_EXTRA_MAP = color_markups.MUX_COLOR_ANSI_EXTRA_MAP
COLOR_XTERM256_EXTRA_FG = color_markups.MUX_COLOR_XTERM256_EXTRA_FG
COLOR_XTERM256_EXTRA_BG = color_markups.MUX_COLOR_XTERM256_EXTRA_BG
COLOR_XTERM256_EXTRA_GFG = color_markups.MUX_COLOR_XTERM256_EXTRA_GFG
COLOR_XTERM256_EXTRA_GBG = color_markups.MUX_COLOR_XTERM256_EXTRA_GBG
COLOR_ANSI_BRIGHT_BGS_EXTRA_MAP = color_markups.CURLY_COLOR_ANSI_BRIGHT_BGS_EXTRA_MAP</p>
</div>
<div class="section" id="module-evennia.contrib.custom_gametime">
<span id="evennia-contrib-custom-gametime-module"></span><h2>evennia.contrib.custom_gametime module<a class="headerlink" href="#module-evennia.contrib.custom_gametime" title="Permalink to this headline"></a></h2>
<p>Custom gametime</p>
<p>Contrib - Griatch 2017, vlgeoff 2017</p>
<p>This implements the evennia.utils.gametime module but supporting
a custom calendar for your game world. It allows for scheduling
events to happen at given in-game times, taking this custom
calendar into account.</p>
<p>Usage:</p>
<p>Use as the normal gametime module, that is by importing and using the
helper functions in this module in your own code. The calendar can be
customized by adding the <cite>TIME_UNITS</cite> dictionary to your settings
file. This maps unit names to their length, expressed in the smallest
unit. Heres the default as an example:</p>
<blockquote>
<div><dl class="simple">
<dt>TIME_UNITS = {</dt><dd><p>“sec”: 1,
“min”: 60,
“hr”: 60 * 60,
“hour”: 60 * 60,
“day”: 60 * 60 * 24,
“week”: 60 * 60 * 24 * 7,
“month”: 60 * 60 * 24 * 7 * 4,
“yr”: 60 * 60 * 24 * 7 * 4 * 12,
“year”: 60 * 60 * 24 * 7 * 4 * 12, }</p>
</dd>
</dl>
</div></blockquote>
<p>When using a custom calendar, these time unit names are used as kwargs to
the converter functions in this module.</p>
<dl class="class">
<dt id="evennia.contrib.custom_gametime.GametimeScript">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">GametimeScript</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#GametimeScript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DefaultScript</span></code></a></p>
<p>Gametime-sensitive script.</p>
<dl class="exception">
<dt id="evennia.contrib.custom_gametime.GametimeScript.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.custom_gametime.GametimeScript.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.custom_gametime.GametimeScript._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for GametimeScript&gt;</em><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.custom_gametime.GametimeScript.at_repeat">
<code class="sig-name descname">at_repeat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#GametimeScript.at_repeat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript.at_repeat" title="Permalink to this definition"></a></dt>
<dd><p>Call the callback and reset interval.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.custom_gametime.GametimeScript.at_script_creation">
<code class="sig-name descname">at_script_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#GametimeScript.at_script_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript.at_script_creation" title="Permalink to this definition"></a></dt>
<dd><p>The script is created.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.custom_gametime.GametimeScript.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.custom_gametime.GametimeScript'</em><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.custom_gametime.GametimeScript.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'GametimeScript'</em><a class="headerlink" href="#evennia.contrib.custom_gametime.GametimeScript.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.custom_gametime.custom_gametime">
<code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">custom_gametime</code><span class="sig-paren">(</span><em class="sig-param">absolute=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#custom_gametime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.custom_gametime" title="Permalink to this definition"></a></dt>
<dd><p>Return the custom game time as a tuple of units, as defined in settings.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>absolute</strong> (<em>bool</em><em>, </em><em>optional</em>) return the relative or absolute time.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The tuple describing the game time. The length of the tuple
is related to the number of unique units defined in the
settings. By default, the tuple would be (year, month,
week, day, hour, minute, second).</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.custom_gametime.gametime_to_realtime">
<code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">gametime_to_realtime</code><span class="sig-paren">(</span><em class="sig-param">format=False</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#gametime_to_realtime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.gametime_to_realtime" title="Permalink to this definition"></a></dt>
<dd><p>This method helps to figure out the real-world time it will take until an
in-game time has passed. E.g. if an event should take place a month later
in-game, you will be able to find the number of real-world seconds this
corresponds to (hint: Interval events deal with real life seconds).</p>
<dl>
<dt>Kwargs:</dt><dd><p>format (bool): Formatting the output.
days, month etc (int): These are the names of time units that must</p>
<blockquote>
<div><p>match the <cite>settings.TIME_UNITS</cite> dict keys.</p>
</div></blockquote>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>The realtime difference or the same</dt><dd><p>time split up into time units.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>time (float or tuple)</p>
</dd>
</dl>
<p class="rubric">Example</p>
<dl class="simple">
<dt>gametime_to_realtime(days=2) -&gt; number of seconds in real life from</dt><dd><p>now after which 2 in-game days will have passed.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.custom_gametime.real_seconds_until">
<code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">real_seconds_until</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#real_seconds_until"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.real_seconds_until" title="Permalink to this definition"></a></dt>
<dd><p>Return the real seconds until game time.</p>
<p>If the game time is 5:00, TIME_FACTOR is set to 2 and you ask
the number of seconds until its 5:10, then this function should
return 300 (5 minutes).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>(</strong><strong>str</strong> (<em>times</em>) int): the time units.</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>real_seconds_until(hour=5, min=10, sec=0)</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The number of real seconds before the given game time is up.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.custom_gametime.realtime_to_gametime">
<code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">realtime_to_gametime</code><span class="sig-paren">(</span><em class="sig-param">secs=0</em>, <em class="sig-param">mins=0</em>, <em class="sig-param">hrs=0</em>, <em class="sig-param">days=0</em>, <em class="sig-param">weeks=0</em>, <em class="sig-param">months=0</em>, <em class="sig-param">yrs=0</em>, <em class="sig-param">format=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#realtime_to_gametime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.realtime_to_gametime" title="Permalink to this definition"></a></dt>
<dd><p>This method calculates how much in-game time a real-world time
interval would correspond to. This is usually a lot less
interesting than the other way around.</p>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>times (int): The various components of the time.
format (bool): Formatting the output.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>The gametime difference or the same</dt><dd><p>time split up into time units.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><p>time (float or tuple)</p>
<dl class="simple">
<dt>Example:</dt><dd><p>realtime_to_gametime(days=2) -&gt; number of game-world seconds</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.custom_gametime.schedule">
<code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">schedule</code><span class="sig-paren">(</span><em class="sig-param">callback</em>, <em class="sig-param">repeat=False</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#schedule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.schedule" title="Permalink to this definition"></a></dt>
<dd><p>Call the callback when the game time is up.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>callback</strong> (<em>function</em>) The callback function that will be called. This
must be a top-level function since the script will be persistent.</p></li>
<li><p><strong>repeat</strong> (<em>bool</em><em>, </em><em>optional</em>) Should the callback be called regularly?</p></li>
<li><p><strong>month</strong><strong>, </strong><strong>etc</strong><strong> (</strong><strong>str</strong> (<em>day</em><em>,</em>) int): The time units to call the callback; should
match the keys of TIME_UNITS.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The created script.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>script (Script)</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>schedule(func, min=5, sec=0) # Will call next hour at :05.
schedule(func, hour=2, min=30, sec=0) # Will call the next day at 02:30.</p>
<p class="rubric">Notes</p>
<p>This function will setup a script that will be called when the
time corresponds to the game time. If the game is stopped for
more than a few seconds, the callback may be called with a
slight delay. If <cite>repeat</cite> is set to True, the callback will be
called again next time the game time matches the given time.
The time is given in units as keyword arguments.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.custom_gametime.time_to_tuple">
<code class="sig-prename descclassname">evennia.contrib.custom_gametime.</code><code class="sig-name descname">time_to_tuple</code><span class="sig-paren">(</span><em class="sig-param">seconds</em>, <em class="sig-param">*divisors</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/custom_gametime.html#time_to_tuple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.custom_gametime.time_to_tuple" title="Permalink to this definition"></a></dt>
<dd><p>Helper function. Creates a tuple of even dividends given a range
of divisors.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>seconds</strong> (<em>int</em>) Number of seconds to format</p></li>
<li><p><strong>*divisors</strong> (<em>int</em>) a sequence of numbers of integer dividends. The
number of seconds will be integer-divided by the first number in
this sequence, the remainder will be divided with the second and
so on.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>This tuple has length len(<a href="#id53"><span class="problematic" id="id54">*</span></a>args)+1, with the</dt><dd><p>last element being the last remaining seconds not evenly
divided by the supplied dividends.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>time (tuple)</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.dice">
<span id="evennia-contrib-dice-module"></span><h2>evennia.contrib.dice module<a class="headerlink" href="#module-evennia.contrib.dice" title="Permalink to this headline"></a></h2>
<p>Dice - rolls dice for roleplaying, in-game gambling or GM:ing</p>
<p>Evennia contribution - Griatch 2012</p>
<p>This module implements a full-fledged dice-roller and a dice command
to go with it. It uses standard RPG d-syntax (e.g. 2d6 to roll two
six-sided die) and also supports modifiers such as 3d6 + 5.</p>
<p>One can also specify a standard Python operator in order to specify
eventual target numbers and get results in a fair and guaranteed
unbiased way. For example a GM could (using the dice command) from
the start define the roll as 2d6 &lt; 8 to show that a roll below 8 is
required to succeed. The command will normally echo this result to all
parties (although it also has options for hidden and secret rolls).</p>
<p>Installation:</p>
<p>To use in your code, just import the roll_dice function from this module.</p>
<p>To use the dice/roll command, just import this module in your custom
cmdset module and add the following line to the end of DefaultCmdSets
at_cmdset_creation():</p>
<blockquote>
<div><p>self.add(dice.CmdDice())</p>
</div></blockquote>
<p>After a reload the dice (or roll) command will be available in-game.</p>
<dl class="class">
<dt id="evennia.contrib.dice.CmdDice">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.dice.</code><code class="sig-name descname">CmdDice</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/dice.html#CmdDice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.dice.CmdDice" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>roll dice</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>dice[/switch] &lt;nr&gt;d&lt;sides&gt; [modifier] [success condition]</p>
</dd>
<dt>Switch:</dt><dd><p>hidden - tell the room the roll is being done, but dont show the result
secret - dont inform the room about neither roll nor result</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>dice 3d6 + 4
dice 1d100 - 2 &lt; 50</p>
<p>This will roll the given number of dice with given sides and modifiers.
So e.g. 2d6 + 3 means to roll a 6-sided die 2 times and add the result,
then add 3 to the total.
Accepted modifiers are +, -, * and /.
A success condition is given as normal Python conditionals
(&lt;,&gt;,&lt;=,&gt;=,==,!=). So e.g. 2d6 + 3 &gt; 10 means that the roll will succeed
only if the final result is above 8. If a success condition is given, the
outcome (pass/fail) will be echoed along with how much it succeeded/failed
with. The hidden/secret switches will hide all or parts of the roll from
everyone but the person rolling.</p>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;dice', 'dice', 'roll')</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;dice', 'dice', 'roll'}</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;dice', 'roll']</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.dice.CmdDice.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/dice.html#CmdDice.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.dice.CmdDice.func" title="Permalink to this definition"></a></dt>
<dd><p>Mostly parsing for calling the dice roller function</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice.key">
<code class="sig-name descname">key</code><em class="property"> = 'dice'</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.CmdDice.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;dice roll', 'category': 'general', 'key': 'dice', 'tags': '', 'text': &quot;\n roll dice\n\n Usage:\n dice[/switch] &lt;nr&gt;d&lt;sides&gt; [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 &lt; 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (&lt;,&gt;,&lt;=,&gt;=,==,!=). So e.g. 2d6 + 3 &gt; 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.dice.DiceCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.dice.</code><code class="sig-name descname">DiceCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/dice.html#DiceCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.dice.DiceCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>a small cmdset for testing purposes.
Add with &#64;py self.cmdset.add(“contrib.dice.DiceCmdSet”)</p>
<dl class="method">
<dt id="evennia.contrib.dice.DiceCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/dice.html#DiceCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.dice.DiceCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called when set is created</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.dice.DiceCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.dice.DiceCmdSet'</em><a class="headerlink" href="#evennia.contrib.dice.DiceCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.dice.roll_dice">
<code class="sig-prename descclassname">evennia.contrib.dice.</code><code class="sig-name descname">roll_dice</code><span class="sig-paren">(</span><em class="sig-param">dicenum</em>, <em class="sig-param">dicetype</em>, <em class="sig-param">modifier=None</em>, <em class="sig-param">conditional=None</em>, <em class="sig-param">return_tuple=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/dice.html#roll_dice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.dice.roll_dice" title="Permalink to this definition"></a></dt>
<dd><p>This is a standard dice roller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dicenum</strong> (<em>int</em>) Number of dice to roll (the result to be added).</p></li>
<li><p><strong>dicetype</strong> (<em>int</em>) Number of sides of the dice to be rolled.</p></li>
<li><p><strong>modifier</strong> (<em>tuple</em>) A tuple <cite>(operator, value)</cite>, where operator is
one of <cite>“+”</cite>, <cite>“-“</cite>, <cite>“/”</cite> or <cite>“*”</cite>. The result of the dice
roll(s) will be modified by this value.</p></li>
<li><p><strong>conditional</strong> (<em>tuple</em>) A tuple <cite>(conditional, value)</cite>, where
conditional is one of <cite>“==”</cite>,`”&lt;<cite>,</cite>&gt;<cite>,</cite>&gt;=”<cite>,</cite>&lt;=`” or “<cite>!=</cite>”.
This allows the roller to directly return a result depending
on if the conditional was passed or not.</p></li>
<li><p><strong>return_tuple</strong> (<em>bool</em>) Return a tuple with all individual roll
results or not.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>The result of the roll + modifiers. This is the</dt><dd><p>default return.</p>
</dd>
<dt>condition_result (bool): A True/False value returned if <cite>conditional</cite></dt><dd><p>is set but not <cite>return_tuple</cite>. This effectively hides the result
of the roll.</p>
</dd>
<dt>full_result (tuple): If, return_tuple` is <cite>True</cite>, instead</dt><dd><p>return a tuple <cite>(result, outcome, diff, rolls)</cite>. Here,
<cite>result</cite> is the normal result of the roll + modifiers.
<cite>outcome</cite> and <cite>diff</cite> are the boolean result of the roll and
absolute difference to the <cite>conditional</cite> input; they will
be will be <cite>None</cite> if <cite>conditional</cite> is not set. <cite>rolls</cite> is
itself a tuple holding all the individual rolls in the case of
multiple die-rolls.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>roll_result (int)</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>TypeError if non-supported modifiers</strong><strong> or </strong><strong>conditionals are given.</strong> </p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>All input numbers are converted to integers.</p>
<p class="rubric">Examples</p>
<p>print roll_dice(2, 6) # 2d6
&lt;&lt;&lt; 7
print roll_dice(1, 100, (+, 5) # 1d100 + 5
&lt;&lt;&lt; 34
print roll_dice(1, 20, conditional=(&lt;, 10) # letsay we roll 3
&lt;&lt;&lt; True
print roll_dice(3, 10, return_tuple=True)
&lt;&lt;&lt; (11, None, None, (2, 5, 4))
print roll_dice(2, 20, (-, 2), conditional=(&gt;=, 10), return_tuple=True)
&lt;&lt;&lt; (8, False, 2, (4, 6)) # roll was 4 + 6 - 2 = 8</p>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.email_login">
<span id="evennia-contrib-email-login-module"></span><h2>evennia.contrib.email_login module<a class="headerlink" href="#module-evennia.contrib.email_login" title="Permalink to this headline"></a></h2>
<p>Email-based login system</p>
<p>Evennia contrib - Griatch 2012</p>
<p>This is a variant of the login system that requires an email-address
instead of a username to login.</p>
<p>This used to be the default Evennia login before replacing it with a
more standard username + password system (having to supply an email
for some reason caused a lot of confusion when people wanted to expand
on it. The email is not strictly needed internally, nor is any
confirmation email sent out anyway).</p>
<p>Installation is simple:</p>
<p>To your settings file, add/edit the line:</p>
<p><code class="docutils literal notranslate"><span class="pre">`python</span>
<span class="pre">CMDSET_UNLOGGEDIN</span> <span class="pre">=</span> <span class="pre">&quot;contrib.email_login.UnloggedinCmdSet&quot;</span>
<span class="pre">`</span></code></p>
<p>Thats it. Reload the server and try to log in to see it.</p>
<p>The initial login “graphic” will still not mention email addresses
after this change. The login splashscreen is taken from strings in
the module given by settings.CONNECTION_SCREEN_MODULE.</p>
<dl class="class">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.email_login.</code><code class="sig-name descname">CmdUnconnectedConnect</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedConnect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Connect to the game.</p>
<dl class="simple">
<dt>Usage (at login screen):</dt><dd><p>connect &lt;email&gt; &lt;password&gt;</p>
</dd>
</dl>
<p>Use the create command to first create an account before logging in.</p>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('conn', 'co', 'connect', 'con')</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'co', 'con', 'conn', 'connect'}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'conn', 'con']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedConnect.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.func" title="Permalink to this definition"></a></dt>
<dd><p>Uses the Django admin api. Note that unlogged-in commands
have a unique position in that their <cite>func()</cite> receives
a session object instead of a <cite>source_object</cite> like all
other types of logged-in commands (this is because
there is no object yet before the account has logged in)</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.key">
<code class="sig-name descname">key</code><em class="property"> = 'connect'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect &lt;email&gt; &lt;password&gt;\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.email_login.</code><code class="sig-name descname">CmdUnconnectedCreate</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedCreate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Create a new account.</p>
<dl class="simple">
<dt>Usage (at login screen):</dt><dd><p>create “accountname” &lt;email&gt; &lt;password&gt;</p>
</dd>
</dl>
<p>This creates a new account account.</p>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('create', 'cre', 'cr')</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'cr', 'cre', 'create'}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedCreate.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.func" title="Permalink to this definition"></a></dt>
<dd><p>Do checks and create account</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.key">
<code class="sig-name descname">key</code><em class="property"> = 'create'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedCreate.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.parse" title="Permalink to this definition"></a></dt>
<dd><p>The parser must handle the multiple-word account
name enclosed in quotes:</p>
<blockquote>
<div><p>connect “Long name with many words” <a class="reference external" href="mailto:my&#37;&#52;&#48;myserv&#46;com">my<span>&#64;</span>myserv<span>&#46;</span>com</a> mypassw</p>
</div></blockquote>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create &quot;accountname&quot; &lt;email&gt; &lt;password&gt;\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.email_login.</code><code class="sig-name descname">CmdUnconnectedQuit</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedQuit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>We maintain a different version of the <cite>quit</cite> command
here for unconnected accounts for the sake of simplicity. The logged in
version is a bit more complicated.</p>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('q', 'quit', 'qu')</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'q', 'qu', 'quit'}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'qu']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedQuit.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.func" title="Permalink to this definition"></a></dt>
<dd><p>Simply close the connection.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.key">
<code class="sig-name descname">key</code><em class="property"> = 'quit'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'q qu', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n We maintain a different version of the `quit` command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.email_login.</code><code class="sig-name descname">CmdUnconnectedLook</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedLook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>This is an unconnected version of the <cite>look</cite> command for simplicity.</p>
<p>This is called by the server and kicks everything in gear.
All it does is display the connect screen.</p>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('look', 'l', '__unloggedin_look_command')</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'__unloggedin_look_command', 'l', 'look'}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedLook.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.func" title="Permalink to this definition"></a></dt>
<dd><p>Show the connect screen.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.key">
<code class="sig-name descname">key</code><em class="property"> = '__unloggedin_look_command'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.email_login.</code><code class="sig-name descname">CmdUnconnectedHelp</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>This is an unconnected version of the help command,
for simplicity. It shows a pane of info.</p>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('h', '?', 'help')</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'?', 'h', 'help'}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/email_login.html#CmdUnconnectedHelp.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.func" title="Permalink to this definition"></a></dt>
<dd><p>Shows help</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.key">
<code class="sig-name descname">key</code><em class="property"> = 'help'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.extended_room">
<span id="evennia-contrib-extended-room-module"></span><h2>evennia.contrib.extended_room module<a class="headerlink" href="#module-evennia.contrib.extended_room" title="Permalink to this headline"></a></h2>
<p>Extended Room</p>
<p>Evennia Contribution - Griatch 2012, vincent-lg 2019</p>
<p>This is an extended Room typeclass for Evennia. It is supported
by an extended <cite>Look</cite> command and an extended <cite>desc</cite> command, also
in this module.</p>
<p>Features:</p>
<ol class="arabic simple">
<li><p>Time-changing description slots</p></li>
</ol>
<p>This allows to change the full description text the room shows
depending on larger time variations. Four seasons (spring, summer,
autumn and winter) are used by default. The season is calculated
on-demand (no Script or timer needed) and updates the full text block.</p>
<p>There is also a general description which is used as fallback if
one or more of the seasonal descriptions are not set when their
time comes.</p>
<p>An updated <cite>desc</cite> command allows for setting seasonal descriptions.</p>
<p>The room uses the <cite>evennia.utils.gametime.GameTime</cite> global script. This is
started by default, but if you have deactivated it, you need to
supply your own time keeping mechanism.</p>
<ol class="arabic simple" start="2">
<li><p>In-description changing tags</p></li>
</ol>
<p>Within each seasonal (or general) description text, you can also embed
time-of-day dependent sections. Text inside such a tag will only show
during that particular time of day. The tags looks like <cite>&lt;timeslot&gt;
&lt;/timeslot&gt;</cite>. By default there are four timeslots per day - morning,
afternoon, evening and night.</p>
<ol class="arabic simple" start="3">
<li><p>Details</p></li>
</ol>
<p>The Extended Room can be “detailed” with special keywords. This makes
use of a special <cite>Look</cite> command. Details are “virtual” targets to look
at, without there having to be a database object created for it. The
Details are simply stored in a dictionary on the room and if the look
command cannot find an object match for a <cite>look &lt;target&gt;</cite> command it
will also look through the available details at the current location
if applicable. The <cite>&#64;detail</cite> command is used to change details.</p>
<ol class="arabic simple" start="4">
<li><p>Extra commands</p></li>
</ol>
<blockquote>
<div><p>CmdExtendedRoomLook - look command supporting room details
CmdExtendedRoomDesc - desc command allowing to add seasonal descs,
CmdExtendedRoomDetail - command allowing to manipulate details in this room</p>
<blockquote>
<div><p>as well as listing them</p>
</div></blockquote>
<dl class="simple">
<dt>CmdExtendedRoomGameTime - A simple <cite>time</cite> command, displaying the current</dt><dd><p>time and season.</p>
</dd>
</dl>
</div></blockquote>
<p>Installation/testing:</p>
<p>Adding the <cite>ExtendedRoomCmdset</cite> to the default character cmdset will add all
new commands for use.</p>
<p>In more detail, in mygame/commands/default_cmdsets.py:</p>
<div class="section" id="id59">
<h3><a href="#id55"><span class="problematic" id="id56">``</span></a><a href="#id57"><span class="problematic" id="id58">`</span></a><a class="headerlink" href="#id59" title="Permalink to this headline"></a></h3>
<p>from evennia.contrib import extended_room # &lt;-new</p>
<dl>
<dt>class CharacterCmdset(default_cmds.Character_CmdSet):</dt><dd><p>
def at_cmdset_creation(self):</p>
<blockquote>
<div><p>
self.add(extended_room.ExtendedRoomCmdSet) # &lt;-new</p>
</div></blockquote>
</dd>
</dl>
<p><a href="#id60"><span class="problematic" id="id61">``</span></a><a href="#id62"><span class="problematic" id="id63">`</span></a></p>
<p>Then reload to make the bew commands available. Note that they only work
on rooms with the typeclass <cite>ExtendedRoom</cite>. Create new rooms with the right
typeclass or use the <cite>typeclass</cite> command to swap existing rooms.</p>
<dl class="class">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.extended_room.</code><code class="sig-name descname">CmdExtendedRoomDesc</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomDesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.building.CmdDesc" title="evennia.commands.default.building.CmdDesc"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.building.CmdDesc</span></code></a></p>
<p><cite>desc</cite> - describe an object or room.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>desc[/switch] [&lt;obj&gt; =] &lt;description&gt;</p>
</dd>
<dt>Switches for <cite>desc</cite>:</dt><dd><p>spring - set description for &lt;season&gt; in current room.
summer
autumn
winter</p>
</dd>
</dl>
<p>Sets the “desc” attribute on an object. If an object is not given,
describe the current room.</p>
<p>You can also embed special time markers in your room description, like this:</p>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">`</span>
<span class="pre">&lt;night&gt;In</span> <span class="pre">the</span> <span class="pre">darkness,</span> <span class="pre">the</span> <span class="pre">forest</span> <span class="pre">looks</span> <span class="pre">foreboding.&lt;/night&gt;.</span>
<span class="pre">`</span></code></p>
</div></blockquote>
<p>Text marked this way will only display when the server is truly at the given
timeslot. The available times are night, morning, afternoon and evening.</p>
<p>Note that seasons and time-of-day slots only work on rooms in this
version of the <cite>desc</cite> command.</p>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('describe', 'desc')</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'desc', 'describe'}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['describe']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomDesc.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.func" title="Permalink to this definition"></a></dt>
<dd><p>Define extended command</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'building'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.key">
<code class="sig-name descname">key</code><em class="property"> = 'desc'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(desc) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.reset_times">
<code class="sig-name descname">reset_times</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomDesc.reset_times"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.reset_times" title="Permalink to this definition"></a></dt>
<dd><p>By deleteting the caches we force a re-load.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'describe', 'category': 'building', 'key': 'desc', 'tags': '', 'text': '\n `desc` - describe an object or room.\n\n Usage:\n desc[/switch] [&lt;obj&gt; =] &lt;description&gt;\n\n Switches for `desc`:\n spring - set description for &lt;season&gt; in current room.\n summer\n autumn\n winter\n\n Sets the &quot;desc&quot; attribute on an object. If an object is not given,\n describe the current room.\n\n You can also embed special time markers in your room description, like this:\n\n ```\n &lt;night&gt;In the darkness, the forest looks foreboding.&lt;/night&gt;.\n ```\n\n Text marked this way will only display when the server is truly at the given\n timeslot. The available times are night, morning, afternoon and evening.\n\n Note that seasons and time-of-day slots only work on rooms in this\n version of the `desc` command.\n\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.switch_options">
<code class="sig-name descname">switch_options</code><em class="property"> = ()</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.switch_options" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.extended_room.</code><code class="sig-name descname">CmdExtendedRoomDetail</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomDetail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>sets a detail on a room</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;detail[/del] &lt;key&gt; [= &lt;description&gt;]
&#64;detail &lt;key&gt;;&lt;alias&gt;;… = description</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>&#64;detail
&#64;detail walls = The walls are covered in …
&#64;detail castle;ruin;tower = The distant ruin …
&#64;detail/del wall
&#64;detail/del castle;ruin;tower</p>
<p>This command allows to show the current room details if you enter it
without any argument. Otherwise, sets or deletes a detail on the current
room, if this room supports details like an extended room. To add new
detail, just use the &#64;detail command, specifying the key, an equal sign
and the description. You can assign the same description to several
details using the alias syntax (replace key by alias1;alias2;alias3;…).
To remove one or several details, use the &#64;detail/del switch.</p>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;detail',)</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;detail'}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomDetail.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'building'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;detail'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': '&#64;detail', 'tags': '', 'text': '\n sets a detail on a room\n\n Usage:\n &#64;detail[/del] &lt;key&gt; [= &lt;description&gt;]\n &#64;detail &lt;key&gt;;&lt;alias&gt;;... = description\n\n Example:\n &#64;detail\n &#64;detail walls = The walls are covered in ...\n &#64;detail castle;ruin;tower = The distant ruin ...\n &#64;detail/del wall\n &#64;detail/del castle;ruin;tower\n\n This command allows to show the current room details if you enter it\n without any argument. Otherwise, sets or deletes a detail on the current\n room, if this room supports details like an extended room. To add new\n detail, just use the &#64;detail command, specifying the key, an equal sign\n and the description. You can assign the same description to several\n details using the alias syntax (replace key by alias1;alias2;alias3;...).\n To remove one or several details, use the &#64;detail/del switch.\n\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.extended_room.</code><code class="sig-name descname">CmdExtendedRoomGameTime</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomGameTime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Check the game time</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>time</p>
</dd>
</dl>
<p>Shows the current in-game time and season.</p>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('time',)</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'time'}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomGameTime.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.func" title="Permalink to this definition"></a></dt>
<dd><p>Reads time info from current room</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.key">
<code class="sig-name descname">key</code><em class="property"> = 'time'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'time', 'tags': '', 'text': '\n Check the game time\n\n Usage:\n time\n\n Shows the current in-game time and season.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.extended_room.</code><code class="sig-name descname">CmdExtendedRoomLook</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomLook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.general.CmdLook" title="evennia.commands.default.general.CmdLook"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.general.CmdLook</span></code></a></p>
<p>look</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>look
look &lt;obj&gt;
look &lt;room detail&gt;
look <a href="#id64"><span class="problematic" id="id65">*</span></a>&lt;account&gt;</p>
</dd>
</dl>
<p>Observes your location, details at your location or objects in your vicinity.</p>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('look', 'ls', 'l')</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'l', 'look', 'ls'}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#CmdExtendedRoomLook.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.func" title="Permalink to this definition"></a></dt>
<dd><p>Handle the looking - add fallback to details.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.key">
<code class="sig-name descname">key</code><em class="property"> = 'look'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look &lt;obj&gt;\n look &lt;room detail&gt;\n look *&lt;account&gt;\n\n Observes your location, details at your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.extended_room.ExtendedRoom">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.extended_room.</code><code class="sig-name descname">ExtendedRoom</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultRoom" title="evennia.objects.objects.DefaultRoom"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultRoom</span></code></a></p>
<p>This room implements a more advanced <cite>look</cite> functionality depending on
time. It also allows for “details”, together with a slightly modified
look command.</p>
<dl class="exception">
<dt id="evennia.contrib.extended_room.ExtendedRoom.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.extended_room.ExtendedRoom.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.ExtendedRoom._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for ExtendedRoom&gt;</em><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.at_object_creation">
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.at_object_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called when room is first created only.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.del_detail">
<code class="sig-name descname">del_detail</code><span class="sig-paren">(</span><em class="sig-param">detailkey</em>, <em class="sig-param">description</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.del_detail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.del_detail" title="Permalink to this definition"></a></dt>
<dd><p>Delete a detail.</p>
<p>The description is ignored.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>detailkey</strong> (<em>str</em>) the detail to remove (case-insensitive).</p></li>
<li><p><strong>description</strong> (<em>str</em><em>, </em><em>ignored</em>) the description.</p></li>
</ul>
</dd>
</dl>
<p>The description is only included for compliance but is completely
ignored. Note that this method doesnt raise any exception if
the detail doesnt exist in this room.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.get_time_and_season">
<code class="sig-name descname">get_time_and_season</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.get_time_and_season"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.get_time_and_season" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the current time and season ids.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.ExtendedRoom.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.extended_room.ExtendedRoom'</em><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.replace_timeslots">
<code class="sig-name descname">replace_timeslots</code><span class="sig-paren">(</span><em class="sig-param">raw_desc</em>, <em class="sig-param">curr_time</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.replace_timeslots"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.replace_timeslots" title="Permalink to this definition"></a></dt>
<dd><p>Filter so that only time markers <cite>&lt;timeslot&gt;&lt;/timeslot&gt;</cite> of
the correct timeslot remains in the description.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raw_desc</strong> (<em>str</em>) The unmodified description.</p></li>
<li><p><strong>curr_time</strong> (<em>str</em>) A timeslot identifier.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A possibly moified description.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>description (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.return_appearance">
<code class="sig-name descname">return_appearance</code><span class="sig-paren">(</span><em class="sig-param">looker</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.return_appearance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.return_appearance" title="Permalink to this definition"></a></dt>
<dd><p>This is called when e.g. the look command wants to retrieve
the description of this object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>looker</strong> (<em>Object</em>) The object looking at us.</p></li>
<li><p><strong>**kwargs</strong> (<em>dict</em>) Arbitrary, optional arguments for users
overriding the call (unused by default).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Our description.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>description (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.return_detail">
<code class="sig-name descname">return_detail</code><span class="sig-paren">(</span><em class="sig-param">key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.return_detail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.return_detail" title="Permalink to this definition"></a></dt>
<dd><p>This will attempt to match a “detail” to look for in the room.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) A detail identifier.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A detail matching the given key.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>detail (str or None)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>A detail is a way to offer more things to look at in a room
without having to add new objects. For this to work, we
require a custom <cite>look</cite> command that allows for <cite>look
&lt;detail&gt;</cite> - the look command should defer to this method on
the current location (if it exists) before giving up on
finding the target.</p>
<p>Details are not season-sensitive, but are parsed for timeslot
markers.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.set_detail">
<code class="sig-name descname">set_detail</code><span class="sig-paren">(</span><em class="sig-param">detailkey</em>, <em class="sig-param">description</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.set_detail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.set_detail" title="Permalink to this definition"></a></dt>
<dd><p>This sets a new detail, using an Attribute “details”.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>detailkey</strong> (<em>str</em>) The detail identifier to add (for
aliases you need to add multiple keys to the
same description). Case-insensitive.</p></li>
<li><p><strong>description</strong> (<em>str</em>) The text to return when looking
at the given detailkey.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.ExtendedRoom.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'ExtendedRoom'</em><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoom.update_current_description">
<code class="sig-name descname">update_current_description</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoom.update_current_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoom.update_current_description" title="Permalink to this definition"></a></dt>
<dd><p>This will update the description of the room if the time or season
has changed since last checked.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.extended_room.ExtendedRoomCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.extended_room.</code><code class="sig-name descname">ExtendedRoomCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoomCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoomCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>Groups the extended-room commands.</p>
<dl class="method">
<dt id="evennia.contrib.extended_room.ExtendedRoomCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/extended_room.html#ExtendedRoomCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoomCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Hook method - this should be overloaded in the inheriting
class, and should take care of populating the cmdset by use of
self.add().</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.extended_room.ExtendedRoomCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.extended_room.ExtendedRoomCmdSet'</em><a class="headerlink" href="#evennia.contrib.extended_room.ExtendedRoomCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
</div>
<div class="section" id="module-evennia.contrib.fieldfill">
<span id="evennia-contrib-fieldfill-module"></span><h2>evennia.contrib.fieldfill module<a class="headerlink" href="#module-evennia.contrib.fieldfill" title="Permalink to this headline"></a></h2>
<p>Easy fillable form</p>
<p>Contrib - Tim Ashley Jenkins 2018</p>
<p>This module contains a function that calls an easily customizable EvMenu - this
menu presents the player with a fillable form, with fields that can be filled
out in any order. Each fields value can be verified, with the function
allowing easy checks for text and integer input, minimum and maximum values /
character lengths, or can even be verified by a custom function. Once the form
is submitted, the forms data is submitted as a dictionary to any callable of
your choice.</p>
<p>The function that initializes the fillable form menu is fairly simple, and
includes the caller, the template for the form, and the callback(caller, result) to which the form
data will be sent to upon submission.</p>
<blockquote>
<div><p>init_fill_field(formtemplate, caller, formcallback)</p>
</div></blockquote>
<p>Form templates are defined as a list of dictionaries - each dictionary
represents a field in the form, and contains the data for the fields name and
behavior. For example, this basic form template will allow a player to fill out
a brief character profile:</p>
<blockquote>
<div><p>PROFILE_TEMPLATE = [
{“fieldname”:”Name”, “fieldtype”:”text”},
{“fieldname”:”Age”, “fieldtype”:”number”},
{“fieldname”:”History”, “fieldtype”:”text”},
]</p>
</div></blockquote>
<p>This will present the player with an EvMenu showing this basic form:</p>
<blockquote>
<div><blockquote>
<div><dl class="simple">
<dt>Name:</dt><dd><p>Age:</p>
</dd>
</dl>
</div></blockquote>
<p>History:</p>
</div></blockquote>
<p>While in this menu, the player can assign a new value to any field with the
syntax &lt;field&gt; = &lt;new value&gt;, like so:</p>
<blockquote>
<div><p>&gt; name = Ashley
Field Name set to: Ashley</p>
</div></blockquote>
<p>Typing look by itself will show the form and its current values.</p>
<blockquote>
<div><blockquote>
<div><p>&gt; look</p>
<blockquote>
<div><dl class="simple">
<dt>Name: Ashley</dt><dd><p>Age:</p>
</dd>
</dl>
</div></blockquote>
</div></blockquote>
<p>History:</p>
</div></blockquote>
<p>Number fields require an integer input, and will reject any text that cant
be converted into an integer.</p>
<blockquote>
<div><p>&gt; age = youthful
Field Age requires a number.
&gt; age = 31
Field Age set to: 31</p>
</div></blockquote>
<p>Form data is presented as an EvTable, so text of any length will wrap cleanly.</p>
<blockquote>
<div><blockquote>
<div><p>&gt; history = EVERY MORNING I WAKE UP AND OPEN PALM SLAM[…]
Field History set to: EVERY MORNING I WAKE UP AND[…]
&gt; look</p>
<blockquote>
<div><dl class="simple">
<dt>Name: Ashley</dt><dd><p>Age: 31</p>
</dd>
</dl>
</div></blockquote>
</div></blockquote>
<dl class="simple">
<dt>History: EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT.</dt><dd><p>ITS CHRONICLES OF RIDDICK AND RIGHT THEN AND THERE I START DOING
THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, RIDDICK. I DO EVERY
MOVE AND I DO EVERY MOVE HARD.</p>
</dd>
</dl>
</div></blockquote>
<p>When the player types submit (or your specified submit command), the menu
quits and the forms data is passed to your specified function as a dictionary,
like so:</p>
<blockquote>
<div><p>formdata = {“Name”:”Ashley”, “Age”:31, “History”:”EVERY MORNING I[…]”}</p>
</div></blockquote>
<p>You can do whatever you like with this data in your function - forms can be used
to set data on a character, to help builders create objects, or for players to
craft items or perform other complicated actions with many variables involved.</p>
<p>The data that your form will accept can also be specified in your form template -
lets say, for example, that you wont accept ages under 18 or over 100. You can
do this by specifying “min” and “max” values in your fields dictionary:</p>
<blockquote>
<div><p>PROFILE_TEMPLATE = [
{“fieldname”:”Name”, “fieldtype”:”text”},
{“fieldname”:”Age”, “fieldtype”:”number”, “min”:18, “max”:100},
{“fieldname”:”History”, “fieldtype”:”text”}
]</p>
</div></blockquote>
<p>Now if the player tries to enter a value out of range, the form will not acept the
given value.</p>
<blockquote>
<div><p>&gt; age = 10
Field Age reqiures a minimum value of 18.
&gt; age = 900
Field Age has a maximum value of 100.</p>
</div></blockquote>
<p>Setting min and max for a text field will instead act as a minimum or
maximum character length for the players input.</p>
<p>There are lots of ways to present the form to the player - fields can have default
values or show a custom message in place of a blank value, and player input can be
verified by a custom function, allowing for a great deal of flexibility. There
is also an option for bool fields, which accept only a True / False input and
can be customized to represent the choice to the player however you like (E.G.
Yes/No, On/Off, Enabled/Disabled, etc.)</p>
<p>This module contains a simple example form that demonstrates all of the included
functionality - a command that allows a player to compose a message to another
online character and have it send after a custom delay. You can test it by
importing this module in your games default_cmdsets.py module and adding
CmdTestMenu to your default characters command set.</p>
<p>FIELD TEMPLATE KEYS:
Required:</p>
<blockquote>
<div><p>fieldname (str): Name of the field, as presented to the player.
fieldtype (str): Type of value required: text, number, or bool.</p>
</div></blockquote>
<dl>
<dt>Optional:</dt><dd><p>max (int): Maximum character length (if text) or value (if number).
min (int): Minimum charater length (if text) or value (if number).
truestr (str): String for a True value in a bool field.</p>
<blockquote>
<div><p>(E.G. On, Enabled, Yes)</p>
</div></blockquote>
<dl class="simple">
<dt>falsestr (str): String for a False value in a bool field.</dt><dd><p>(E.G. Off, Disabled, No)</p>
</dd>
</dl>
<p>default (str): Initial value (blank if not given).
blankmsg (str): Message to show in place of value when field is blank.
cantclear (bool): Field cant be cleared if True.
required (bool): If True, form cannot be submitted while field is blank.
verifyfunc (callable): Name of a callable used to verify input - takes</p>
<blockquote>
<div><p>(caller, value) as arguments. If the function returns True,
the players input is considered valid - if it returns False,
the input is rejected. Any other value returned will act as
the fields new value, replacing the players input. This
allows for values that arent strings or integers (such as
object dbrefs). For boolean fields, return 0 or 1 to set
the field to False or True.</p>
</div></blockquote>
</dd>
</dl>
<dl class="class">
<dt id="evennia.contrib.fieldfill.CmdTestMenu">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">CmdTestMenu</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#CmdTestMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>This test command will initialize a menu that presents you with a form.
You can fill out the fields of this form in any order, and then type in
send to send a message to another online player, which will reach them
after a delay you specify.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&lt;field&gt; = &lt;new value&gt;
clear &lt;field&gt;
help
look
quit
send</p>
</dd>
</dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('testmenu',)</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'testmenu'}</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.fieldfill.CmdTestMenu.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#CmdTestMenu.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.func" title="Permalink to this definition"></a></dt>
<dd><p>This performs the actual command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu.key">
<code class="sig-name descname">key</code><em class="property"> = 'testmenu'</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.fieldfill.CmdTestMenu.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'testmenu', 'tags': '', 'text': &quot;\n This test command will initialize a menu that presents you with a form.\n You can fill out the fields of this form in any order, and then type in\n 'send' to send a message to another online player, which will reach them\n after a delay you specify.\n\n Usage:\n &lt;field&gt; = &lt;new value&gt;\n clear &lt;field&gt;\n help\n look\n quit\n send\n &quot;}</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.fieldfill.FieldEvMenu">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">FieldEvMenu</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">menudata</em>, <em class="sig-param">startnode='start'</em>, <em class="sig-param">cmdset_mergetype='Replace'</em>, <em class="sig-param">cmdset_priority=1</em>, <em class="sig-param">auto_quit=True</em>, <em class="sig-param">auto_look=True</em>, <em class="sig-param">auto_help=True</em>, <em class="sig-param">cmd_on_exit='look'</em>, <em class="sig-param">persistent=False</em>, <em class="sig-param">startnode_input=''</em>, <em class="sig-param">session=None</em>, <em class="sig-param">debug=False</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#FieldEvMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.FieldEvMenu" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.evmenu.EvMenu" title="evennia.utils.evmenu.EvMenu"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.evmenu.EvMenu</span></code></a></p>
<p>Custom EvMenu type with its own node formatter - removes extraneous lines</p>
<dl class="method">
<dt id="evennia.contrib.fieldfill.FieldEvMenu.node_formatter">
<code class="sig-name descname">node_formatter</code><span class="sig-paren">(</span><em class="sig-param">nodetext</em>, <em class="sig-param">optionstext</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#FieldEvMenu.node_formatter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.FieldEvMenu.node_formatter" title="Permalink to this definition"></a></dt>
<dd><p>Formats the entirety of the node.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>nodetext</strong> (<em>str</em>) The node text as returned by <cite>self.nodetext_formatter</cite>.</p></li>
<li><p><strong>optionstext</strong> (<em>str</em>) The options display as returned by <cite>self.options_formatter</cite>.</p></li>
<li><p><strong>caller</strong> (<em>Object</em><em>, </em><em>Account</em><em> or </em><em>None</em><em>, </em><em>optional</em>) The caller of the node.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The formatted node to display.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>node (str)</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.display_formdata">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">display_formdata</code><span class="sig-paren">(</span><em class="sig-param">formtemplate</em>, <em class="sig-param">formdata</em>, <em class="sig-param">pretext=''</em>, <em class="sig-param">posttext=''</em>, <em class="sig-param">borderstyle='cells'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#display_formdata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.display_formdata" title="Permalink to this definition"></a></dt>
<dd><p>Displays a forms current data as a table. Used in the form menu.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>formtemplate</strong> (<em>list of dicts</em>) Template for the form</p></li>
<li><p><strong>formdata</strong> (<em>dict</em>) Forms current data</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Options:</dt><dd><p>pretext (str): Text to put before the form table.
posttext (str): Text to put after the form table.
borderstyle (str): EvTables border style.</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.form_template_to_dict">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">form_template_to_dict</code><span class="sig-paren">(</span><em class="sig-param">formtemplate</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#form_template_to_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.form_template_to_dict" title="Permalink to this definition"></a></dt>
<dd><p>Initializes a dictionary of form data from the given list-of-dictionaries
form template, as formatted above.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>formtemplate</strong> (<em>list of dicts</em>) Tempate for the form to be initialized.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Dictionary of initalized form data.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>formdata (dict)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.init_delayed_message">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">init_delayed_message</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">formdata</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#init_delayed_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.init_delayed_message" title="Permalink to this definition"></a></dt>
<dd><p>Initializes a delayed message, using data from the example form.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>obj</em>) Character submitting the message.</p></li>
<li><p><strong>formdata</strong> (<em>dict</em>) Data from submitted form.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.init_fill_field">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">init_fill_field</code><span class="sig-paren">(</span><em class="sig-param">formtemplate</em>, <em class="sig-param">caller</em>, <em class="sig-param">formcallback</em>, <em class="sig-param">pretext=''</em>, <em class="sig-param">posttext=''</em>, <em class="sig-param">submitcmd='submit'</em>, <em class="sig-param">borderstyle='cells'</em>, <em class="sig-param">formhelptext=None</em>, <em class="sig-param">persistent=False</em>, <em class="sig-param">initial_formdata=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#init_fill_field"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.init_fill_field" title="Permalink to this definition"></a></dt>
<dd><p>Initializes a menu presenting a player with a fillable form - once the form
is submitted, the data will be passed as a dictionary to your chosen
function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>formtemplate</strong> (<em>list of dicts</em>) The template for the forms fields.</p></li>
<li><p><strong>caller</strong> (<em>obj</em>) Player who will be filling out the form.</p></li>
<li><p><strong>formcallback</strong> (<em>callable</em>) Function to pass the completed forms data to.</p></li>
</ul>
</dd>
</dl>
<dl>
<dt>Options:</dt><dd><p>pretext (str): Text to put before the form in the menu.
posttext (str): Text to put after the form in the menu.
submitcmd (str): Command used to submit the form.
borderstyle (str): Forms EvTable border style.
formhelptext (str): Help text for the form menu (or default is provided).
persistent (bool): Whether to make the EvMenu persistent across reboots.
initial_formdata (dict): Initial data for the form - a blank form with</p>
<blockquote>
<div><p>defaults specified in the template will be generated otherwise.
In the case of a form used to edit properties on an object or a
similar application, you may want to generate the initial form
data dynamically before calling init_fill_field.</p>
</div></blockquote>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.menunode_fieldfill">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">menunode_fieldfill</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">raw_string</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#menunode_fieldfill"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.menunode_fieldfill" title="Permalink to this definition"></a></dt>
<dd><p>This is an EvMenu node, which calls itself over and over in order to
allow a player to enter values into a fillable form. When the form is
submitted, the form data is passed to a callback as a dictionary.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.sendmessage">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">sendmessage</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">text</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#sendmessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.sendmessage" title="Permalink to this definition"></a></dt>
<dd><p>Callback to send a message to a player.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>obj</strong> (<em>obj</em>) Player to message.</p></li>
<li><p><strong>text</strong> (<em>str</em>) Message.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.fieldfill.verify_online_player">
<code class="sig-prename descclassname">evennia.contrib.fieldfill.</code><code class="sig-name descname">verify_online_player</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/fieldfill.html#verify_online_player"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.fieldfill.verify_online_player" title="Permalink to this definition"></a></dt>
<dd><p>Example verify function that matches player input to an online character
or else rejects their input as invalid.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>obj</em>) Player entering the form data.</p></li>
<li><p><strong>value</strong> (<em>str</em>) String player entered into the form, to be verified.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>dbref to a currently logged in</dt><dd><p>character object - reference to the object will be stored in
the form instead of a string. Returns False if no match is
made.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>matched_character (obj or False)</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.gendersub">
<span id="evennia-contrib-gendersub-module"></span><h2>evennia.contrib.gendersub module<a class="headerlink" href="#module-evennia.contrib.gendersub" title="Permalink to this headline"></a></h2>
<p>Gendersub</p>
<p>Griatch 2015</p>
<p>This is a simple gender-aware Character class for allowing users to
insert custom markers in their text to indicate gender-aware
messaging. It relies on a modified msg() and is meant as an
inspiration and starting point to how to do stuff like this.</p>
<dl class="simple">
<dt>An object can have the following genders:</dt><dd><ul class="simple">
<li><p>male (he/his)</p></li>
<li><p>female (her/hers)</p></li>
<li><p>neutral (it/its)</p></li>
<li><p>ambiguous (they/them/their/theirs)</p></li>
</ul>
</dd>
</dl>
<p>When in use, messages can contain special tags to indicate pronouns gendered
based on the one being addressed. Capitalization will be retained.</p>
<ul class="simple">
<li><p><cite>|s</cite>, <cite>|S</cite>: Subjective form: he, she, it, He, She, It, They</p></li>
<li><p><cite>|o</cite>, <cite>|O</cite>: Objective form: him, her, it, Him, Her, It, Them</p></li>
<li><p><cite>|p</cite>, <cite>|P</cite>: Possessive form: his, her, its, His, Her, Its, Their</p></li>
<li><p><cite>|a</cite>, <cite>|A</cite>: Absolute Possessive form: his, hers, its, His, Hers, Its, Theirs</p></li>
</ul>
<p>For example,</p>
<p><code class="docutils literal notranslate"><span class="pre">`</span>
<span class="pre">char.msg(&quot;%s</span> <span class="pre">falls</span> <span class="pre">on</span> <span class="pre">|p</span> <span class="pre">face</span> <span class="pre">with</span> <span class="pre">a</span> <span class="pre">thud.&quot;</span> <span class="pre">%</span> <span class="pre">char.key)</span>
<span class="pre">&quot;Tom</span> <span class="pre">falls</span> <span class="pre">on</span> <span class="pre">his</span> <span class="pre">face</span> <span class="pre">with</span> <span class="pre">a</span> <span class="pre">thud&quot;</span>
<span class="pre">`</span></code></p>
<p>The default gender is “ambiguous” (they/them/their/theirs).</p>
<p>To use, have DefaultCharacter inherit from this, or change
setting.DEFAULT_CHARACTER to point to this class.</p>
<p>The <cite>&#64;gender</cite> command is used to set the gender. It needs to be added to the
default cmdset before it becomes available.</p>
<dl class="class">
<dt id="evennia.contrib.gendersub.GenderCharacter">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.gendersub.</code><code class="sig-name descname">GenderCharacter</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/gendersub.html#GenderCharacter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultCharacter" title="evennia.objects.objects.DefaultCharacter"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultCharacter</span></code></a></p>
<p>This is a Character class aware of gender.</p>
<dl class="exception">
<dt id="evennia.contrib.gendersub.GenderCharacter.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.gendersub.GenderCharacter.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.gendersub.GenderCharacter._get_pronoun">
<code class="sig-name descname">_get_pronoun</code><span class="sig-paren">(</span><em class="sig-param">regex_match</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/gendersub.html#GenderCharacter._get_pronoun"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter._get_pronoun" title="Permalink to this definition"></a></dt>
<dd><p>Get pronoun from the pronoun marker in the text. This is used as
the callable for the re.sub function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>regex_match</strong> (<em>MatchObject</em>) the regular expression match.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<ul class="simple">
<li><p><cite>|s</cite>, <cite>|S</cite>: Subjective form: he, she, it, He, She, It, They</p></li>
<li><p><cite>|o</cite>, <cite>|O</cite>: Objective form: him, her, it, Him, Her, It, Them</p></li>
<li><p><cite>|p</cite>, <cite>|P</cite>: Possessive form: his, her, its, His, Her, Its, Their</p></li>
<li><p><cite>|a</cite>, <cite>|A</cite>: Absolute Possessive form: his, hers, its, His, Hers, Its, Theirs</p></li>
</ul>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.GenderCharacter._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for GenderCharacter&gt;</em><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.gendersub.GenderCharacter.at_object_creation">
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/gendersub.html#GenderCharacter.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter.at_object_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called once when the object is created.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.gendersub.GenderCharacter.msg">
<code class="sig-name descname">msg</code><span class="sig-paren">(</span><em class="sig-param">text</em>, <em class="sig-param">from_obj=None</em>, <em class="sig-param">session=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/gendersub.html#GenderCharacter.msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter.msg" title="Permalink to this definition"></a></dt>
<dd><p>Emits something to a session attached to the object.
Overloads the default msg() implementation to include
gender-aware markers in output.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>str</em><em> or </em><em>tuple</em><em>, </em><em>optional</em>) The message to send. This
is treated internally like any send-command, so its
value can be a tuple if sending multiple arguments to
the <cite>text</cite> oob command.</p></li>
<li><p><strong>from_obj</strong> (<em>obj</em><em>, </em><em>optional</em>) object that is sending. If
given, at_msg_send will be called</p></li>
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em> or </em><em>list</em><em>, </em><em>optional</em>) session or list of
sessions to relay to, if any. If set, will
force send regardless of MULTISESSION_MODE.</p></li>
</ul>
</dd>
</dl>
<p class="rubric">Notes</p>
<p><cite>at_msg_receive</cite> will be called on this Object.
All extra kwargs will be passed on to the protocol.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.GenderCharacter.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.gendersub.GenderCharacter'</em><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.GenderCharacter.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'GenderCharacter'</em><a class="headerlink" href="#evennia.contrib.gendersub.GenderCharacter.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.gendersub.SetGender">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.gendersub.</code><code class="sig-name descname">SetGender</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/gendersub.html#SetGender"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.gendersub.SetGender" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>Sets gender on yourself</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;gender male||female||neutral||ambiguous</p>
</dd>
</dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;gender', '&#64;sex')</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;gender', '&#64;sex'}</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;sex']</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.gendersub.SetGender.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/gendersub.html#SetGender.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.func" title="Permalink to this definition"></a></dt>
<dd><p>Implements the command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;gender'</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();call:all()'</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all();call:all()'</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.gendersub.SetGender.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;sex', 'category': 'general', 'key': '&#64;gender', 'tags': '', 'text': '\n Sets gender on yourself\n\n Usage:\n &#64;gender male||female||neutral||ambiguous\n\n '}</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.health_bar">
<span id="evennia-contrib-health-bar-module"></span><h2>evennia.contrib.health_bar module<a class="headerlink" href="#module-evennia.contrib.health_bar" title="Permalink to this headline"></a></h2>
<p>Health Bar</p>
<p>Contrib - Tim Ashley Jenkins 2017</p>
<p>The function provided in this module lets you easily display visual
bars or meters - “health bar” is merely the most obvious use for this,
though these bars are highly customizable and can be used for any sort
of appropriate data besides player health.</p>
<p>Todays players may be more used to seeing statistics like health,
stamina, magic, and etc. displayed as bars rather than bare numerical
values, so using this module to present this data this way may make it
more accessible. Keep in mind, however, that players may also be using
a screen reader to connect to your game, which will not be able to
represent the colors of the bar in any way. By default, the values
represented are rendered as text inside the bar which can be read by
screen readers.</p>
<p>The health bar will account for current values above the maximum or
below 0, rendering them as a completely full or empty bar with the
values displayed within.</p>
<dl class="function">
<dt id="evennia.contrib.health_bar.display_meter">
<code class="sig-prename descclassname">evennia.contrib.health_bar.</code><code class="sig-name descname">display_meter</code><span class="sig-paren">(</span><em class="sig-param">cur_value, max_value, length=30, fill_color=['R', 'Y', 'G'], empty_color='B', text_color='w', align='left', pre_text='', post_text='', show_values=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/health_bar.html#display_meter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.health_bar.display_meter" title="Permalink to this definition"></a></dt>
<dd><p>Represents a current and maximum value given as a “bar” rendered with
ANSI or xterm256 background colors.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cur_value</strong> (<em>int</em>) Current value to display</p></li>
<li><p><strong>max_value</strong> (<em>int</em>) Maximum value to display</p></li>
</ul>
</dd>
</dl>
<dl>
<dt>Options:</dt><dd><p>length (int): Length of meter returned, in characters
fill_color (list): List of color codes for the full portion</p>
<blockquote>
<div><p>of the bar, sans any sort of prefix - both ANSI and xterm256
colors are usable. When the bar is empty, colors toward the
start of the list will be chosen - when the bar is full, colors
towards the end are picked. You can adjust the weights of
the changing colors by adding multiple entries of the same
color - for example, if you only want the bar to change when
its close to empty, you could supply [R,Y,G,G,G]</p>
</div></blockquote>
<p>empty_color (str): Color code for the empty portion of the bar.
text_color (str): Color code for text inside the bar.
align (str): “left”, “right”, or “center” - alignment of text in the bar
pre_text (str): Text to put before the numbers in the bar
post_text (str): Text to put after the numbers in the bar
show_values (bool): If true, shows the numerical values represented by</p>
<blockquote>
<div><p>the bar. Its highly recommended you keep this on, especially if
theres no info given in pre_text or post_text, as players on screen
readers will be unable to read the graphical aspect of the bar.</p>
</div></blockquote>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.mail">
<span id="evennia-contrib-mail-module"></span><h2>evennia.contrib.mail module<a class="headerlink" href="#module-evennia.contrib.mail" title="Permalink to this headline"></a></h2>
<p>In-Game Mail system</p>
<p>Evennia Contribution - grungies1138 2016</p>
<p>A simple Brandymail style &#64;mail system that uses the Msg class from Evennia
Core. It has two Commands, both of which can be used on their own:</p>
<blockquote>
<div><ul class="simple">
<li><p>CmdMail - this should sit on the Account cmdset and makes the &#64;mail command</p></li>
</ul>
<blockquote>
<div><p>available both IC and OOC. Mails will always go to Accounts (other players).</p>
</div></blockquote>
<ul class="simple">
<li><p>CmdMailCharacter - this should sit on the Character cmdset and makes the &#64;mail</p></li>
</ul>
<blockquote>
<div><p>command ONLY available when puppeting a character. Mails will be sent to other
Characters only and will not be available when OOC.</p>
</div></blockquote>
<ul class="simple">
<li><p>If adding <em>both</em> commands to their respective cmdsets, youll get two separate</p></li>
</ul>
<blockquote>
<div><p>IC and OOC mailing systems, with different lists of mail for IC and OOC modes.</p>
</div></blockquote>
</div></blockquote>
<p>Installation:</p>
<p>Install one or both of the following (see above):</p>
<ul>
<li><p>CmdMail (IC + OOC mail, sent between players)</p>
<blockquote>
<div><p># mygame/commands/default_cmds.py</p>
<p>from evennia.contrib import mail</p>
<dl class="simple">
<dt># in AccountCmdSet.at_cmdset_creation:</dt><dd><p>self.add(mail.CmdMail())</p>
</dd>
</dl>
</div></blockquote>
</li>
<li><p>CmdMailCharacter (optional, IC only mail, sent between characters)</p>
<blockquote>
<div><p># mygame/commands/default_cmds.py</p>
<p>from evennia.contrib import mail</p>
<dl class="simple">
<dt># in CharacterCmdSet.at_cmdset_creation:</dt><dd><p>self.add(mail.CmdMailCharacter())</p>
</dd>
</dl>
</div></blockquote>
</li>
</ul>
<p>Once installed, use <cite>help mail</cite> in game for help with the mail command. Use
&#64;ic/&#64;ooc to switch in and out of IC/OOC modes.</p>
<dl class="class">
<dt id="evennia.contrib.mail.CmdMail">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.mail.</code><code class="sig-name descname">CmdMail</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMail" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxAccountCommand" title="evennia.commands.default.muxcommand.MuxAccountCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxAccountCommand</span></code></a></p>
<p>Communicate with others by sending mail.</p>
<dl>
<dt>Usage:</dt><dd><p>&#64;mail - Displays all the mail an account has in their mailbox
&#64;mail &lt;#&gt; - Displays a specific message
&#64;mail &lt;accounts&gt;=&lt;subject&gt;/&lt;message&gt;</p>
<blockquote>
<div><ul class="simple">
<li><p>Sends a message to the comma separated list of accounts.</p></li>
</ul>
</div></blockquote>
<p>&#64;mail/delete &lt;#&gt; - Deletes a specific message
&#64;mail/forward &lt;account list&gt;=&lt;#&gt;[/&lt;Message&gt;]</p>
<blockquote>
<div><ul class="simple">
<li><p>Forwards an existing message to the specified list of accounts,
original message is delivered with optional Message prepended.</p></li>
</ul>
</div></blockquote>
<dl class="simple">
<dt>&#64;mail/reply &lt;#&gt;=&lt;message&gt;</dt><dd><ul class="simple">
<li><p>Replies to a message #. Prepends message to the original
message text.</p></li>
</ul>
</dd>
</dl>
</dd>
<dt>Switches:</dt><dd><p>delete - deletes a message
forward - forward a received message to another object with an optional message attached.
reply - Replies to a received message, appending the original message to the bottom.</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>&#64;mail 2
&#64;mail Griatch=New mail/Hey man, I am sending you a message!
&#64;mail/delete 6
&#64;mail/forward feend78 Griatch=4/You guys should read this.
&#64;mail/reply 9=Thanks for the info!</p>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('mail', '&#64;mail')</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;mail', 'mail'}</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['mail']</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.mail.CmdMail.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMail.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMail.func" title="Permalink to this definition"></a></dt>
<dd><p>Do the main command functionality</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.mail.CmdMail.get_all_mail">
<code class="sig-name descname">get_all_mail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMail.get_all_mail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMail.get_all_mail" title="Permalink to this definition"></a></dt>
<dd><dl class="simple">
<dt>Returns a list of all the messages where the caller is a recipient. These</dt><dd><p>are all messages tagged with tags of the <cite>mail</cite> category.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Matching Msg objects.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>messages (QuerySet)</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;mail'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail.lock">
<code class="sig-name descname">lock</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.lock" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.mail.CmdMail.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMail.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMail.parse" title="Permalink to this definition"></a></dt>
<dd><p>Add convenience check to know if caller is an Account or not since this cmd
will be able to add to either Object- or Account level.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMail.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'mail', 'category': 'general', 'key': '&#64;mail', 'tags': '', 'text': '\n Communicate with others by sending mail.\n\n Usage:\n &#64;mail - Displays all the mail an account has in their mailbox\n &#64;mail &lt;#&gt; - Displays a specific message\n &#64;mail &lt;accounts&gt;=&lt;subject&gt;/&lt;message&gt;\n - Sends a message to the comma separated list of accounts.\n &#64;mail/delete &lt;#&gt; - Deletes a specific message\n &#64;mail/forward &lt;account list&gt;=&lt;#&gt;[/&lt;Message&gt;]\n - Forwards an existing message to the specified list of accounts,\n original message is delivered with optional Message prepended.\n &#64;mail/reply &lt;#&gt;=&lt;message&gt;\n - Replies to a message #. Prepends message to the original\n message text.\n Switches:\n delete - deletes a message\n forward - forward a received message to another object with an optional message attached.\n reply - Replies to a received message, appending the original message to the bottom.\n Examples:\n &#64;mail 2\n &#64;mail Griatch=New mail/Hey man, I am sending you a message!\n &#64;mail/delete 6\n &#64;mail/forward feend78 Griatch=4/You guys should read this.\n &#64;mail/reply 9=Thanks for the info!\n\n '}</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.mail.CmdMail.search_targets">
<code class="sig-name descname">search_targets</code><span class="sig-paren">(</span><em class="sig-param">namelist</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMail.search_targets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMail.search_targets" title="Permalink to this definition"></a></dt>
<dd><p>Search a list of targets of the same type as caller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Account</em>) The type of object to search.</p></li>
<li><p><strong>namelist</strong> (<em>list</em>) List of strings for objects to search for.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Any target matches.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>targetlist (Queryset)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.mail.CmdMail.send_mail">
<code class="sig-name descname">send_mail</code><span class="sig-paren">(</span><em class="sig-param">recipients</em>, <em class="sig-param">subject</em>, <em class="sig-param">message</em>, <em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMail.send_mail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMail.send_mail" title="Permalink to this definition"></a></dt>
<dd><p>Function for sending new mail. Also useful for sending notifications
from objects or systems.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>recipients</strong> (<em>list</em>) list of Account or Character objects to receive
the newly created mails.</p></li>
<li><p><strong>subject</strong> (<em>str</em>) The header or subject of the message to be delivered.</p></li>
<li><p><strong>message</strong> (<em>str</em>) The body of the message being sent.</p></li>
<li><p><strong>caller</strong> (<em>obj</em>) The object (or Account or Character) that is sending the message.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.mail.CmdMailCharacter">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.mail.</code><code class="sig-name descname">CmdMailCharacter</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mail.html#CmdMailCharacter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.mail.CmdMail" title="evennia.contrib.mail.CmdMail"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.mail.CmdMail</span></code></a></p>
<p>Communicate with others by sending mail.</p>
<dl>
<dt>Usage:</dt><dd><p>&#64;mail - Displays all the mail an account has in their mailbox
&#64;mail &lt;#&gt; - Displays a specific message
&#64;mail &lt;accounts&gt;=&lt;subject&gt;/&lt;message&gt;</p>
<blockquote>
<div><ul class="simple">
<li><p>Sends a message to the comma separated list of accounts.</p></li>
</ul>
</div></blockquote>
<p>&#64;mail/delete &lt;#&gt; - Deletes a specific message
&#64;mail/forward &lt;account list&gt;=&lt;#&gt;[/&lt;Message&gt;]</p>
<blockquote>
<div><ul class="simple">
<li><p>Forwards an existing message to the specified list of accounts,
original message is delivered with optional Message prepended.</p></li>
</ul>
</div></blockquote>
<dl class="simple">
<dt>&#64;mail/reply &lt;#&gt;=&lt;message&gt;</dt><dd><ul class="simple">
<li><p>Replies to a message #. Prepends message to the original
message text.</p></li>
</ul>
</dd>
</dl>
</dd>
<dt>Switches:</dt><dd><p>delete - deletes a message
forward - forward a received message to another object with an optional message attached.
reply - Replies to a received message, appending the original message to the bottom.</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>&#64;mail 2
&#64;mail Griatch=New mail/Hey man, I am sending you a message!
&#64;mail/delete 6
&#64;mail/forward feend78 Griatch=4/You guys should read this.
&#64;mail/reply 9=Thanks for the info!</p>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('mail', '&#64;mail')</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;mail', 'mail'}</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter.account_caller">
<code class="sig-name descname">account_caller</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.account_caller" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['mail']</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;mail'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mail.CmdMailCharacter.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'mail', 'category': 'general', 'key': '&#64;mail', 'tags': '', 'text': '\n Communicate with others by sending mail.\n\n Usage:\n &#64;mail - Displays all the mail an account has in their mailbox\n &#64;mail &lt;#&gt; - Displays a specific message\n &#64;mail &lt;accounts&gt;=&lt;subject&gt;/&lt;message&gt;\n - Sends a message to the comma separated list of accounts.\n &#64;mail/delete &lt;#&gt; - Deletes a specific message\n &#64;mail/forward &lt;account list&gt;=&lt;#&gt;[/&lt;Message&gt;]\n - Forwards an existing message to the specified list of accounts,\n original message is delivered with optional Message prepended.\n &#64;mail/reply &lt;#&gt;=&lt;message&gt;\n - Replies to a message #. Prepends message to the original\n message text.\n Switches:\n delete - deletes a message\n forward - forward a received message to another object with an optional message attached.\n reply - Replies to a received message, appending the original message to the bottom.\n Examples:\n &#64;mail 2\n &#64;mail Griatch=New mail/Hey man, I am sending you a message!\n &#64;mail/delete 6\n &#64;mail/forward feend78 Griatch=4/You guys should read this.\n &#64;mail/reply 9=Thanks for the info!\n\n '}</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.mapbuilder">
<span id="evennia-contrib-mapbuilder-module"></span><h2>evennia.contrib.mapbuilder module<a class="headerlink" href="#module-evennia.contrib.mapbuilder" title="Permalink to this headline"></a></h2>
<p>Evennia World Builder</p>
<p>Contribution - Cloud_Keeper 2016</p>
<p>Build a map from a 2D ASCII map.</p>
<p>This is a command which takes two inputs:</p>
<p>≈≈≈≈≈
≈♣n♣≈ MAP_LEGEND = {(“♣”, “♠”): build_forest,
≈∩▲∩≈ (“∩”, “n”): build_mountains,
≈♠n♠≈ (“▲”): build_temple}
≈≈≈≈≈</p>
<p>A string of ASCII characters representing a map and a dictionary of functions
containing build instructions. The characters of the map are iterated over and
compared to a list of trigger characters. When a match is found the
corresponding function is executed generating the rooms, exits and objects as
defined by the users build instructions. If a character is not a match to
a provided trigger character (including spaces) it is simply skipped and the
process continues.</p>
<p>For instance, the above map represents a temple (▲) amongst mountains (n,∩)
in a forest (♣,♠) on an island surrounded by water (≈). Each character on the
first line is iterated over but as there is no match with our MAP_LEGEND it
is skipped. On the second line it finds “♣” which is a match and so the
<cite>build_forest</cite> function is called. Next the <cite>build_mountains</cite> function is
called and so on until the map is completed. Building instructions are passed
the following arguments:</p>
<blockquote>
<div><p>x - The rooms position on the maps x axis
y - The rooms position on the maps y axis
caller - The account calling the command
iteration - The current iterations number (0, 1 or 2)
room_dict - A dictionary containing room references returned by build</p>
<blockquote>
<div><p>functions where tuple coordinates are the keys (x, y).
ie room_dict[(2, 2)] will return the temple room above.</p>
</div></blockquote>
</div></blockquote>
<p>Building functions should return the room they create. By default these rooms
are used to create exits between valid adjacent rooms to the north, south,
east and west directions. This behaviour can turned off with the use of switch
arguments. In addition to turning off automatic exit generation the switches
allow the map to be iterated over a number of times. This is important for
something like custom exit building. Exits require a reference to both the
exits location and the exits destination. During the first iteration it is
possible that an exit is created pointing towards a destination that
has not yet been created resulting in error. By iterating over the map twice
the rooms can be created on the first iteration and room reliant code can be
be used on the second iteration. The iteration number and a dictionary of
references to rooms previously created is passed to the build commands.</p>
<p>Use by importing and including the command in your default_cmdsets module.
For example:</p>
<blockquote>
<div><p># mygame/commands/default_cmdsets.py</p>
<p>from evennia.contrib import mapbuilder</p>
<p></p>
<p>self.add(mapbuilder.CmdMapBuilder())</p>
</div></blockquote>
<p>You then call the command in-game using the path to the MAP and MAP_LEGEND vars
The path you provide is relative to the evennia or mygame folder.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;mapbuilder[/switch] &lt;path.to.file.MAPNAME&gt; &lt;path.to.file.MAP_LEGEND&gt;</p>
</dd>
<dt>Switches:</dt><dd><p>one - execute build instructions once without automatic exit creation.
two - execute build instructions twice without automatic exit creation.</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>&#64;mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND
&#64;mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
&#64;mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND</p>
<blockquote>
<div><p>(Legend path defaults to map path)</p>
</div></blockquote>
<p>Below are two examples showcasing the use of automatic exit generation and
custom exit generation. Whilst located, and can be used, from this module for
convenience The below example code should be in mymap.py in mygame/world.</p>
<dl class="class">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">CmdMapBuilder</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#CmdMapBuilder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Build a map from a 2D ASCII map.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;mapbuilder[/switch] &lt;path.to.file.MAPNAME&gt; &lt;path.to.file.MAP_LEGEND&gt;</p>
</dd>
<dt>Switches:</dt><dd><p>one - execute build instructions once without automatic exit creation
two - execute build instructions twice without automatic exit creation</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>&#64;mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND
&#64;mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
&#64;mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND</p>
<blockquote>
<div><p>(Legend path defaults to map path)</p>
</div></blockquote>
<p>This is a command which takes two inputs:
A string of ASCII characters representing a map and a dictionary of
functions containing build instructions. The characters of the map are
iterated over and compared to a list of trigger characters. When a match
is found the corresponding function is executed generating the rooms,
exits and objects as defined by the users build instructions. If a
character is not a match to a provided trigger character (including spaces)
it is simply skipped and the process continues. By default exits are
automatically generated but is turned off by switches which also determines
how many times the map is iterated over.</p>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;buildmap', '&#64;mapbuilder')</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;buildmap', '&#64;mapbuilder'}</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;buildmap']</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#CmdMapBuilder.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.func" title="Permalink to this definition"></a></dt>
<dd><p>Starts the processor.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'building'</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;mapbuilder'</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;buildmap', 'category': 'building', 'key': '&#64;mapbuilder', 'tags': '', 'text': '\n Build a map from a 2D ASCII map.\n\n Usage:\n &#64;mapbuilder[/switch] &lt;path.to.file.MAPNAME&gt; &lt;path.to.file.MAP_LEGEND&gt;\n\n Switches:\n one - execute build instructions once without automatic exit creation\n two - execute build instructions twice without automatic exit creation\n\n Example:\n &#64;mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND\n &#64;mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND\n &#64;mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND\n (Legend path defaults to map path)\n\n This is a command which takes two inputs:\n A string of ASCII characters representing a map and a dictionary of\n functions containing build instructions. The characters of the map are\n iterated over and compared to a list of trigger characters. When a match\n is found the corresponding function is executed generating the rooms,\n exits and objects as defined by the users build instructions. If a\n character is not a match to a provided trigger character (including spaces)\n it is simply skipped and the process continues. By default exits are\n automatically generated but is turned off by switches which also determines\n how many times the map is iterated over.\n '}</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder._map_to_list">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">_map_to_list</code><span class="sig-paren">(</span><em class="sig-param">game_map</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#_map_to_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder._map_to_list" title="Permalink to this definition"></a></dt>
<dd><p>Splits multi line map string into list of rows.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>game_map</strong> (<em>str</em>) An ASCII map</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The map split into rows</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>list (list)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.build_map">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">build_map</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">game_map</em>, <em class="sig-param">legend</em>, <em class="sig-param">iterations=1</em>, <em class="sig-param">build_exits=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#build_map"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.build_map" title="Permalink to this definition"></a></dt>
<dd><p>Receives the fetched map and legend vars provided by the player.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Object</em>) The creator of the map.</p></li>
<li><p><strong>game_map</strong> (<em>str</em>) An ASCII map string.</p></li>
<li><p><strong>legend</strong> (<em>dict</em>) Mapping of map symbols to object types.</p></li>
<li><p><strong>iterations</strong> (<em>int</em>) The number of iteration passes.</p></li>
<li><p><strong>build_exits</strong> (<em>bool</em>) Create exits between new rooms.</p></li>
</ul>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The map
is iterated over character by character, comparing it to the trigger
characters in the legend var and executing the build instructions on
finding a match. The map is iterated over according to the <cite>iterations</cite>
value and exits are optionally generated between adjacent rooms according
to the <cite>build_exits</cite> value.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.example1_build_forest">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">example1_build_forest</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#example1_build_forest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.example1_build_forest" title="Permalink to this definition"></a></dt>
<dd><p>A basic example of build instructions. Make sure to include <a href="#id66"><span class="problematic" id="id67">**</span></a>kwargs
in the arguments and return an instance of the room for exit generation.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.example1_build_mountains">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">example1_build_mountains</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#example1_build_mountains"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.example1_build_mountains" title="Permalink to this definition"></a></dt>
<dd><p>A room that is a little more advanced</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.example1_build_temple">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">example1_build_temple</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#example1_build_temple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.example1_build_temple" title="Permalink to this definition"></a></dt>
<dd><p>A unique room that does not need to be as general</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.example2_build_forest">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">example2_build_forest</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#example2_build_forest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.example2_build_forest" title="Permalink to this definition"></a></dt>
<dd><p>A basic room</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.example2_build_horizontal_exit">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">example2_build_horizontal_exit</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#example2_build_horizontal_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.example2_build_horizontal_exit" title="Permalink to this definition"></a></dt>
<dd><p>Creates two exits to and from the two rooms east and west.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.mapbuilder.example2_build_verticle_exit">
<code class="sig-prename descclassname">evennia.contrib.mapbuilder.</code><code class="sig-name descname">example2_build_verticle_exit</code><span class="sig-paren">(</span><em class="sig-param">x</em>, <em class="sig-param">y</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/mapbuilder.html#example2_build_verticle_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.mapbuilder.example2_build_verticle_exit" title="Permalink to this definition"></a></dt>
<dd><p>Creates two exits to and from the two rooms north and south.</p>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.menu_login">
<span id="evennia-contrib-menu-login-module"></span><h2>evennia.contrib.menu_login module<a class="headerlink" href="#module-evennia.contrib.menu_login" title="Permalink to this headline"></a></h2>
<p>A login menu using EvMenu.</p>
<p>Contribution - Vincent-lg 2016, Griatch 2019 (rework for modern EvMenu)</p>
<p>This changes the Evennia login to ask for the account name and password in
sequence instead of requiring you to enter both at once.</p>
<p>To install, add this line to the settings file (<cite>mygame/server/conf/settings.py</cite>):</p>
<blockquote>
<div><p>CMDSET_UNLOGGEDIN = “evennia.contrib.menu_login.UnloggedinCmdSet”</p>
</div></blockquote>
<p>Reload the server and the new connection method will be active. Note that you must
independently change the connection screen to match this login style, by editing
<cite>mygame/server/conf/connection_screens.py</cite>.</p>
<p>This uses Evennias menu system EvMenu and is triggered by a command that is
called automatically when a new user connects.</p>
<dl class="class">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">CmdUnloggedinLook</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#CmdUnloggedinLook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>An unloggedin version of the look command. This is called by the server
when the account first connects. It sets up the menu before handing off
to the menus own look command.</p>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('__unloggedin_look_command',)</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'__unloggedin_look_command'}</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.arg_regex">
<code class="sig-name descname">arg_regex</code><em class="property"> = re.compile('^$', re.IGNORECASE)</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.arg_regex" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#CmdUnloggedinLook.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.func" title="Permalink to this definition"></a></dt>
<dd><p>Run the menu using the nodes in this module.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.key">
<code class="sig-name descname">key</code><em class="property"> = '__unloggedin_look_command'</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': &quot;\n An unloggedin version of the look command. This is called by the server\n when the account first connects. It sets up the menu before handing off\n to the menu's own look command.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.menu_login.UnloggedinCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">UnloggedinCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#UnloggedinCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.UnloggedinCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>Cmdset for the unloggedin state</p>
<dl class="method">
<dt id="evennia.contrib.menu_login.UnloggedinCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#UnloggedinCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.UnloggedinCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called when cmdset is first created.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.UnloggedinCmdSet.key">
<code class="sig-name descname">key</code><em class="property"> = 'DefaultUnloggedin'</em><a class="headerlink" href="#evennia.contrib.menu_login.UnloggedinCmdSet.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.UnloggedinCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.menu_login.UnloggedinCmdSet'</em><a class="headerlink" href="#evennia.contrib.menu_login.UnloggedinCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.menu_login.UnloggedinCmdSet.priority">
<code class="sig-name descname">priority</code><em class="property"> = 0</em><a class="headerlink" href="#evennia.contrib.menu_login.UnloggedinCmdSet.priority" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.menu_login._node_formatter">
<code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">_node_formatter</code><span class="sig-paren">(</span><em class="sig-param">nodetext</em>, <em class="sig-param">optionstext</em>, <em class="sig-param">caller=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#_node_formatter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login._node_formatter" title="Permalink to this definition"></a></dt>
<dd><p>Do not display the options, only the text.</p>
<p>This function is used by EvMenu to format the text of nodes. The menu login
is just a series of prompts so we disable all automatic display decoration
and let the nodes handle everything on their own.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.menu_login._show_help">
<code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">_show_help</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">raw_string</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#_show_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login._show_help" title="Permalink to this definition"></a></dt>
<dd><p>Echo help message, then re-run node that triggered it</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.menu_login.node_enter_password">
<code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">node_enter_password</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">raw_string</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#node_enter_password"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.node_enter_password" title="Permalink to this definition"></a></dt>
<dd><p>Handle password input.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.menu_login.node_enter_username">
<code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">node_enter_username</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">raw_text</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#node_enter_username"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.node_enter_username" title="Permalink to this definition"></a></dt>
<dd><p>Start node of menu
Start login by displaying the connection screen and ask for a user name.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.menu_login.node_quit_or_login">
<code class="sig-prename descclassname">evennia.contrib.menu_login.</code><code class="sig-name descname">node_quit_or_login</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">raw_text</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/menu_login.html#node_quit_or_login"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.menu_login.node_quit_or_login" title="Permalink to this definition"></a></dt>
<dd><p>Exit menu, either by disconnecting or logging in.</p>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.multidescer">
<span id="evennia-contrib-multidescer-module"></span><h2>evennia.contrib.multidescer module<a class="headerlink" href="#module-evennia.contrib.multidescer" title="Permalink to this headline"></a></h2>
<p>Evennia Mutltidescer</p>
<p>Contrib - Griatch 2016</p>
<p>A “multidescer” is a concept from the MUSH world. It allows for
creating, managing and switching between multiple character
descriptions. This multidescer will not require any changes to the
Character class, rather it will use the <cite>multidescs</cite> Attribute (a
list) and create it if it does not exist.</p>
<p>This contrib also works well together with the rpsystem contrib (which
also adds the short descriptions and the <cite>sdesc</cite> command).</p>
<p>Installation:</p>
<p>Edit <cite>mygame/commands/default_cmdsets.py</cite> and add
<cite>from evennia.contrib.multidescer import CmdMultiDesc</cite> to the top.</p>
<p>Next, look up the <cite>at_cmdset_create</cite> method of the <cite>CharacterCmdSet</cite>
class and add a line <cite>self.add(CmdMultiDesc())</cite> to the end
of it.</p>
<p>Reload the server and you should have the +desc command available (it
will replace the default <cite>desc</cite> command).</p>
<dl class="class">
<dt id="evennia.contrib.multidescer.CmdMultiDesc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.multidescer.</code><code class="sig-name descname">CmdMultiDesc</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#CmdMultiDesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Manage multiple descriptions</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>+desc [key] - show current desc desc with &lt;key&gt;
+desc &lt;key&gt; = &lt;text&gt; - add/replace desc with &lt;key&gt;
+desc/list - list descriptions (abbreviated)
+desc/list/full - list descriptions (full texts)
+desc/edit &lt;key&gt; - add/edit desc &lt;key&gt; in line editor
+desc/del &lt;key&gt; - delete desc &lt;key&gt;
+desc/swap &lt;key1&gt;-&lt;key2&gt; - swap positions of &lt;key1&gt; and &lt;key2&gt; in list
+desc/set &lt;key&gt; [+key+…] - set desc as default or combine multiple descs</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>When combining multiple descs with +desc/set &lt;key&gt; + &lt;key2&gt; + …,
any keys not matching an actual description will be inserted
as plain text. Use e.g. ansi line break ||/ to add a new
paragraph and + + or ansi space ||_ to add extra whitespace.</p>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('+desc', 'desc')</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'+desc', 'desc'}</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['desc']</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#CmdMultiDesc.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.func" title="Permalink to this definition"></a></dt>
<dd><p>Implements the multidescer. We will use <cite>db.desc</cite> for the
description in use and <cite>db.multidesc</cite> to store all descriptions.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.key">
<code class="sig-name descname">key</code><em class="property"> = '+desc'</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.multidescer.CmdMultiDesc.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'desc', 'category': 'general', 'key': '+desc', 'tags': '', 'text': '\n Manage multiple descriptions\n\n Usage:\n +desc [key] - show current desc desc with &lt;key&gt;\n +desc &lt;key&gt; = &lt;text&gt; - add/replace desc with &lt;key&gt;\n +desc/list - list descriptions (abbreviated)\n +desc/list/full - list descriptions (full texts)\n +desc/edit &lt;key&gt; - add/edit desc &lt;key&gt; in line editor\n +desc/del &lt;key&gt; - delete desc &lt;key&gt;\n +desc/swap &lt;key1&gt;-&lt;key2&gt; - swap positions of &lt;key1&gt; and &lt;key2&gt; in list\n +desc/set &lt;key&gt; [+key+...] - set desc as default or combine multiple descs\n\n Notes:\n When combining multiple descs with +desc/set &lt;key&gt; + &lt;key2&gt; + ...,\n any keys not matching an actual description will be inserted\n as plain text. Use e.g. ansi line break ||/ to add a new\n paragraph and + + or ansi space ||_ to add extra whitespace.\n\n '}</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.multidescer.DescValidateError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.multidescer.</code><code class="sig-name descname">DescValidateError</code><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#DescValidateError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer.DescValidateError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">ValueError</span></code></p>
<p>Used for tracebacks from desc systems</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.multidescer._load_editor">
<code class="sig-prename descclassname">evennia.contrib.multidescer.</code><code class="sig-name descname">_load_editor</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#_load_editor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer._load_editor" title="Permalink to this definition"></a></dt>
<dd><p>Called when the editor loads contents</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.multidescer._quit_editor">
<code class="sig-prename descclassname">evennia.contrib.multidescer.</code><code class="sig-name descname">_quit_editor</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#_quit_editor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer._quit_editor" title="Permalink to this definition"></a></dt>
<dd><p>Called when the editor quits</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.multidescer._save_editor">
<code class="sig-prename descclassname">evennia.contrib.multidescer.</code><code class="sig-name descname">_save_editor</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">buffer</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#_save_editor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer._save_editor" title="Permalink to this definition"></a></dt>
<dd><p>Called when the editor saves its contents</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.multidescer._update_store">
<code class="sig-prename descclassname">evennia.contrib.multidescer.</code><code class="sig-name descname">_update_store</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">key=None</em>, <em class="sig-param">desc=None</em>, <em class="sig-param">delete=False</em>, <em class="sig-param">swapkey=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/multidescer.html#_update_store"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.multidescer._update_store" title="Permalink to this definition"></a></dt>
<dd><p>Helper function for updating the database store.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Object</em>) The caller of the command.</p></li>
<li><p><strong>key</strong> (<em>str</em>) Description identifier</p></li>
<li><p><strong>desc</strong> (<em>str</em>) Description text.</p></li>
<li><p><strong>delete</strong> (<em>bool</em>) Delete given key.</p></li>
<li><p><strong>swapkey</strong> (<em>str</em>) Swap list positions of <cite>key</cite> and this key.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.puzzles">
<span id="evennia-contrib-puzzles-module"></span><h2>evennia.contrib.puzzles module<a class="headerlink" href="#module-evennia.contrib.puzzles" title="Permalink to this headline"></a></h2>
<p>Puzzles System - Provides a typeclass and commands for
objects that can be combined (i.e. used) to produce
new objects.</p>
<p>Evennia contribution - Henddher 2018</p>
<p>A Puzzle is a recipe of what objects (aka parts) must
be combined by a player so a new set of objects
(aka results) are automatically created.</p>
<p>Consider this simple Puzzle:</p>
<blockquote>
<div><p>orange, mango, yogurt, blender = fruit smoothie</p>
</div></blockquote>
<p>As a Builder:</p>
<blockquote>
<div><p>&#64;create/drop orange
&#64;create/drop mango
&#64;create/drop yogurt
&#64;create/drop blender
&#64;create/drop fruit smoothie</p>
<p>&#64;puzzle smoothie, orange, mango, yogurt, blender = fruit smoothie
Puzzle smoothie(#1234) created successfuly.</p>
<p>&#64;destroy/force orange, mango, yogurt, blender, fruit smoothie</p>
<p>&#64;armpuzzle #1234
Part orange is spawned at …
Part mango is spawned at …
….
Puzzle smoothie(#1234) has been armed successfully</p>
</div></blockquote>
<p>As Player:</p>
<blockquote>
<div><p>use orange, mango, yogurt, blender
Genius, you blended all fruits to create a fruit smoothie!</p>
</div></blockquote>
<p>Details:</p>
<p>Puzzles are created from existing objects. The given
objects are introspected to create prototypes for the
puzzle parts and results. These prototypes become the
puzzle recipe. (See PuzzleRecipe and &#64;puzzle
command). Once the recipe is created, all parts and result
can be disposed (i.e. destroyed).</p>
<p>At a later time, a Builder or a Script can arm the puzzle
and spawn all puzzle parts in their respective
locations (See &#64;armpuzzle).</p>
<p>A regular player can collect the puzzle parts and combine
them (See use command). If player has specified
all pieces, the puzzle is considered solved and all
its puzzle parts are destroyed while the puzzle results
are spawened on their corresponding location.</p>
<p>Installation:</p>
<p>Add the PuzzleSystemCmdSet to all players.
Alternatively:</p>
<blockquote>
<div><p>&#64;py self.cmdset.add(evennia.contrib.puzzles.PuzzleSystemCmdSet)</p>
</div></blockquote>
<dl class="class">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">CmdArmPuzzle</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdArmPuzzle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Arms a puzzle by spawning all its parts.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;armpuzzle &lt;puzzle #dbref&gt;</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Create puzzles with <cite>&#64;puzzle</cite>; get list of
defined puzzles using <cite>&#64;lspuzzlerecipes</cite>.</p>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;armpuzzle',)</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;armpuzzle'}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdArmPuzzle.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'puzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;armpuzzle'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(armpuzzle) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(armpuzzle) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '&#64;armpuzzle', 'tags': '', 'text': '\n Arms a puzzle by spawning all its parts.\n\n Usage:\n &#64;armpuzzle &lt;puzzle #dbref&gt;\n\n Notes:\n Create puzzles with `&#64;puzzle`; get list of\n defined puzzles using `&#64;lspuzzlerecipes`.\n\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">CmdCreatePuzzleRecipe</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdCreatePuzzleRecipe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Creates a puzzle recipe. A puzzle consists of puzzle-parts that
the player can use together to create a specified result.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;puzzle name,&lt;part1[,part2,…&gt;] = &lt;result1[,result2,…]&gt;</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>create/drop balloon
create/drop glass of water
create/drop water balloon
&#64;puzzle waterballon,balloon,glass of water = water balloon
&#64;del ballon, glass of water, water balloon
&#64;armpuzzle #1</p>
<p>Notes:
Each part and result are objects that must (temporarily) exist and be placed in their
corresponding location in order to create the puzzle. After the creation of the puzzle,
these objects are not needed anymore and can be deleted. Components of the puzzle
will be re-created by use of the <cite>&#64;armpuzzle</cite> command later.</p>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;puzzle', '&#64;puzzlerecipe')</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;puzzle', '&#64;puzzlerecipe'}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;puzzlerecipe']</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.confirm">
<code class="sig-name descname">confirm</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.confirm" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.default_confirm">
<code class="sig-name descname">default_confirm</code><em class="property"> = 'no'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.default_confirm" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdCreatePuzzleRecipe.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'puzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;puzzle'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(puzzle) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(puzzle) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;puzzlerecipe', 'category': 'puzzles', 'key': '&#64;puzzle', 'tags': '', 'text': &quot;\n Creates a puzzle recipe. A puzzle consists of puzzle-parts that\n the player can 'use' together to create a specified result.\n\n Usage:\n &#64;puzzle name,&lt;part1[,part2,...&gt;] = &lt;result1[,result2,...]&gt;\n\n Example:\n create/drop balloon\n create/drop glass of water\n create/drop water balloon\n &#64;puzzle waterballon,balloon,glass of water = water balloon\n &#64;del ballon, glass of water, water balloon\n &#64;armpuzzle #1\n\n Notes:\n Each part and result are objects that must (temporarily) exist and be placed in their\n corresponding location in order to create the puzzle. After the creation of the puzzle,\n these objects are not needed anymore and can be deleted. Components of the puzzle\n will be re-created by use of the `&#64;armpuzzle` command later.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">CmdEditPuzzle</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Edits puzzle properties</p>
<dl>
<dt>Usage:</dt><dd><p>&#64;puzzleedit[/delete] &lt;#dbref&gt;
&#64;puzzleedit &lt;#dbref&gt;/use_success_message = &lt;Custom message&gt;
&#64;puzzleedit &lt;#dbref&gt;/use_success_location_message = &lt;Custom message from {caller} producing {result_names}&gt;
&#64;puzzleedit &lt;#dbref&gt;/mask = attr1[,attr2,…]&gt;
&#64;puzzleedit[/addpart] &lt;#dbref&gt; = &lt;obj[,obj2,…]&gt;
&#64;puzzleedit[/delpart] &lt;#dbref&gt; = &lt;obj[,obj2,…]&gt;
&#64;puzzleedit[/addresult] &lt;#dbref&gt; = &lt;obj[,obj2,…]&gt;
&#64;puzzleedit[/delresult] &lt;#dbref&gt; = &lt;obj[,obj2,…]&gt;</p>
</dd>
<dt>Switches:</dt><dd><p>addpart - adds parts to the puzzle
delpart - removes parts from the puzzle
addresult - adds results to the puzzle
delresult - removes results from the puzzle
delete - deletes the recipe. Existing parts and results arent modified</p>
<p>mask - attributes to exclude during matching (e.g. location, desc, etc.)
use_success_location_message containing {result_names} and {caller} will</p>
<blockquote>
<div><p>automatically be replaced with correct values. Both are optional.</p>
</div></blockquote>
<p>When removing parts/results, its possible to remove all.</p>
</dd>
</dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._add_objs_to">
<code class="sig-name descname">_add_objs_to</code><span class="sig-paren">(</span><em class="sig-param">objs</em>, <em class="sig-param">to</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._add_objs_to"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._add_objs_to" title="Permalink to this definition"></a></dt>
<dd><p>Adds propto objs to the given set (parts or results)</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._add_parts">
<code class="sig-name descname">_add_parts</code><span class="sig-paren">(</span><em class="sig-param">objs</em>, <em class="sig-param">puzzle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._add_parts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._add_parts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._add_results">
<code class="sig-name descname">_add_results</code><span class="sig-paren">(</span><em class="sig-param">objs</em>, <em class="sig-param">puzzle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._add_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._add_results" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._get_objs">
<code class="sig-name descname">_get_objs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._get_objs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._get_objs" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;puzzleedit',)</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;puzzleedit'}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._remove_objs_from">
<code class="sig-name descname">_remove_objs_from</code><span class="sig-paren">(</span><em class="sig-param">objs</em>, <em class="sig-param">frm</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._remove_objs_from"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._remove_objs_from" title="Permalink to this definition"></a></dt>
<dd><p>Removes propto objs from the given set (parts or results)</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._remove_parts">
<code class="sig-name descname">_remove_parts</code><span class="sig-paren">(</span><em class="sig-param">objs</em>, <em class="sig-param">puzzle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._remove_parts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._remove_parts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle._remove_results">
<code class="sig-name descname">_remove_results</code><span class="sig-paren">(</span><em class="sig-param">objs</em>, <em class="sig-param">puzzle</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle._remove_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle._remove_results" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdEditPuzzle.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'puzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;puzzleedit'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(puzzleedit) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(puzzleedit) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '&#64;puzzleedit', 'tags': '', 'text': &quot;\n Edits puzzle properties\n\n Usage:\n &#64;puzzleedit[/delete] &lt;#dbref&gt;\n &#64;puzzleedit &lt;#dbref&gt;/use_success_message = &lt;Custom message&gt;\n &#64;puzzleedit &lt;#dbref&gt;/use_success_location_message = &lt;Custom message from {caller} producing {result_names}&gt;\n &#64;puzzleedit &lt;#dbref&gt;/mask = attr1[,attr2,...]&gt;\n &#64;puzzleedit[/addpart] &lt;#dbref&gt; = &lt;obj[,obj2,...]&gt;\n &#64;puzzleedit[/delpart] &lt;#dbref&gt; = &lt;obj[,obj2,...]&gt;\n &#64;puzzleedit[/addresult] &lt;#dbref&gt; = &lt;obj[,obj2,...]&gt;\n &#64;puzzleedit[/delresult] &lt;#dbref&gt; = &lt;obj[,obj2,...]&gt;\n\n Switches:\n addpart - adds parts to the puzzle\n delpart - removes parts from the puzzle\n addresult - adds results to the puzzle\n delresult - removes results from the puzzle\n delete - deletes the recipe. Existing parts and results aren't modified\n\n mask - attributes to exclude during matching (e.g. location, desc, etc.)\n use_success_location_message containing {result_names} and {caller} will\n automatically be replaced with correct values. Both are optional.\n\n When removing parts/results, it's possible to remove all.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">CmdListArmedPuzzles</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdListArmedPuzzles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Searches for all armed puzzles</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;lsarmedpuzzles</p>
</dd>
</dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;lsarmedpuzzles',)</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;lsarmedpuzzles'}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdListArmedPuzzles.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'puzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;lsarmedpuzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(lsarmedpuzzles) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(lsarmedpuzzles) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '&#64;lsarmedpuzzles', 'tags': '', 'text': '\n Searches for all armed puzzles\n\n Usage:\n &#64;lsarmedpuzzles\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">CmdListPuzzleRecipes</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdListPuzzleRecipes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Searches for all puzzle recipes</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>&#64;lspuzzlerecipes</p>
</dd>
</dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&#64;lspuzzlerecipes',)</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&#64;lspuzzlerecipes'}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdListPuzzleRecipes.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'puzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.key">
<code class="sig-name descname">key</code><em class="property"> = '&#64;lspuzzlerecipes'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(lspuzzlerecipes) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:perm(lspuzzlerecipes) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '&#64;lspuzzlerecipes', 'tags': '', 'text': '\n Searches for all puzzle recipes\n\n Usage:\n &#64;lspuzzlerecipes\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">CmdUsePuzzleParts</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdUsePuzzleParts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Use an object, or a group of objects at once.</p>
<p class="rubric">Example</p>
<p>You look around you and see a pole, a long string, and a needle.</p>
<p>use pole, long string, needle</p>
<p>Genius! You built a fishing pole.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>use &lt;obj1&gt; [,obj2,…]</p>
</dd>
</dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('use', 'combine')</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'combine', 'use'}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['combine']</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#CmdUsePuzzleParts.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
to all the variables defined therein.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'puzzles'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.key">
<code class="sig-name descname">key</code><em class="property"> = 'use'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(use) or pperm(Player)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:pperm(use) or pperm(Player)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'combine', 'category': 'puzzles', 'key': 'use', 'tags': '', 'text': '\n Use an object, or a group of objects at once.\n\n\n Example:\n You look around you and see a pole, a long string, and a needle.\n\n use pole, long string, needle\n\n Genius! You built a fishing pole.\n\n\n Usage:\n use &lt;obj1&gt; [,obj2,...]\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.PuzzleRecipe">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">PuzzleRecipe</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#PuzzleRecipe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DefaultScript</span></code></a></p>
<p>Definition of a Puzzle Recipe</p>
<dl class="exception">
<dt id="evennia.contrib.puzzles.PuzzleRecipe.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.puzzles.PuzzleRecipe.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.PuzzleRecipe._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for PuzzleRecipe&gt;</em><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.PuzzleRecipe.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.puzzles.PuzzleRecipe'</em><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.puzzles.PuzzleRecipe.save_recipe">
<code class="sig-name descname">save_recipe</code><span class="sig-paren">(</span><em class="sig-param">puzzle_name</em>, <em class="sig-param">parts</em>, <em class="sig-param">results</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#PuzzleRecipe.save_recipe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe.save_recipe" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.PuzzleRecipe.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'PuzzleRecipe'</em><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleRecipe.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.puzzles.PuzzleSystemCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">PuzzleSystemCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#PuzzleSystemCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleSystemCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>CmdSet to create, arm and resolve Puzzles</p>
<dl class="method">
<dt id="evennia.contrib.puzzles.PuzzleSystemCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#PuzzleSystemCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleSystemCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Hook method - this should be overloaded in the inheriting
class, and should take care of populating the cmdset by use of
self.add().</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.puzzles.PuzzleSystemCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.puzzles.PuzzleSystemCmdSet'</em><a class="headerlink" href="#evennia.contrib.puzzles.PuzzleSystemCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.puzzles._colorize_message">
<code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">_colorize_message</code><span class="sig-paren">(</span><em class="sig-param">msg</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#_colorize_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles._colorize_message" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.puzzles._lookups_parts_puzzlenames_protodefs">
<code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">_lookups_parts_puzzlenames_protodefs</code><span class="sig-paren">(</span><em class="sig-param">parts</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#_lookups_parts_puzzlenames_protodefs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles._lookups_parts_puzzlenames_protodefs" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.puzzles._matching_puzzles">
<code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">_matching_puzzles</code><span class="sig-paren">(</span><em class="sig-param">puzzles</em>, <em class="sig-param">puzzlename_tags_dict</em>, <em class="sig-param">puzzle_ingredients</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#_matching_puzzles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles._matching_puzzles" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.puzzles._puzzles_by_names">
<code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">_puzzles_by_names</code><span class="sig-paren">(</span><em class="sig-param">names</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#_puzzles_by_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles._puzzles_by_names" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.puzzles.maskout_protodef">
<code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">maskout_protodef</code><span class="sig-paren">(</span><em class="sig-param">protodef</em>, <em class="sig-param">mask</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#maskout_protodef"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.maskout_protodef" title="Permalink to this definition"></a></dt>
<dd><p>Returns a new protodef after removing protodef values based on mask</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.puzzles.proto_def">
<code class="sig-prename descclassname">evennia.contrib.puzzles.</code><code class="sig-name descname">proto_def</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">with_tags=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/puzzles.html#proto_def"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.puzzles.proto_def" title="Permalink to this definition"></a></dt>
<dd><p>Basic properties needed to spawn
and compare recipe with candidate part</p>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.random_string_generator">
<span id="evennia-contrib-random-string-generator-module"></span><h2>evennia.contrib.random_string_generator module<a class="headerlink" href="#module-evennia.contrib.random_string_generator" title="Permalink to this headline"></a></h2>
<p>Pseudo-random generator and registry</p>
<p>Evennia contribution - Vincent Le Goff 2017</p>
<p>This contrib can be used to generate pseudo-random strings of information
with specific criteria. You could, for instance, use it to generate
phone numbers, license plate numbers, validation codes, non-sensivite
passwords and so on. The strings generated by the generator will be
stored and wont be available again in order to avoid repetition.
Heres a very simple example:</p>
<p><code class="docutils literal notranslate"><span class="pre">`python</span>
<span class="pre">from</span> <span class="pre">evennia.contrib.random_string_generator</span> <span class="pre">import</span> <span class="pre">RandomStringGenerator</span>
<span class="pre">#</span> <span class="pre">Create</span> <span class="pre">a</span> <span class="pre">generator</span> <span class="pre">for</span> <span class="pre">phone</span> <span class="pre">numbers</span>
<span class="pre">phone_generator</span> <span class="pre">=</span> <span class="pre">RandomStringGenerator(&quot;phone</span> <span class="pre">number&quot;,</span> <span class="pre">r&quot;555-[0-9]{3}-[0-9]{4}&quot;)</span>
<span class="pre">#</span> <span class="pre">Generate</span> <span class="pre">a</span> <span class="pre">phone</span> <span class="pre">number</span> <span class="pre">(555-XXX-XXXX</span> <span class="pre">with</span> <span class="pre">X</span> <span class="pre">as</span> <span class="pre">numbers)</span>
<span class="pre">number</span> <span class="pre">=</span> <span class="pre">phone_generator.get()</span>
<span class="pre">#</span> <span class="pre">`number`</span> <span class="pre">will</span> <span class="pre">contain</span> <span class="pre">something</span> <span class="pre">like:</span> <span class="pre">&quot;555-981-2207&quot;</span>
<span class="pre">#</span> <span class="pre">If</span> <span class="pre">you</span> <span class="pre">call</span> <span class="pre">`phone_generator.get`,</span> <span class="pre">it</span> <span class="pre">won't</span> <span class="pre">give</span> <span class="pre">the</span> <span class="pre">same</span> <span class="pre">anymore.phone_generator.all()</span>
<span class="pre">#</span> <span class="pre">Will</span> <span class="pre">return</span> <span class="pre">a</span> <span class="pre">list</span> <span class="pre">of</span> <span class="pre">all</span> <span class="pre">currently-used</span> <span class="pre">phone</span> <span class="pre">numbers</span>
<span class="pre">phone_generator.remove(&quot;555-981-2207&quot;)</span>
<span class="pre">#</span> <span class="pre">The</span> <span class="pre">number</span> <span class="pre">can</span> <span class="pre">be</span> <span class="pre">generated</span> <span class="pre">again</span>
<span class="pre">`</span></code></p>
<p>To use it, you will need to:</p>
<ol class="arabic simple">
<li><p>Import the <cite>RandomStringGenerator</cite> class from the contrib.</p></li>
<li><p>Create an instance of this class taking two arguments:
- The name of the gemerator (like “phone number”, “license plate”…).
- The regular expression representing the expected results.</p></li>
<li><p>Use the generators <cite>all</cite>, <cite>get</cite> and <cite>remove</cite> methods as shown above.</p></li>
</ol>
<p>To understand how to read and create regular expressions, you can refer to
[the documentation on the re module](<a class="reference external" href="https://docs.python.org/2/library/re.html">https://docs.python.org/2/library/re.html</a>).
Some examples of regular expressions you could use:</p>
<ul class="simple">
<li><p><cite>r”555-d{3}-d{4}”</cite>: 555, a dash, 3 digits, another dash, 4 digits.</p></li>
<li><p><cite>r”[0-9]{3}[A-Z][0-9]{3}”</cite>: 3 digits, a capital letter, 3 digits.</p></li>
<li><p><cite>r”[A-Za-z0-9]{8,15}”</cite>: between 8 and 15 letters and digits.</p></li>
<li><p></p></li>
</ul>
<p>Behind the scenes, a script is created to store the generated information
for a single generator. The <cite>RandomStringGenerator</cite> object will also
read the regular expression you give to it to see what information is
required (letters, digits, a more restricted class, simple characters…)…
More complex regular expressions (with branches for instance) might not be
available.</p>
<dl class="exception">
<dt id="evennia.contrib.random_string_generator.ExhaustedGenerator">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.random_string_generator.</code><code class="sig-name descname">ExhaustedGenerator</code><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#ExhaustedGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.ExhaustedGenerator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">RuntimeError</span></code></p>
<p>The generator hasnt any available strings to generate anymore.</p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.random_string_generator.</code><code class="sig-name descname">RandomStringGenerator</code><span class="sig-paren">(</span><em class="sig-param">name</em>, <em class="sig-param">regex</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>A generator class to generate pseudo-random strings with a rule.</p>
<p>The “rule” defining what the generator should provide in terms of
string is given as a regular expression when creating instances of
this class. You can use the <cite>all</cite> method to get all generated strings,
the <cite>get</cite> method to generate a new string, the <cite>remove</cite> method
to remove a generated string, or the <cite>clear</cite> method to remove all
generated strings.</p>
<p>Bear in mind, however, that while the generated strings will be
stored to avoid repetition, the generator will not concern itself
with how the string is stored on the object you use. You probably
want to create a tag to mark this object. This is outside of the scope
of this class.</p>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">name</em>, <em class="sig-param">regex</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Create a new generator.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em>) name of the generator to create.</p></li>
<li><p><strong>regex</strong> (<em>str</em>) regular expression describing the generator.</p></li>
</ul>
</dd>
</dl>
<p class="rubric">Notes</p>
<p><cite>name</cite> should be an explicit name. If you use more than one
generator in your game, be sure to give them different names.
This name will be used to store the generated information
in the global script, and in case of errors.</p>
<p>The regular expression should describe the generator, what
it should generate: a phone number, a license plate, a password
or something else. Regular expressions allow you to use
pretty advanced criteria, but be aware that some regular
expressions will be rejected if not specific enough.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><ul class="simple">
<li><p><a class="reference internal" href="#evennia.contrib.random_string_generator.RejectedRegex" title="evennia.contrib.random_string_generator.RejectedRegex"><strong>RejectedRegex</strong></a> the provided regular expression couldnt be</p></li>
<li><p><strong>accepted as a valid generator description.</strong> </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator._find_elements">
<code class="sig-name descname">_find_elements</code><span class="sig-paren">(</span><em class="sig-param">regex</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator._find_elements"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator._find_elements" title="Permalink to this definition"></a></dt>
<dd><p>Find the elements described in the regular expression. This will
analyze the provided regular expression and try to find elements.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>regex</strong> (<em>str</em>) the regular expression.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator._find_literal">
<code class="sig-name descname">_find_literal</code><span class="sig-paren">(</span><em class="sig-param">element</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator._find_literal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator._find_literal" title="Permalink to this definition"></a></dt>
<dd><p>Find the literal corresponding to a piece of regular expression.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator._get_script">
<code class="sig-name descname">_get_script</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator._get_script"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator._get_script" title="Permalink to this definition"></a></dt>
<dd><p>Get or create the script.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator.all">
<code class="sig-name descname">all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator.all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator.all" title="Permalink to this definition"></a></dt>
<dd><p>Return all generated strings for this generator.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the list of strings that are already
used. The strings that were generated first come first in the list.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>strings (list of strr)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator.clear" title="Permalink to this definition"></a></dt>
<dd><p>Clear the generator of all generated strings.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator.get">
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">store=True</em>, <em class="sig-param">unique=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator.get" title="Permalink to this definition"></a></dt>
<dd><p>Generate a pseudo-random string according to the regular expression.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>store</strong> (<em>bool</em><em>, </em><em>optional</em>) store the generated string in the script.</p></li>
<li><p><strong>unique</strong> (<em>bool</em><em>, </em><em>optional</em>) keep on trying if the string is already used.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The newly-generated string.</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><a class="reference internal" href="#evennia.contrib.random_string_generator.ExhaustedGenerator" title="evennia.contrib.random_string_generator.ExhaustedGenerator"><strong>ExhaustedGenerator</strong></a> if theres no available string in this generator.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Unless asked explicitly, the returned string cant repeat itself.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator.remove">
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param">element</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGenerator.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator.remove" title="Permalink to this definition"></a></dt>
<dd><p>Remove a generated string from the list of stored strings.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>element</strong> (<em>str</em>) the string to remove from the list of generated strings.</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>ValueError</strong> the specified value hasnt been generated and is not present.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The specified string has to be present in the script (so
has to have been generated). It will remove this entry
from the script, so this string could be generated again by
calling the <cite>get</cite> method.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.random_string_generator.RandomStringGenerator.script">
<code class="sig-name descname">script</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGenerator.script" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.random_string_generator.</code><code class="sig-name descname">RandomStringGeneratorScript</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGeneratorScript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DefaultScript</span></code></a></p>
<p>The global script to hold all generators.</p>
<p>It will be automatically created the first time <cite>generate</cite> is called
on a RandomStringGenerator object.</p>
<dl class="exception">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for RandomStringGeneratorScript&gt;</em><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript.at_script_creation">
<code class="sig-name descname">at_script_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RandomStringGeneratorScript.at_script_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript.at_script_creation" title="Permalink to this definition"></a></dt>
<dd><p>Hook called when the script is created.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.random_string_generator.RandomStringGeneratorScript'</em><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.random_string_generator.RandomStringGeneratorScript.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'RandomStringGeneratorScript'</em><a class="headerlink" href="#evennia.contrib.random_string_generator.RandomStringGeneratorScript.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.random_string_generator.RejectedRegex">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.random_string_generator.</code><code class="sig-name descname">RejectedRegex</code><a class="reference internal" href="../_modules/evennia/contrib/random_string_generator.html#RejectedRegex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.random_string_generator.RejectedRegex" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">RuntimeError</span></code></p>
<p>The provided regular expression has been rejected.</p>
<p>More details regarding why this error occurred will be provided in
the message. The usual reason is the provided regular expression is
not specific enough and could lead to inconsistent generating.</p>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.rplanguage">
<span id="evennia-contrib-rplanguage-module"></span><h2>evennia.contrib.rplanguage module<a class="headerlink" href="#module-evennia.contrib.rplanguage" title="Permalink to this headline"></a></h2>
<p>Language and whisper obfuscation system</p>
<p>Evennia contrib - Griatch 2015</p>
<p>This module is intented to be used with an emoting system (such as
contrib/rpsystem.py). It offers the ability to obfuscate spoken words
in the game in various ways:</p>
<ul class="simple">
<li><dl class="simple">
<dt>Language: The language functionality defines a pseudo-language map</dt><dd><p>to any number of languages. The string will be obfuscated depending
on a scaling that (most likely) will be input as a weighted average of
the language skill of the speaker and listener.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Whisper: The whisper functionality will gradually “fade out” a</dt><dd><p>whisper along as scale 0-1, where the fading is based on gradually
removing sections of the whisper that is (supposedly) easier to
overhear (for example “s” sounds tend to be audible even when no other
meaning can be determined).</p>
</dd>
</dl>
</li>
</ul>
<p>Usage:</p>
<blockquote>
<div><p><a href="#id68"><span class="problematic" id="id69">``</span></a><a href="#id70"><span class="problematic" id="id71">`</span></a>python
from evennia.contrib import rplanguage</p>
<p># need to be done once, here we create the “default” lang
rplanguage.add_language()</p>
<p>say = “This is me talking.”
whisper = “This is me whispering.</p>
<p>print rplanguage.obfuscate_language(say, level=0.0)
&lt;&lt;&lt; “This is me talking.”
print rplanguage.obfuscate_language(say, level=0.5)
&lt;&lt;&lt; “This is me byngyry.”
print rplanguage.obfuscate_language(say, level=1.0)
&lt;&lt;&lt; “Daly ly sy byngyry.”</p>
<p>result = rplanguage.obfuscate_whisper(whisper, level=0.0)
&lt;&lt;&lt; “This is me whispering”
result = rplanguage.obfuscate_whisper(whisper, level=0.2)
&lt;&lt;&lt; “This is m- whisp-ring”
result = rplanguage.obfuscate_whisper(whisper, level=0.5)
&lt;&lt;&lt; “—s -s —s——”
result = rplanguage.obfuscate_whisper(whisper, level=0.7)
&lt;&lt;&lt; “—- ———-”
result = rplanguage.obfuscate_whisper(whisper, level=1.0)
&lt;&lt;&lt; “…”</p>
<p><a href="#id72"><span class="problematic" id="id73">``</span></a><a href="#id74"><span class="problematic" id="id75">`</span></a></p>
<p>To set up new languages, import and use the <cite>add_language()</cite>
helper method in this module. This allows you to customize the
“feel” of the semi-random language you are creating. Especially
the <cite>word_length_variance</cite> helps vary the length of translated
words compared to the original and can help change the “feel” for
the language you are creating. You can also add your own
dictionary and “fix” random words for a list of input words.</p>
<p>Below is an example of “elvish”, using “rounder” vowels and sounds:</p>
<p><a href="#id76"><span class="problematic" id="id77">``</span></a><a href="#id78"><span class="problematic" id="id79">`</span></a>python
phonemes = “oi oh ee ae aa eh ah ao aw ay er ey ow ia ih iy ” “oy ua uh uw y p b t d f v t dh s z sh zh ch jh k ” “ng g m n l r w”,
vowels = “eaoiuy”
grammar = “v vv vvc vcc vvcc cvvc vccv vvccv vcvccv vcvcvcc vvccvvcc ” “vcvvccvvc cvcvvcvvcc vcvcvvccvcvv”,
word_length_variance = 1
noun_postfix = “la”
manual_translations = {“the”:”ye”, “we”:”uyi”, “she”:”semi”, “he”:”emi”,</p>
<blockquote>
<div><p>“you”: “do”, me:mi,i:me, be:”hye”, and:y}</p>
</div></blockquote>
<dl class="simple">
<dt>rplanguage.add_language(key=”elvish”, phonemes=phonemes, grammar=grammar,</dt><dd><p>word_length_variance=word_length_variance,
noun_postfix=noun_postfix, vowels=vowels,
manual_translations=manual_translations
auto_translations=”my_word_file.txt”)</p>
</dd>
</dl>
<p><a href="#id80"><span class="problematic" id="id81">``</span></a><a href="#id82"><span class="problematic" id="id83">`</span></a></p>
<p>This will produce a decicively more “rounded” and “soft” language
than the default one. The few manual_translations also make sure
to make it at least look superficially “reasonable”.</p>
<p>The <cite>auto_translations</cite> keyword is useful, this accepts either a
list or a path to a file of words (one per line) to automatically
create fixed translations for according to the grammatical rules.
This allows to quickly build a large corpus of translated words
that never change (if this is desired).</p>
</div></blockquote>
<dl class="exception">
<dt id="evennia.contrib.rplanguage.LanguageError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">LanguageError</code><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">RuntimeError</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rplanguage.LanguageExistsError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">LanguageExistsError</code><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageExistsError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageExistsError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rplanguage.LanguageError" title="evennia.contrib.rplanguage.LanguageError"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rplanguage.LanguageError</span></code></a></p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rplanguage.LanguageHandler">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">LanguageHandler</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DefaultScript</span></code></a></p>
<p>This is a storage class that should usually not be created on its
own. Its automatically created by a call to <cite>obfuscate_language</cite>
or <cite>add_language</cite> below.</p>
<p>Languages are implemented as a “logical” pseudo- consistent language
algorith here. The idea is that a language is built up from
phonemes. These are joined together according to a “grammar” of
possible phoneme- combinations and allowed characters. It may
sound simplistic, but this allows to easily make
“similar-sounding” languages. One can also custom-define a
dictionary of some common words to give further consistency.
Optionally, the system also allows an input list of common words
to be loaded and given random translations. These will be stored
to disk and will thus not change. This gives a decent “stability”
of the language but if the goal is to obfuscate, this may allow
players to eventually learn to understand the gist of a sentence
even if their characters can not. Any number of languages can be
created this way.</p>
<p>This nonsense language will partially replace the actual spoken
language when so desired (usually because the speaker/listener
dont know the language well enough).</p>
<dl class="exception">
<dt id="evennia.contrib.rplanguage.LanguageHandler.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rplanguage.LanguageHandler.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rplanguage.LanguageHandler._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for LanguageHandler&gt;</em><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rplanguage.LanguageHandler._translate_sub">
<code class="sig-name descname">_translate_sub</code><span class="sig-paren">(</span><em class="sig-param">match</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageHandler._translate_sub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler._translate_sub" title="Permalink to this definition"></a></dt>
<dd><p>Replacer method called by re.sub when
traversing the language string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>match</strong> (<em>re.matchobj</em>) Match object from regex.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>converted word.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Assumes self.lastword and self.level is available
on the object.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rplanguage.LanguageHandler.add">
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">key='default'</em>, <em class="sig-param">phonemes='ea oh ae aa eh ah ao aw ai er ey ow ia ih iy oy ua uh uw a e i u y p b t d f v t dh s z sh zh ch jh k ng g m n l r w'</em>, <em class="sig-param">grammar='v cv vc cvv vcc vcv cvcc vccv cvccv cvcvcc cvccvcv vccvccvc cvcvccvv cvcvcvcvv'</em>, <em class="sig-param">word_length_variance=0</em>, <em class="sig-param">noun_translate=False</em>, <em class="sig-param">noun_prefix=''</em>, <em class="sig-param">noun_postfix=''</em>, <em class="sig-param">vowels='eaoiuy'</em>, <em class="sig-param">manual_translations=None</em>, <em class="sig-param">auto_translations=None</em>, <em class="sig-param">force=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.add" title="Permalink to this definition"></a></dt>
<dd><p>Add a new language. Note that you generally only need to do
this once per language and that adding an existing language
will re-initialize all the random components to new permanent
values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) The name of the language. This
will be used as an identifier for the language so it
should be short and unique.</p></li>
<li><p><strong>phonemes</strong> (<em>str</em><em>, </em><em>optional</em>) Space-separated string of all allowed
phonemes in this language. If either of the base phonemes
(c, v, cc, vv) are present in the grammar, the phoneme list must
at least include one example of each.</p></li>
<li><p><strong>grammar</strong> (<em>str</em>) All allowed consonant (c) and vowel (v) combinations
allowed to build up words. Grammars are broken into the base phonemes
(c, v, cc, vv) prioritizing the longer bases. So cvv would be a
the c + vv (would allow for a word like die whereas
cvcvccc would be c+v+c+v+cc+c (a word like galosch).</p></li>
<li><p><strong>word_length_variance</strong> (<em>real</em>) The variation of length of words.
0 means a minimal variance, higher variance may mean words
have wildly varying length; this strongly affects how the
language “looks”.</p></li>
<li><p><strong>noun_translate</strong> (<em>bool</em><em>, </em><em>optional</em>) If a proper noun, identified as a
capitalized word, should be translated or not. By default they
will not, allowing for e.g. the names of characters to be understandable.</p></li>
<li><p><strong>noun_prefix</strong> (<em>str</em><em>, </em><em>optional</em>) A prefix to go before every noun
in this language (if any).</p></li>
<li><p><strong>noun_postfix</strong> (<em>str</em><em>, </em><em>optuonal</em>) A postfix to go after every noun
in this language (if any, usually best to avoid combining
with <cite>noun_prefix</cite> or language becomes very wordy).</p></li>
<li><p><strong>vowels</strong> (<em>str</em><em>, </em><em>optional</em>) Every vowel allowed in this language.</p></li>
<li><p><strong>manual_translations</strong> (<em>dict</em><em>, </em><em>optional</em>) This allows for custom-setting
certain words in the language to mean the same thing. It is
on the form <cite>{real_word: fictional_word}</cite>, for example
<cite>{“the”, “ye”}</cite> .</p></li>
<li><p><strong>auto_translations</strong> (<em>str</em><em> or </em><em>list</em><em>, </em><em>optional</em>) These are lists
words that should be auto-translated with a random, but
fixed, translation. If a path to a file, this file should
contain a list of words to produce translations for, one
word per line. If a list, the lists elements should be
the words to translate. The <cite>manual_translations</cite> will
always override overlapping translations created
automatically.</p></li>
<li><p><strong>force</strong> (<em>bool</em><em>, </em><em>optional</em>) Unless true, will not allow the addition
of a language that is already created.</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.rplanguage.LanguageExistsError" title="evennia.contrib.rplanguage.LanguageExistsError"><strong>LanguageExistsError</strong></a> Raised if trying to adding a language
with a key that already exists, without <cite>force</cite> being set.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The <cite>word_file</cite> is for example a word-frequency list for
the N most common words in the host language. The
translations will be random, but will be stored
persistently to always be the same. This allows for
building a quick, decently-sounding fictive language that
tend to produce the same “translation” (mostly) with the
same input sentence.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rplanguage.LanguageHandler.at_script_creation">
<code class="sig-name descname">at_script_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageHandler.at_script_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.at_script_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called when script is first started</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rplanguage.LanguageHandler.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.rplanguage.LanguageHandler'</em><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rplanguage.LanguageHandler.translate">
<code class="sig-name descname">translate</code><span class="sig-paren">(</span><em class="sig-param">text</em>, <em class="sig-param">level=0.0</em>, <em class="sig-param">language='default'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#LanguageHandler.translate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.translate" title="Permalink to this definition"></a></dt>
<dd><p>Translate the text according to the given level.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>str</em>) The text to translate</p></li>
<li><p><strong>level</strong> (<em>real</em>) Value between 0.0 and 1.0, where
0.0 means no obfuscation (text returned unchanged) and
1.0 means full conversion of every word. The closer to
1, the shorter words will be translated.</p></li>
<li><p><strong>language</strong> (<em>str</em>) The language key identifier.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A translated string.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>text (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rplanguage.LanguageHandler.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'LanguageHandler'</em><a class="headerlink" href="#evennia.contrib.rplanguage.LanguageHandler.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rplanguage.add_language">
<code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">add_language</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#add_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.add_language" title="Permalink to this definition"></a></dt>
<dd><p>Access function to creating a new language. See the docstring of
<cite>LanguageHandler.add</cite> for list of keyword arguments.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rplanguage.available_languages">
<code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">available_languages</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#available_languages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.available_languages" title="Permalink to this definition"></a></dt>
<dd><p>Returns all available language keys.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of key strings of all available
languages.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>languages (list)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rplanguage.obfuscate_language">
<code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">obfuscate_language</code><span class="sig-paren">(</span><em class="sig-param">text</em>, <em class="sig-param">level=0.0</em>, <em class="sig-param">language='default'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#obfuscate_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.obfuscate_language" title="Permalink to this definition"></a></dt>
<dd><p>Main access method for the language parser.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>str</em>) Text to obfuscate.</p></li>
<li><p><strong>level</strong> (<em>real</em><em>, </em><em>optional</em>) A value from 0.0-1.0 determining
the level of obfuscation where 0 means no jobfuscation
(string returned unchanged) and 1.0 means the entire
string is obfuscated.</p></li>
<li><p><strong>language</strong> (<em>str</em><em>, </em><em>optional</em>) The identifier of a language
the system understands.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The translated text.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>translated (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rplanguage.obfuscate_whisper">
<code class="sig-prename descclassname">evennia.contrib.rplanguage.</code><code class="sig-name descname">obfuscate_whisper</code><span class="sig-paren">(</span><em class="sig-param">whisper</em>, <em class="sig-param">level=0.0</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rplanguage.html#obfuscate_whisper"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rplanguage.obfuscate_whisper" title="Permalink to this definition"></a></dt>
<dd><p>Obfuscate whisper depending on a pre-calculated level
(that may depend on distance, listening skill etc)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>whisper</strong> (<em>str</em>) The whisper string to obscure. The
entire string will be considered in the obscuration.</p></li>
<li><p><strong>level</strong> (<em>real</em><em>, </em><em>optional</em>) This is a value 0-1, where 0
means not obscured (whisper returned unchanged) and 1
means fully obscured.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.rpsystem">
<span id="evennia-contrib-rpsystem-module"></span><h2>evennia.contrib.rpsystem module<a class="headerlink" href="#module-evennia.contrib.rpsystem" title="Permalink to this headline"></a></h2>
<p>Roleplaying base system for Evennia</p>
<p>Contribution - Griatch, 2015</p>
<p>This module contains the ContribRPObject, ContribRPRoom and
ContribRPCharacter typeclasses. If you inherit your
objects/rooms/character from these (or make them the defaults) from
these you will get the following features:</p>
<blockquote>
<div><ul class="simple">
<li><p>Objects/Rooms will get the ability to have poses and will report</p></li>
</ul>
<p>the poses of items inside them (the latter most useful for Rooms).
- Characters will get poses and also sdescs (short descriptions)
that will be used instead of their keys. They will gain commands
for managing recognition (custom sdesc-replacement), masking
themselves as well as an advanced free-form emote command.</p>
</div></blockquote>
<p>To use, simply import the typclasses you want from this module and use
them to create your objects, or set them to default.</p>
<p>In more detail, This RP base system introduces the following features
to a game, common to many RP-centric games:</p>
<blockquote>
<div><ul class="simple">
<li><dl class="simple">
<dt>emote system using director stance emoting (names/sdescs).</dt><dd><p>This uses a customizable replacement noun (/me, &#64; etc) to
represent you in the emote. You can use /sdesc, /nick, /key or
/alias to reference objects in the room. You can use any
number of sdesc sub-parts to differentiate a local sdesc, or
use /1-sdesc etc to differentiate them. The emote also
identifies nested says.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>sdesc obscuration of real character names for use in emotes</dt><dd><p>and in any referencing such as object.search(). This relies
on an SdescHandler <cite>sdesc</cite> being set on the Character and
makes use of a custom Character.get_display_name hook. If
sdesc is not set, the characters <cite>key</cite> is used instead. This
is particularly used in the emoting system.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>recog system to assign your own nicknames to characters, can then</dt><dd><p>be used for referencing. The user may recog a user and assign
any personal nick to them. This will be shown in descriptions
and used to reference them. This is making use of the nick
functionality of Evennia.</p>
</dd>
</dl>
</li>
<li><p>masks to hide your identity (using a simple lock).</p></li>
<li><dl class="simple">
<dt>pose system to set room-persistent poses, visible in room</dt><dd><p>descriptions and when looking at the person/object. This is a
simple Attribute that modifies how the characters is viewed when
in a room as sdesc + pose.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>in-emote says, including seamless integration with language</dt><dd><p>obscuration routine (such as contrib/rplanguage.py)</p>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
<p>Examples:</p>
<p>&gt; look
Tavern
The tavern is full of nice people</p>
<p><em>A tall man</em> is standing by the bar.</p>
<p>Above is an example of a player with an sdesc “a tall man”. It is also
an example of a static <em>pose</em>: The “standing by the bar” has been set
by the player of the tall man, so that people looking at him can tell
at a glance what is going on.</p>
<p>&gt; emote /me looks at /tall and says “Hello!”</p>
<dl class="simple">
<dt>I see:</dt><dd><p>Griatch looks at Tall man and says “Hello”.</p>
</dd>
<dt>Tall man (assuming his name is Tom) sees:</dt><dd><p>The godlike figure looks at Tom and says “Hello”.</p>
</dd>
</dl>
<p>Verbose Installation Instructions:</p>
<blockquote>
<div><ol class="arabic">
<li><p>In typeclasses/character.py:
Import the <cite>ContribRPCharacter</cite> class:</p>
<blockquote>
<div><p><cite>from evennia.contrib.rpsystem import ContribRPCharacter</cite></p>
</div></blockquote>
<dl class="simple">
<dt>Inherit ContribRPCharacter:</dt><dd><p>Change “class Character(DefaultCharacter):” to
<cite>class Character(ContribRPCharacter):</cite></p>
</dd>
<dt>If you have any overriden calls in <cite>at_object_creation(self)</cite>:</dt><dd><p>Add <cite>super().at_object_creation()</cite> as the top line.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>In <cite>typeclasses/rooms.py</cite>:</dt><dd><p>Import the <cite>ContribRPRoom</cite> class:
<cite>from evennia.contrib.rpsystem import ContribRPRoom</cite></p>
</dd>
<dt>Inherit <cite>ContribRPRoom</cite>:</dt><dd><p>Change <cite>class Room(DefaultRoom):</cite> to
<cite>class Room(ContribRPRoom):</cite></p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>In <cite>typeclasses/objects.py</cite></dt><dd><p>Import the <cite>ContribRPObject</cite> class:
<cite>from evennia.contrib.rpsystem import ContribRPObject</cite></p>
</dd>
<dt>Inherit <cite>ContribRPObject</cite>:</dt><dd><p>Change <cite>class Object(DefaultObject):</cite> to
<cite>class Object(ContribRPObject):</cite></p>
</dd>
</dl>
</li>
<li><p>Reload the server (&#64;reload or from console: “evennia reload”)</p></li>
<li><dl class="simple">
<dt>Force typeclass updates as required. Example for your character:</dt><dd><p>&#64;type/reset/force me = typeclasses.characters.Character</p>
</dd>
</dl>
</li>
</ol>
</div></blockquote>
<dl class="class">
<dt id="evennia.contrib.rpsystem.CmdEmote">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">CmdEmote</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdEmote"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.RPCommand" title="evennia.contrib.rpsystem.RPCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.RPCommand</span></code></a></p>
<p>Emote an action, allowing dynamic replacement of
text in the emote.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>emote text</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>emote /me looks around.
emote With a flurry /me attacks /tall man with his sword.
emote “Hello”, /me says.</p>
<p>Describes an event in the world. This allows the use of /ref
markers to replace with the short descriptions or recognized
strings of objects in the same room. These will be translated to
emotes to match each person seeing it. Use “…” for saying
things and langcode”…” without spaces to say something in
a different language.</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = (':', 'emote')</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {':', 'emote'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = [':']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdEmote.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdEmote.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.func" title="Permalink to this definition"></a></dt>
<dd><p>Perform the emote.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote.key">
<code class="sig-name descname">key</code><em class="property"> = 'emote'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdEmote.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':', 'category': 'general', 'key': 'emote', 'tags': '', 'text': '\n Emote an action, allowing dynamic replacement of\n text in the emote.\n\n Usage:\n emote text\n\n Example:\n emote /me looks around.\n emote With a flurry /me attacks /tall man with his sword.\n emote &quot;Hello&quot;, /me says.\n\n Describes an event in the world. This allows the use of /ref\n markers to replace with the short descriptions or recognized\n strings of objects in the same room. These will be translated to\n emotes to match each person seeing it. Use &quot;...&quot; for saying\n things and langcode&quot;...&quot; without spaces to say something in\n a different language.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.CmdMask">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">CmdMask</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdMask"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.RPCommand" title="evennia.contrib.rpsystem.RPCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.RPCommand</span></code></a></p>
<p>Wear a mask</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>mask &lt;new sdesc&gt;
unmask</p>
</dd>
</dl>
<p>This will put on a mask to hide your identity. When wearing
a mask, your sdesc will be replaced by the sdesc you pick and
peoples recognitions of you will be disabled.</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('mask', 'unmask')</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'mask', 'unmask'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['unmask']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdMask.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdMask.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the actual executing part of the command. It is
called directly after self.parse(). See the docstring of this
module for which object properties are available (beyond those
set in self.parse())</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask.key">
<code class="sig-name descname">key</code><em class="property"> = 'mask'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdMask.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unmask', 'category': 'general', 'key': 'mask', 'tags': '', 'text': &quot;\n Wear a mask\n\n Usage:\n mask &lt;new sdesc&gt;\n unmask\n\n This will put on a mask to hide your identity. When wearing\n a mask, your sdesc will be replaced by the sdesc you pick and\n people's recognitions of you will be disabled.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.CmdPose">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">CmdPose</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdPose"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.RPCommand" title="evennia.contrib.rpsystem.RPCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.RPCommand</span></code></a></p>
<p>Set a static pose</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>pose &lt;pose&gt;
pose default &lt;pose&gt;
pose reset
pose obj = &lt;pose&gt;
pose default obj = &lt;pose&gt;
pose reset obj =</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<p>pose leans against the tree
pose is talking to the barkeep.
pose box = is sitting on the floor.</p>
<p>Set a static pose. This is the end of a full sentence that starts
with your sdesc. If no full stop is given, it will be added
automatically. The default pose is the pose you get when using
pose reset. Note that you can use sdescs/recogs to reference
people in your pose, but these always appear as that persons
sdesc in the emote, regardless of who is seeing it.</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('pose',)</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'pose'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdPose.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdPose.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.func" title="Permalink to this definition"></a></dt>
<dd><p>Create the pose</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose.key">
<code class="sig-name descname">key</code><em class="property"> = 'pose'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdPose.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdPose.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.parse" title="Permalink to this definition"></a></dt>
<dd><p>Extract the “default” alternative to the pose.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdPose.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'pose', 'tags': '', 'text': &quot;\n Set a static pose\n\n Usage:\n pose &lt;pose&gt;\n pose default &lt;pose&gt;\n pose reset\n pose obj = &lt;pose&gt;\n pose default obj = &lt;pose&gt;\n pose reset obj =\n\n Examples:\n pose leans against the tree\n pose is talking to the barkeep.\n pose box = is sitting on the floor.\n\n Set a static pose. This is the end of a full sentence that starts\n with your sdesc. If no full stop is given, it will be added\n automatically. The default pose is the pose you get when using\n pose reset. Note that you can use sdescs/recogs to reference\n people in your pose, but these always appear as that person's\n sdesc in the emote, regardless of who is seeing it.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.CmdRecog">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">CmdRecog</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdRecog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.RPCommand" title="evennia.contrib.rpsystem.RPCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.RPCommand</span></code></a></p>
<p>Recognize another person in the same room.</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>recog
recog sdesc as alias
forget alias</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>recog tall man as Griatch
forget griatch</p>
<p>This will assign a personal alias for a person, or forget said alias.
Using the command without arguments will list all current recogs.</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('recog', 'forget', 'recognize')</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'forget', 'recog', 'recognize'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['forget', 'recognize']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdRecog.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdRecog.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.func" title="Permalink to this definition"></a></dt>
<dd><p>Assign the recog</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog.key">
<code class="sig-name descname">key</code><em class="property"> = 'recog'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdRecog.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdRecog.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.parse" title="Permalink to this definition"></a></dt>
<dd><p>Parse for the sdesc as alias structure</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdRecog.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'forget recognize', 'category': 'general', 'key': 'recog', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.CmdSay">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">CmdSay</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdSay"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.RPCommand" title="evennia.contrib.rpsystem.RPCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.RPCommand</span></code></a></p>
<p>speak as your character</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>say &lt;message&gt;</p>
</dd>
</dl>
<p>Talk to those in your current location.</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&quot;', 'say', &quot;'&quot;)</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'&quot;', &quot;'&quot;, 'say'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&quot;', &quot;'&quot;]</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdSay.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdSay.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.func" title="Permalink to this definition"></a></dt>
<dd><p>Run the say command</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay.key">
<code class="sig-name descname">key</code><em class="property"> = 'say'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSay.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&quot; \'', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say &lt;message&gt;\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.CmdSdesc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">CmdSdesc</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdSdesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.RPCommand" title="evennia.contrib.rpsystem.RPCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.RPCommand</span></code></a></p>
<p>Assign yourself a short description (sdesc).</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>sdesc &lt;short description&gt;</p>
</dd>
</dl>
<p>Assigns a short description to yourself.</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('sdesc',)</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'sdesc'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.CmdSdesc.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#CmdSdesc.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.func" title="Permalink to this definition"></a></dt>
<dd><p>Assign the sdesc</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc.key">
<code class="sig-name descname">key</code><em class="property"> = 'sdesc'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.CmdSdesc.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'sdesc', 'tags': '', 'text': '\n Assign yourself a short description (sdesc).\n\n Usage:\n sdesc &lt;short description&gt;\n\n Assigns a short description to yourself.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">ContribRPCharacter</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultCharacter" title="evennia.objects.objects.DefaultCharacter"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultCharacter</span></code></a>, <a class="reference internal" href="#evennia.contrib.rpsystem.ContribRPObject" title="evennia.contrib.rpsystem.ContribRPObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.ContribRPObject</span></code></a></p>
<p>This is a character class that has poses, sdesc and recog.</p>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for ContribRPCharacter&gt;</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.at_before_say">
<code class="sig-name descname">at_before_say</code><span class="sig-paren">(</span><em class="sig-param">message</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.at_before_say"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.at_before_say" title="Permalink to this definition"></a></dt>
<dd><p>Called before the object says or whispers anything, return modified message.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>message</strong> (<em>str</em>) The suggested say/whisper text spoken by self.</p>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>whisper (bool): If True, this is a whisper rather than a say.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.at_object_creation">
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.at_object_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called at initial creation.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.get_display_name">
<code class="sig-name descname">get_display_name</code><span class="sig-paren">(</span><em class="sig-param">looker</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.get_display_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.get_display_name" title="Permalink to this definition"></a></dt>
<dd><p>Displays the name of the object in a viewer-aware manner.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>looker</strong> (<a class="reference internal" href="evennia.typeclasses.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><em>TypedObject</em></a>) The object or account that is looking
at/getting inforamtion for this object.</p>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>pose (bool): Include the pose (if available) in the return.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><p>A string of the sdesc containing the name of the object,
if this is defined.</p>
<blockquote>
<div><p>including the DBREF if this user is privileged to control
said object.</p>
</div></blockquote>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>name (str)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The RPCharacter version of this method colors its display to make
characters stand out from other objects.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.rpsystem.ContribRPCharacter'</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.process_language">
<code class="sig-name descname">process_language</code><span class="sig-paren">(</span><em class="sig-param">text</em>, <em class="sig-param">speaker</em>, <em class="sig-param">language</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.process_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.process_language" title="Permalink to this definition"></a></dt>
<dd><p>Allows to process the spoken text, for example
by obfuscating language based on your and the
speakers language skills. Also a good place to
put coloring.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>text</strong> (<em>str</em>) The text to process.</p></li>
<li><p><strong>speaker</strong> (<em>Object</em>) The object delivering the text.</p></li>
<li><p><strong>language</strong> (<em>str</em>) An identifier string for the language.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The optionally processed text.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>text (str)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>This is designed to work together with a string obfuscator
such as the <cite>obfuscate_language</cite> or <cite>obfuscate_whisper</cite> in
the evennia.contrib.rplanguage module.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.process_recog">
<code class="sig-name descname">process_recog</code><span class="sig-paren">(</span><em class="sig-param">recog</em>, <em class="sig-param">obj</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.process_recog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.process_recog" title="Permalink to this definition"></a></dt>
<dd><p>Allows to customize how a recog string is displayed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>recog</strong> (<em>str</em>) The recog string. It has already been
translated from the original sdesc at this point.</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) The object the recog:ed string belongs to.
This is not used by default.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The modified recog string.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>recog (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.process_sdesc">
<code class="sig-name descname">process_sdesc</code><span class="sig-paren">(</span><em class="sig-param">sdesc</em>, <em class="sig-param">obj</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.process_sdesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.process_sdesc" title="Permalink to this definition"></a></dt>
<dd><p>Allows to customize how your sdesc is displayed (primarily by
changing colors).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sdesc</strong> (<em>str</em>) The sdesc to display.</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) The object to which the adjoining sdesc
belongs. If this object is equal to yourself, then
you are viewing yourself (and sdesc is your key).
This is not used by default.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>The processed sdesc ready</dt><dd><p>for display.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>sdesc (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.recog">
<code class="sig-name descname">recog</code><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.recog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.recog" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.sdesc">
<code class="sig-name descname">sdesc</code><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPCharacter.sdesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.sdesc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPCharacter.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'ContribRPCharacter'</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPCharacter.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.ContribRPObject">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">ContribRPObject</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject</span></code></a></p>
<p>This class is meant as a mix-in or parent for objects in an
rp-heavy game. It implements the base functionality for poses.</p>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.ContribRPObject.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.ContribRPObject.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPObject._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for ContribRPObject&gt;</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPObject.at_object_creation">
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPObject.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.at_object_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called at initial creation.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPObject.get_display_name">
<code class="sig-name descname">get_display_name</code><span class="sig-paren">(</span><em class="sig-param">looker</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPObject.get_display_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.get_display_name" title="Permalink to this definition"></a></dt>
<dd><p>Displays the name of the object in a viewer-aware manner.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>looker</strong> (<a class="reference internal" href="evennia.typeclasses.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><em>TypedObject</em></a>) The object or account that is looking
at/getting inforamtion for this object.</p>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>pose (bool): Include the pose (if available) in the return.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><p>A string of the sdesc containing the name of the object,
if this is defined.</p>
<blockquote>
<div><p>including the DBREF if this user is privileged to control
said object.</p>
</div></blockquote>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>name (str)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The RPObject version doesnt add color to its display.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPObject.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.rpsystem.ContribRPObject'</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPObject.return_appearance">
<code class="sig-name descname">return_appearance</code><span class="sig-paren">(</span><em class="sig-param">looker</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPObject.return_appearance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.return_appearance" title="Permalink to this definition"></a></dt>
<dd><p>This formats a description. It is the hook a look command
should call.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>looker</strong> (<em>Object</em>) Object doing the looking.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.ContribRPObject.search">
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param">searchdata</em>, <em class="sig-param">global_search=False</em>, <em class="sig-param">use_nicks=True</em>, <em class="sig-param">typeclass=None</em>, <em class="sig-param">location=None</em>, <em class="sig-param">attribute_name=None</em>, <em class="sig-param">quiet=False</em>, <em class="sig-param">exact=False</em>, <em class="sig-param">candidates=None</em>, <em class="sig-param">nofound_string=None</em>, <em class="sig-param">multimatch_string=None</em>, <em class="sig-param">use_dbref=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPObject.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.search" title="Permalink to this definition"></a></dt>
<dd><p>Returns an Object matching a search string/condition, taking
sdescs into account.</p>
<p>Perform a standard object search in the database, handling
multiple results and lack thereof gracefully. By default, only
objects in the current <cite>location</cite> of <cite>self</cite> or its inventory are searched for.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>searchdata</strong> (<em>str</em><em> or </em><em>obj</em>) <p>Primary search criterion. Will be matched
against <cite>object.key</cite> (with <cite>object.aliases</cite> second) unless
the keyword attribute_name specifies otherwise.
<strong>Special strings:</strong>
- <cite>#&lt;num&gt;</cite>: search by unique dbref. This is always</p>
<blockquote>
<div><p>a global search.</p>
</div></blockquote>
<ul>
<li><p><cite>me,self</cite>: self-reference to this object</p></li>
<li><dl class="simple">
<dt><cite>&lt;num&gt;-&lt;string&gt;</cite> - can be used to differentiate</dt><dd><p>between multiple same-named matches</p>
</dd>
</dl>
</li>
</ul>
</p></li>
<li><p><strong>global_search</strong> (<em>bool</em>) Search all objects globally. This is overruled
by <cite>location</cite> keyword.</p></li>
<li><p><strong>use_nicks</strong> (<em>bool</em>) Use nickname-replace (nicktype “object”) on <cite>searchdata</cite>.</p></li>
<li><p><strong>typeclass</strong> (<em>str</em><em> or </em><em>Typeclass</em><em>, or </em><em>list of either</em>) Limit search only
to <cite>Objects</cite> with this typeclass. May be a list of typeclasses
for a broader search.</p></li>
<li><p><strong>location</strong> (<em>Object</em><em> or </em><em>list</em>) Specify a location or multiple locations
to search. Note that this is used to query the <em>contents</em> of a
location and will not match for the location itself -
if you want that, dont set this or use <cite>candidates</cite> to specify
exactly which objects should be searched.</p></li>
<li><p><strong>attribute_name</strong> (<em>str</em>) Define which property to search. If set, no
key+alias search will be performed. This can be used
to search database fields (<a href="#id222"><span class="problematic" id="id223">db_</span></a> will be automatically
appended), and if that fails, it will try to return
objects having Attributes with this name and value
equal to searchdata. A special use is to search for
“key” here if you want to do a key-search without
including aliases.</p></li>
<li><p><strong>quiet</strong> (<em>bool</em>) dont display default error messages - this tells the
search method that the user wants to handle all errors
themselves. It also changes the return value type, see
below.</p></li>
<li><p><strong>exact</strong> (<em>bool</em>) if unset (default) - prefers to match to beginning of
string rather than not matching at all. If set, requires
exact matching of entire string.</p></li>
<li><p><strong>candidates</strong> (<em>list of objects</em>) this is an optional custom list of objects
to search (filter) between. It is ignored if <cite>global_search</cite>
is given. If not set, this list will automatically be defined
to include the location, the contents of location and the
callers contents (inventory).</p></li>
<li><p><strong>nofound_string</strong> (<em>str</em>) optional custom string for not-found error message.</p></li>
<li><p><strong>multimatch_string</strong> (<em>str</em>) optional custom string for multimatch error header.</p></li>
<li><p><strong>use_dbref</strong> (<em>bool</em><em> or </em><em>None</em>) If None, only turn off use_dbref if we are of a lower
permission than Builder. Otherwise, honor the True/False value.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>will return an Object/None if <cite>quiet=False</cite>,</dt><dd><p>otherwise it will return a list of 0, 1 or more matches.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>match (Object, None or list)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>To find Accounts, use eg. <cite>evennia.account_search</cite>. If
<cite>quiet=False</cite>, error messages will be handled by
<cite>settings.SEARCH_AT_RESULT</cite> and echoed automatically (on
error, return will be <cite>None</cite>). If <cite>quiet=True</cite>, the error
messaging is assumed to be handled by the caller.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPObject.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'ContribRPObject'</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPObject.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.ContribRPRoom">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">ContribRPRoom</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ContribRPRoom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPRoom" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.rpsystem.ContribRPObject" title="evennia.contrib.rpsystem.ContribRPObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.ContribRPObject</span></code></a></p>
<p>Dummy inheritance for rooms.</p>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.ContribRPRoom.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPRoom.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.ContribRPRoom.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPRoom.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.rpsystem.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPRoom._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for ContribRPRoom&gt;</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPRoom._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPRoom.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.rpsystem.ContribRPRoom'</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPRoom.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.ContribRPRoom.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'ContribRPRoom'</em><a class="headerlink" href="#evennia.contrib.rpsystem.ContribRPRoom.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.EmoteError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">EmoteError</code><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#EmoteError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.EmoteError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.LanguageError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">LanguageError</code><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#LanguageError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.LanguageError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.RPCommand">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">RPCommand</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RPCommand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>simple parent</p>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('command',)</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'command'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand.key">
<code class="sig-name descname">key</code><em class="property"> = 'command'</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RPCommand.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RPCommand.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.parse" title="Permalink to this definition"></a></dt>
<dd><p>strip extra whitespace</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPCommand.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': 'simple parent'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.RPSystemCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">RPSystemCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RPSystemCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RPSystemCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>Mix-in for adding rp-commands to default cmdset.</p>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RPSystemCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RPSystemCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RPSystemCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>Hook method - this should be overloaded in the inheriting
class, and should take care of populating the cmdset by use of
self.add().</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.rpsystem.RPSystemCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.rpsystem.RPSystemCmdSet'</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPSystemCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.RecogError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">RecogError</code><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.RecogHandler">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">RecogHandler</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This handler manages the recognition mapping
of an Object.</p>
<p>The handler stores data in Attributes as dictionaries of
the following names:</p>
<blockquote>
<div><p>_recog_ref2recog
_recog_obj2recog
_recog_obj2regex</p>
</div></blockquote>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize the handler</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) The entity on which this handler is stored.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler._cache">
<code class="sig-name descname">_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler._cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler._cache" title="Permalink to this definition"></a></dt>
<dd><p>Load data to handler cache</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler.add">
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">recog</em>, <em class="sig-param">max_length=60</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler.add" title="Permalink to this definition"></a></dt>
<dd><p>Assign a custom recog (nick) to the given object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>obj</strong> (<em>Object</em>) The object ot associate with the recog
string. This is usually determined from the sdesc in the
room by a call to parse_sdescs_and_recogs, but can also be
given.</p></li>
<li><p><strong>recog</strong> (<em>str</em>) The replacement string to use with this object.</p></li>
<li><p><strong>max_length</strong> (<em>int</em><em>, </em><em>optional</em>) The max length of the recog string.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The (possibly cleaned up) recog string actually set.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>recog (str)</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.rpsystem.SdescError" title="evennia.contrib.rpsystem.SdescError"><strong>SdescError</strong></a> When recog could not be set or sdesc longer
than <cite>max_length</cite>.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler.all">
<code class="sig-name descname">all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler.all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler.all" title="Permalink to this definition"></a></dt>
<dd><p>Get a mapping of the recogs stored in handler.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A mapping of {recog: obj} stored in handler.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>recogs (dict)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler.get">
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler.get" title="Permalink to this definition"></a></dt>
<dd><p>Get recog replacement string, if one exists, otherwise
get sdesc and as a last resort, the objects key.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) The object, whose sdesc to replace</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The replacement string to use.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>recog (str)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>This method will respect a “enable_recog” lock set on
<cite>obj</cite> (True by default) in order to turn off recog
mechanism. This is useful for adding masks/hoods etc.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler.get_regex_tuple">
<code class="sig-name descname">get_regex_tuple</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler.get_regex_tuple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler.get_regex_tuple" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Tuple (recog_regex, obj, recog)</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>rec (tuple)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.RecogHandler.remove">
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#RecogHandler.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.RecogHandler.remove" title="Permalink to this definition"></a></dt>
<dd><p>Clear recog for a given object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) The object for which to remove recog.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.rpsystem.SdescError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">SdescError</code><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.rpsystem.SdescHandler">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">SdescHandler</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This Handler wraps all operations with sdescs. We
need to use this since we do a lot preparations on
sdescs when updating them, in order for them to be
efficient to search for and query.</p>
<p>The handler stores data in the following Attributes</p>
<blockquote>
<div><p>_sdesc - a string
_regex - an empty dictionary</p>
</div></blockquote>
<dl class="method">
<dt id="evennia.contrib.rpsystem.SdescHandler.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescHandler.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize the handler</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) The entity on which this handler is stored.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.SdescHandler._cache">
<code class="sig-name descname">_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescHandler._cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescHandler._cache" title="Permalink to this definition"></a></dt>
<dd><p>Cache data from storage</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.SdescHandler.add">
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">sdesc</em>, <em class="sig-param">max_length=60</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescHandler.add" title="Permalink to this definition"></a></dt>
<dd><p>Add a new sdesc to object, replacing the old one.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sdesc</strong> (<em>str</em>) The sdesc to set. This may be stripped
of control sequences before setting.</p></li>
<li><p><strong>max_length</strong> (<em>int</em><em>, </em><em>optional</em>) The max limit of the sdesc.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The actually set sdesc.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>sdesc (str)</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><ul class="simple">
<li><p><a class="reference internal" href="#evennia.contrib.rpsystem.SdescError" title="evennia.contrib.rpsystem.SdescError"><strong>SdescError</strong></a> If the sdesc is empty, can not be set or is</p></li>
<li><p><strong>longer than max_length.</strong> </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.SdescHandler.get">
<code class="sig-name descname">get</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescHandler.get" title="Permalink to this definition"></a></dt>
<dd><p>Simple getter. The sdesc should never be allowed to
be empty, but if it is we must fall back to the key.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.rpsystem.SdescHandler.get_regex_tuple">
<code class="sig-name descname">get_regex_tuple</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#SdescHandler.get_regex_tuple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.SdescHandler.get_regex_tuple" title="Permalink to this definition"></a></dt>
<dd><p>Return data for sdesc/recog handling</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>tuple (sdesc_regex, obj, sdesc)</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>tup (tuple)</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rpsystem._dummy_process">
<code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">_dummy_process</code><span class="sig-paren">(</span><em class="sig-param">text</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#_dummy_process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem._dummy_process" title="Permalink to this definition"></a></dt>
<dd><p>Pass-through processor</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rpsystem.ordered_permutation_regex">
<code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">ordered_permutation_regex</code><span class="sig-paren">(</span><em class="sig-param">sentence</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#ordered_permutation_regex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.ordered_permutation_regex" title="Permalink to this definition"></a></dt>
<dd><p>Builds a regex that matches ordered permutations of a sentences
words.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>sentence</strong> (<em>str</em>) The sentence to build a match pattern to</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Compiled regex object represented the</dt><dd><p>possible ordered permutations of the sentence, from longest to
shortest.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>regex (re object)</p>
</dd>
</dl>
<p class="rubric">Example</p>
<p>The sdesc_regex for an sdesc of ” very tall man” will
result in the following allowed permutations,
regex-matched in inverse order of length (case-insensitive):
“the very tall man”, “the very tall”, “very tall man”,
“very tall”, “the very”, “tall man”, “the”, “very”, “tall”,
and “man”.
We also add regex to make sure it also accepts num-specifiers,
like /2-tall.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rpsystem.parse_language">
<code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">parse_language</code><span class="sig-paren">(</span><em class="sig-param">speaker</em>, <em class="sig-param">emote</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#parse_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.parse_language" title="Permalink to this definition"></a></dt>
<dd><p>Parse the emote for language. This is
used with a plugin for handling languages.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>speaker</strong> (<em>Object</em>) The object speaking.</p></li>
<li><p><strong>emote</strong> (<em>str</em>) An emote possibly containing
language references.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>A tuple where the</dt><dd><p><cite>emote</cite> is the emote string with all says
(including quotes) replaced with reference
markers on the form {##n} where n is a running
number. The <cite>mapping</cite> is a dictionary between
the markers and a tuple (langname, saytext), where
langname can be None.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(emote, mapping) (tuple)</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.rplanguage.LanguageError" title="evennia.contrib.rplanguage.LanguageError"><strong>LanguageError</strong></a> If an invalid language was specified.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Note that no errors are raised if the wrong language identifier
is given.
This data, together with the identity of the speaker, is
intended to be used by the “listener” later, since with this
information the language skill of the speaker can be offset to
the language skill of the listener to determine how much
information is actually conveyed.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rpsystem.parse_sdescs_and_recogs">
<code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">parse_sdescs_and_recogs</code><span class="sig-paren">(</span><em class="sig-param">sender</em>, <em class="sig-param">candidates</em>, <em class="sig-param">string</em>, <em class="sig-param">search_mode=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#parse_sdescs_and_recogs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.parse_sdescs_and_recogs" title="Permalink to this definition"></a></dt>
<dd><p>Read a raw emote and parse it into an intermediary
format for distributing to all observers.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sender</strong> (<em>Object</em>) The object sending the emote. This objects
recog data will be considered in the parsing.</p></li>
<li><p><strong>candidates</strong> (<em>iterable</em>) A list of objects valid for referencing
in the emote.</p></li>
</ul>
</dd>
</dl>
<p>string (str): The string (like an emote) we want to analyze for keywords.
search_mode (bool, optional): If <cite>True</cite>, the “emote” is a query string</p>
<blockquote>
<div><p>we want to analyze. If so, the return value is changed.</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>If <cite>search_mode</cite> is <cite>False</cite></dt><dd><p>(default), a tuple where the emote is the emote string, with
all references replaced with internal-representation {#dbref}
markers and mapping is a dictionary <cite>{“#dbref”:obj, …}</cite>.</p>
</dd>
<dt>result (list): If <cite>search_mode</cite> is <cite>True</cite> we are</dt><dd><p>performing a search query on <cite>string</cite>, looking for a specific
object. A list with zero, one or more matches.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>(emote, mapping) (tuple)</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>EmoteException</strong> For various ref-matching errors.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The parser analyzes and should understand the following
_PREFIX-tagged structures in the emote:
- self-reference (/me)
- recogs (any part of it) stored on emoter, matching obj in <cite>candidates</cite>.
- sdesc (any part of it) from any obj in <cite>candidates</cite>.
- N-sdesc, N-recog separating multi-matches (1-tall, 2-tall)
- says, “…” are</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rpsystem.regex_tuple_from_key_alias">
<code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">regex_tuple_from_key_alias</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#regex_tuple_from_key_alias"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.regex_tuple_from_key_alias" title="Permalink to this definition"></a></dt>
<dd><p>This will build a regex tuple for any object, not just from those
with sdesc/recog handlers. Its used as a legacy mechanism for
being able to mix this contrib with objects not using sdescs, but
note that creating the ordered permutation regex dynamically for
every object will add computational overhead.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) This objects key and eventual aliases will
be used to build the tuple.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>A tuple</dt><dd><p>(ordered_permutation_regex, obj, key/alias)</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>regex_tuple (tuple)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.rpsystem.send_emote">
<code class="sig-prename descclassname">evennia.contrib.rpsystem.</code><code class="sig-name descname">send_emote</code><span class="sig-paren">(</span><em class="sig-param">sender</em>, <em class="sig-param">receivers</em>, <em class="sig-param">emote</em>, <em class="sig-param">anonymous_add='first'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpsystem.html#send_emote"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpsystem.send_emote" title="Permalink to this definition"></a></dt>
<dd><p>Main access function for distribute an emote.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sender</strong> (<em>Object</em>) The one sending the emote.</p></li>
<li><p><strong>receivers</strong> (<em>iterable</em>) Receivers of the emote. These
will also form the basis for which sdescs are
valid to use in the emote.</p></li>
<li><p><strong>emote</strong> (<em>str</em>) The raw emote string as input by emoter.</p></li>
<li><p><strong>anonymous_add</strong> (<em>str</em><em> or </em><em>None</em><em>, </em><em>optional</em>) If <cite>sender</cite> is not
self-referencing in the emote, this will auto-add
<cite>sender</cite>s data to the emote. Possible values are
- None: No auto-add at anonymous emote
- last: Add sender to the end of emote as [sender]
- first: Prepend sender to start of emote.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.simpledoor">
<span id="evennia-contrib-simpledoor-module"></span><h2>evennia.contrib.simpledoor module<a class="headerlink" href="#module-evennia.contrib.simpledoor" title="Permalink to this headline"></a></h2>
<p>SimpleDoor</p>
<p>Contribution - Griatch 2016</p>
<p>A simple two-way exit that represents a door that can be opened and
closed. Can easily be expanded from to make it lockable, destroyable
etc. Note that the simpledoor is based on Evennia locks, so it will
not work for a superuser (which bypasses all locks) - the superuser
will always appear to be able to close/open the door over and over
without the locks stopping you. To use the door, use <cite>&#64;quell</cite> or a
non-superuser account.</p>
<p>Installation:</p>
<blockquote>
<div><p>Import this module in mygame/commands/default_cmdsets and add
the CmdOpen and CmdOpenCloseDoor commands to the CharacterCmdSet;
then reload the server.</p>
</div></blockquote>
<p>To try it out, <cite>&#64;dig</cite> a new room and then use the (overloaded) <cite>&#64;open</cite>
commmand to open a new doorway to it like this:</p>
<blockquote>
<div><p>&#64;open doorway:contrib.simpledoor.SimpleDoor = otherroom</p>
</div></blockquote>
<p>You can then use <cite>open doorway and `close doorway</cite> to change the open
state. If you are not superuser (<cite>&#64;quell</cite> yourself) youll find you
cannot pass through either side of the door once its closed from the
other side.</p>
<dl class="class">
<dt id="evennia.contrib.simpledoor.CmdOpen">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.simpledoor.</code><code class="sig-name descname">CmdOpen</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#CmdOpen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.building.CmdOpen" title="evennia.commands.default.building.CmdOpen"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.building.CmdOpen</span></code></a></p>
<p>open a new exit from the current room</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>open &lt;new exit&gt;[;alias;alias..][:typeclass] [,&lt;return exit&gt;[;alias;..][:typeclass]]] = &lt;destination&gt;</p>
</dd>
</dl>
<p>Handles the creation of exits. If a destination is given, the exit
will point there. The &lt;return exit&gt; argument sets up an exit at the
destination leading back to the current room. Destination name
can be given both as a #dbref and a name, if that name is globally
unique.</p>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('open',)</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'open'}</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.CmdOpen.create_exit">
<code class="sig-name descname">create_exit</code><span class="sig-paren">(</span><em class="sig-param">exit_name</em>, <em class="sig-param">location</em>, <em class="sig-param">destination</em>, <em class="sig-param">exit_aliases=None</em>, <em class="sig-param">typeclass=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#CmdOpen.create_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.create_exit" title="Permalink to this definition"></a></dt>
<dd><p>Simple wrapper for the default CmdOpen.create_exit</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'building'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen.key">
<code class="sig-name descname">key</code><em class="property"> = 'open'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(open) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpen.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'open', 'tags': '', 'text': '\n open a new exit from the current room\n\n Usage:\n open &lt;new exit&gt;[;alias;alias..][:typeclass] [,&lt;return exit&gt;[;alias;..][:typeclass]]] = &lt;destination&gt;\n\n Handles the creation of exits. If a destination is given, the exit\n will point there. The &lt;return exit&gt; argument sets up an exit at the\n destination leading back to the current room. Destination name\n can be given both as a #dbref and a name, if that name is globally\n unique.\n\n '}</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.simpledoor.</code><code class="sig-name descname">CmdOpenCloseDoor</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#CmdOpenCloseDoor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Open and close a door</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>open &lt;door&gt;
close &lt;door&gt;</p>
</dd>
</dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('close', 'open')</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'close', 'open'}</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['close']</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#CmdOpenCloseDoor.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.func" title="Permalink to this definition"></a></dt>
<dd><p>implement the door functionality</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.key">
<code class="sig-name descname">key</code><em class="property"> = 'open'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'close', 'category': 'general', 'key': 'open', 'tags': '', 'text': '\n Open and close a door\n\n Usage:\n open &lt;door&gt;\n close &lt;door&gt;\n\n '}</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.simpledoor.SimpleDoor">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.simpledoor.</code><code class="sig-name descname">SimpleDoor</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#SimpleDoor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultExit" title="evennia.objects.objects.DefaultExit"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultExit</span></code></a></p>
<p>A two-way exit “door” with some methods for affecting both “sides”
of the door at the same time. For example, set a lock on either of the two
sides using <cite>exitname.setlock(“traverse:false())</cite></p>
<dl class="exception">
<dt id="evennia.contrib.simpledoor.SimpleDoor.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.simpledoor.SimpleDoor.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.SimpleDoor._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for SimpleDoor&gt;</em><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.SimpleDoor.at_failed_traverse">
<code class="sig-name descname">at_failed_traverse</code><span class="sig-paren">(</span><em class="sig-param">traversing_object</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#SimpleDoor.at_failed_traverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.at_failed_traverse" title="Permalink to this definition"></a></dt>
<dd><p>Called when door traverse: lock fails.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>traversing_object</strong> (<em>Typeclassed entity</em>) The object
attempting the traversal.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.SimpleDoor.at_object_creation">
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#SimpleDoor.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.at_object_creation" title="Permalink to this definition"></a></dt>
<dd><p>Called the very first time the door is created.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.SimpleDoor.delete">
<code class="sig-name descname">delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#SimpleDoor.delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.delete" title="Permalink to this definition"></a></dt>
<dd><p>Deletes both sides of the door.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.SimpleDoor.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.simpledoor.SimpleDoor'</em><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.SimpleDoor.setdesc">
<code class="sig-name descname">setdesc</code><span class="sig-paren">(</span><em class="sig-param">description</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#SimpleDoor.setdesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.setdesc" title="Permalink to this definition"></a></dt>
<dd><p>Sets identical descs on both sides of the door.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>setdesc</strong> (<em>str</em>) A description.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.simpledoor.SimpleDoor.setlock">
<code class="sig-name descname">setlock</code><span class="sig-paren">(</span><em class="sig-param">lockstring</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/simpledoor.html#SimpleDoor.setlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.setlock" title="Permalink to this definition"></a></dt>
<dd><p>Sets identical locks on both sides of the door.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>lockstring</strong> (<em>str</em>) A lockstring, like <cite>“traverse:true()”</cite>.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.simpledoor.SimpleDoor.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'SimpleDoor'</em><a class="headerlink" href="#evennia.contrib.simpledoor.SimpleDoor.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.slow_exit">
<span id="evennia-contrib-slow-exit-module"></span><h2>evennia.contrib.slow_exit module<a class="headerlink" href="#module-evennia.contrib.slow_exit" title="Permalink to this headline"></a></h2>
<p>Slow Exit typeclass</p>
<p>Contribution - Griatch 2014</p>
<p>This is an example of an Exit-type that delays its traversal.This
simulates slow movement, common in many different types of games. The
contrib also contains two commands, CmdSetSpeed and CmdStop for changing
the movement speed and abort an ongoing traversal, respectively.</p>
<p>To try out an exit of this type, you could connect two existing rooms
using something like this:</p>
<p>&#64;open north:contrib.slow_exit.SlowExit = &lt;destination&gt;</p>
<p>Installation:</p>
<p>To make this your new default exit, modify mygame/typeclasses/exits.py
to import this module and change the default Exit class to inherit
from SlowExit instead.</p>
<p>To get the ability to change your speed and abort your movement,
simply import and add CmdSetSpeed and CmdStop from this module to your
default cmdset (see tutorials on how to do this if you are unsure).</p>
<p>Notes:</p>
<p>This implementation is efficient but not persistent; so incomplete
movement will be lost in a server reload. This is acceptable for most
game types - to simulate longer travel times (more than the couple of
seconds assumed here), a more persistent variant using Scripts or the
TickerHandler might be better.</p>
<dl class="class">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.slow_exit.</code><code class="sig-name descname">CmdSetSpeed</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/slow_exit.html#CmdSetSpeed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>set your movement speed</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>setspeed stroll|walk|run|sprint</p>
</dd>
</dl>
<p>This will set your movement speed, determining how long time
it takes to traverse exits. If no speed is set, walk speed
is assumed.</p>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('setspeed',)</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'setspeed'}</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/slow_exit.html#CmdSetSpeed.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.func" title="Permalink to this definition"></a></dt>
<dd><p>Simply sets an Attribute used by the SlowExit above.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.key">
<code class="sig-name descname">key</code><em class="property"> = 'setspeed'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'setspeed', 'tags': '', 'text': &quot;\n set your movement speed\n\n Usage:\n setspeed stroll|walk|run|sprint\n\n This will set your movement speed, determining how long time\n it takes to traverse exits. If no speed is set, 'walk' speed\n is assumed.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.slow_exit.CmdStop">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.slow_exit.</code><code class="sig-name descname">CmdStop</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/slow_exit.html#CmdStop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>stop moving</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>stop</p>
</dd>
</dl>
<p>Stops the current movement, if any.</p>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('stop',)</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'stop'}</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.slow_exit.CmdStop.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/slow_exit.html#CmdStop.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.func" title="Permalink to this definition"></a></dt>
<dd><p>This is a very simple command, using the
stored deferred from the exit traversal above.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop.key">
<code class="sig-name descname">key</code><em class="property"> = 'stop'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.CmdStop.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'stop', 'tags': '', 'text': '\n stop moving\n\n Usage:\n stop\n\n Stops the current movement, if any.\n '}</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.slow_exit.SlowExit">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.slow_exit.</code><code class="sig-name descname">SlowExit</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/slow_exit.html#SlowExit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultExit" title="evennia.objects.objects.DefaultExit"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultExit</span></code></a></p>
<p>This overloads the way moving happens.</p>
<dl class="exception">
<dt id="evennia.contrib.slow_exit.SlowExit.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.slow_exit.SlowExit.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.SlowExit._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for SlowExit&gt;</em><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.slow_exit.SlowExit.at_traverse">
<code class="sig-name descname">at_traverse</code><span class="sig-paren">(</span><em class="sig-param">traversing_object</em>, <em class="sig-param">target_location</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/slow_exit.html#SlowExit.at_traverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit.at_traverse" title="Permalink to this definition"></a></dt>
<dd><p>Implements the actual traversal, using utils.delay to delay the move_to.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.SlowExit.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.slow_exit.SlowExit'</em><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.slow_exit.SlowExit.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'SlowExit'</em><a class="headerlink" href="#evennia.contrib.slow_exit.SlowExit.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.talking_npc">
<span id="evennia-contrib-talking-npc-module"></span><h2>evennia.contrib.talking_npc module<a class="headerlink" href="#module-evennia.contrib.talking_npc" title="Permalink to this headline"></a></h2>
<p>Evennia Talkative NPC</p>
<p>Contribution - Griatch 2011, grungies1138, 2016</p>
<p>This is a static NPC object capable of holding a simple menu-driven
conversation. Its just meant as an example. Create it by creating an
object of typeclass contrib.talking_npc.TalkingNPC, For example using
&#64;create:</p>
<blockquote>
<div><p>&#64;create/drop John : contrib.talking_npc.TalkingNPC</p>
</div></blockquote>
<p>Walk up to it and give the talk command to strike up a conversation.
If there are many talkative npcs in the same room you will get to
choose which ones talk command to call (Evennia handles this
automatically). This use of EvMenu is very simplistic; See EvMenu for
a lot more complex possibilities.</p>
<dl class="class">
<dt id="evennia.contrib.talking_npc.CmdTalk">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">CmdTalk</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#CmdTalk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.muxcommand.MuxCommand" title="evennia.commands.default.muxcommand.MuxCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.muxcommand.MuxCommand</span></code></a></p>
<p>Talks to an npc</p>
<dl class="simple">
<dt>Usage:</dt><dd><p>talk</p>
</dd>
</dl>
<p>This command is only available if a talkative non-player-character
(NPC) is actually present. It will strike up a conversation with
that NPC and give you options on what to talk about.</p>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('talk',)</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'talk'}</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.talking_npc.CmdTalk.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#CmdTalk.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.func" title="Permalink to this definition"></a></dt>
<dd><p>Implements the command.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk.key">
<code class="sig-name descname">key</code><em class="property"> = 'talk'</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk.locks">
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.locks" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.CmdTalk.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'talk', 'tags': '', 'text': '\n Talks to an npc\n\n Usage:\n talk\n\n This command is only available if a talkative non-player-character\n (NPC) is actually present. It will strike up a conversation with\n that NPC and give you options on what to talk about.\n '}</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.talking_npc.END">
<code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">END</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#END"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.END" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="class">
<dt id="evennia.contrib.talking_npc.TalkingCmdSet">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">TalkingCmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#TalkingCmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingCmdSet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
<p>Stores the talk command.</p>
<dl class="method">
<dt id="evennia.contrib.talking_npc.TalkingCmdSet.at_cmdset_creation">
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#TalkingCmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingCmdSet.at_cmdset_creation" title="Permalink to this definition"></a></dt>
<dd><p>populates the cmdset</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.TalkingCmdSet.key">
<code class="sig-name descname">key</code><em class="property"> = 'talkingcmdset'</em><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingCmdSet.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.TalkingCmdSet.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.talking_npc.TalkingCmdSet'</em><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingCmdSet.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.talking_npc.TalkingNPC">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">TalkingNPC</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#TalkingNPC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject</span></code></a></p>
<p>This implements a simple Object using the talk command and using
the conversation defined above.</p>
<dl class="exception">
<dt id="evennia.contrib.talking_npc.TalkingNPC.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.talking_npc.TalkingNPC.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.TalkingNPC._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for TalkingNPC&gt;</em><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.talking_npc.TalkingNPC.at_object_creation">
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#TalkingNPC.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC.at_object_creation" title="Permalink to this definition"></a></dt>
<dd><p>This is called when object is first created.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.TalkingNPC.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.talking_npc.TalkingNPC'</em><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.talking_npc.TalkingNPC.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'TalkingNPC'</em><a class="headerlink" href="#evennia.contrib.talking_npc.TalkingNPC.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.talking_npc.info1">
<code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">info1</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#info1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.info1" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.talking_npc.info2">
<code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">info2</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#info2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.info2" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.talking_npc.info3">
<code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">info3</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#info3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.info3" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.talking_npc.menu_start_node">
<code class="sig-prename descclassname">evennia.contrib.talking_npc.</code><code class="sig-name descname">menu_start_node</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/talking_npc.html#menu_start_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.talking_npc.menu_start_node" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-evennia.contrib.test_traits">
<span id="evennia-contrib-test-traits-module"></span><h2>evennia.contrib.test_traits module<a class="headerlink" href="#module-evennia.contrib.test_traits" title="Permalink to this headline"></a></h2>
<p>Unit test module for Trait classes.</p>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestNumericTraitOperators</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
<p>Test case for numeric magic method implementations.</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_add_traits">
<code class="sig-name descname">test_add_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_add_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_add_traits" title="Permalink to this definition"></a></dt>
<dd><p>test addition of <cite>Trait</cite> objects</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_numeric">
<code class="sig-name descname">test_comparisons_numeric</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_comparisons_numeric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_numeric" title="Permalink to this definition"></a></dt>
<dd><p>equality comparisons between <cite>Trait</cite> and numeric</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_traits">
<code class="sig-name descname">test_comparisons_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_comparisons_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_traits" title="Permalink to this definition"></a></dt>
<dd><p>test equality comparison between <cite>Trait</cite> objects</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_floordiv">
<code class="sig-name descname">test_floordiv</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_floordiv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_floordiv" title="Permalink to this definition"></a></dt>
<dd><p>test floor division of <cite>Trait</cite> objects</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_mul_traits">
<code class="sig-name descname">test_mul_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_mul_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_mul_traits" title="Permalink to this definition"></a></dt>
<dd><p>test multiplication of <cite>Trait</cite> objects</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_pos_shortcut">
<code class="sig-name descname">test_pos_shortcut</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_pos_shortcut"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_pos_shortcut" title="Permalink to this definition"></a></dt>
<dd><p>overridden unary + operator returns <cite>value</cite> property</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_sub_traits">
<code class="sig-name descname">test_sub_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_sub_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_sub_traits" title="Permalink to this definition"></a></dt>
<dd><p>test subtraction of <cite>Trait</cite> objects</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestTrait">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTrait</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<p>Test the base Trait class</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTrait.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTrait.test_init">
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_init" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTrait.test_repr">
<code class="sig-name descname">test_repr</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_repr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_repr" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTrait.test_trait_getset">
<code class="sig-name descname">test_trait_getset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_trait_getset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_trait_getset" title="Permalink to this definition"></a></dt>
<dd><p>Get-set-del operations on trait</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTrait.test_validate_input__fail">
<code class="sig-name descname">test_validate_input__fail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_validate_input__fail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_validate_input__fail" title="Permalink to this definition"></a></dt>
<dd><p>Test failing validation</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTrait.test_validate_input__valid">
<code class="sig-name descname">test_validate_input__valid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_validate_input__valid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_validate_input__valid" title="Permalink to this definition"></a></dt>
<dd><p>Test valid validation input</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestTraitCounter">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitCounter</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<p>Test for counter- Traits</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter._get_values">
<code class="sig-name descname">_get_values</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter._get_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter._get_values" title="Permalink to this definition"></a></dt>
<dd><p>Get (base, mod, value, min, max).</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__bigmod">
<code class="sig-name descname">test_boundaries__bigmod</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__bigmod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__bigmod" title="Permalink to this definition"></a></dt>
<dd><p>add a big mod</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__change_boundaries">
<code class="sig-name descname">test_boundaries__change_boundaries</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__change_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__change_boundaries" title="Permalink to this definition"></a></dt>
<dd><p>Change boundaries after base/mod change</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__disable">
<code class="sig-name descname">test_boundaries__disable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__disable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__disable" title="Permalink to this definition"></a></dt>
<dd><p>Disable and re-enable boundaries</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__inverse">
<code class="sig-name descname">test_boundaries__inverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__inverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__inverse" title="Permalink to this definition"></a></dt>
<dd><p>Set inverse boundaries - limited by base</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__minmax">
<code class="sig-name descname">test_boundaries__minmax</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__minmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__minmax" title="Permalink to this definition"></a></dt>
<dd><p>Test range</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_current">
<code class="sig-name descname">test_current</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_current"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_current" title="Permalink to this definition"></a></dt>
<dd><p>Modifying current value</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_delete">
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_delete" title="Permalink to this definition"></a></dt>
<dd><p>Deleting resets to default.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_descs">
<code class="sig-name descname">test_descs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_descs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_descs" title="Permalink to this definition"></a></dt>
<dd><p>Test descriptions</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_init">
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_init" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_percentage">
<code class="sig-name descname">test_percentage</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_percentage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_percentage" title="Permalink to this definition"></a></dt>
<dd><p>Test percentage calculation</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_value">
<code class="sig-name descname">test_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_value" title="Permalink to this definition"></a></dt>
<dd><p>value is current + mod, where current defaults to base</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitCounterTimed</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<p>Test for trait with timer component</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed._get_timer_data">
<code class="sig-name descname">_get_timer_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed._get_timer_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed._get_timer_data" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_rate">
<code class="sig-name descname">test_timer_rate</code><span class="sig-paren">(</span><em class="sig-param">mock_time</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed.test_timer_rate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_rate" title="Permalink to this definition"></a></dt>
<dd><p>Test time stepping</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_ratetarget">
<code class="sig-name descname">test_timer_ratetarget</code><span class="sig-paren">(</span><em class="sig-param">mock_time</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed.test_timer_ratetarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_ratetarget" title="Permalink to this definition"></a></dt>
<dd><p>test ratetarget</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestTraitGauge">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitGauge</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge._get_values">
<code class="sig-name descname">_get_values</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge._get_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge._get_values" title="Permalink to this definition"></a></dt>
<dd><p>Get (base, mod, value, min, max).</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__bigmod">
<code class="sig-name descname">test_boundaries__bigmod</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__bigmod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__bigmod" title="Permalink to this definition"></a></dt>
<dd><p>add a big mod</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__change_boundaries">
<code class="sig-name descname">test_boundaries__change_boundaries</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__change_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__change_boundaries" title="Permalink to this definition"></a></dt>
<dd><p>Change boundaries after current change</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__disable">
<code class="sig-name descname">test_boundaries__disable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__disable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__disable" title="Permalink to this definition"></a></dt>
<dd><p>Disable and re-enable boundary</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__inverse">
<code class="sig-name descname">test_boundaries__inverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__inverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__inverse" title="Permalink to this definition"></a></dt>
<dd><p>Try to set reversed boundaries</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__minmax">
<code class="sig-name descname">test_boundaries__minmax</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__minmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__minmax" title="Permalink to this definition"></a></dt>
<dd><p>Test range</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_current">
<code class="sig-name descname">test_current</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_current"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_current" title="Permalink to this definition"></a></dt>
<dd><p>Modifying current value</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_delete">
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_delete" title="Permalink to this definition"></a></dt>
<dd><p>Deleting resets to default.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_descs">
<code class="sig-name descname">test_descs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_descs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_descs" title="Permalink to this definition"></a></dt>
<dd><p>Test descriptions</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_init">
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_init" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_percentage">
<code class="sig-name descname">test_percentage</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_percentage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_percentage" title="Permalink to this definition"></a></dt>
<dd><p>Test percentage calculation</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_value">
<code class="sig-name descname">test_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_value" title="Permalink to this definition"></a></dt>
<dd><p>value is current, where current defaults to base + mod</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitGaugeTimed</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<p>Test for trait with timer component</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed._get_timer_data">
<code class="sig-name descname">_get_timer_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed._get_timer_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed._get_timer_data" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_rate">
<code class="sig-name descname">test_timer_rate</code><span class="sig-paren">(</span><em class="sig-param">mock_time</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed.test_timer_rate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_rate" title="Permalink to this definition"></a></dt>
<dd><p>Test time stepping</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_ratetarget">
<code class="sig-name descname">test_timer_ratetarget</code><span class="sig-paren">(</span><em class="sig-param">mock_time</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed.test_timer_ratetarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_ratetarget" title="Permalink to this definition"></a></dt>
<dd><p>test ratetarget</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TestTraitStatic">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitStatic</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<p>Test for static Traits</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitStatic._get_values">
<code class="sig-name descname">_get_values</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic._get_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic._get_values" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitStatic.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitStatic.test_delete">
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.test_delete" title="Permalink to this definition"></a></dt>
<dd><p>Deleting resets to default.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitStatic.test_init">
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.test_init" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TestTraitStatic.test_value">
<code class="sig-name descname">test_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.test_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.test_value" title="Permalink to this definition"></a></dt>
<dd><p>value is base + mod</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits.TraitHandlerTest">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TraitHandlerTest</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.test_traits._TraitHandlerBase" title="evennia.contrib.test_traits._TraitHandlerBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></a></p>
<p>Testing for TraitHandler</p>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_add_trait">
<code class="sig-name descname">test_add_trait</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_add_trait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_add_trait" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_all">
<code class="sig-name descname">test_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_all" title="Permalink to this definition"></a></dt>
<dd><p>Test all method</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_cache">
<code class="sig-name descname">test_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_cache" title="Permalink to this definition"></a></dt>
<dd><p>Cache should not be set until first get</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_clear">
<code class="sig-name descname">test_clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_clear" title="Permalink to this definition"></a></dt>
<dd><p>Test clear method</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_getting">
<code class="sig-name descname">test_getting</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_getting"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_getting" title="Permalink to this definition"></a></dt>
<dd><p>Test we are getting data from the dbstore</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_remove">
<code class="sig-name descname">test_remove</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_remove" title="Permalink to this definition"></a></dt>
<dd><p>Test remove method</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_setting">
<code class="sig-name descname">test_setting</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_setting"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_setting" title="Permalink to this definition"></a></dt>
<dd><p>Dont allow setting stuff on traithandler</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_trait_db_connection">
<code class="sig-name descname">test_trait_db_connection</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_trait_db_connection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_trait_db_connection" title="Permalink to this definition"></a></dt>
<dd><p>Test that updating a trait property actually updates value in db</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits._MockObj">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">_MockObj</code><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_MockObj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._MockObj" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="method">
<dt id="evennia.contrib.test_traits._MockObj.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_MockObj.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._MockObj.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits._MockObj.add">
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">key</em>, <em class="sig-param">value</em>, <em class="sig-param">category=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_MockObj.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._MockObj.add" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits._MockObj.get">
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">key</em>, <em class="sig-param">category=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_MockObj.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._MockObj.get" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.test_traits._TraitHandlerBase">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">_TraitHandlerBase</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_TraitHandlerBase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._TraitHandlerBase" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
<p>Base for trait tests</p>
<dl class="method">
<dt id="evennia.contrib.test_traits._TraitHandlerBase._get_dbstore">
<code class="sig-name descname">_get_dbstore</code><span class="sig-paren">(</span><em class="sig-param">key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_TraitHandlerBase._get_dbstore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._TraitHandlerBase._get_dbstore" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.test_traits._TraitHandlerBase.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#_TraitHandlerBase.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits._TraitHandlerBase.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.tests">
<span id="evennia-contrib-tests-module"></span><h2>evennia.contrib.tests module<a class="headerlink" href="#module-evennia.contrib.tests" title="Permalink to this headline"></a></h2>
<p>Testing suite for contrib folder</p>
<dl class="class">
<dt id="evennia.contrib.tests.CmdDummy">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">CmdDummy</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#CmdDummy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.CmdDummy" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.unixcommand.UnixCommand" title="evennia.contrib.unixcommand.UnixCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.unixcommand.UnixCommand</span></code></a></p>
<p>A dummy UnixCommand.</p>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('dummy',)</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'dummy'}</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.CmdDummy.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#CmdDummy.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.func" title="Permalink to this definition"></a></dt>
<dd><p>Override to handle the command execution.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.CmdDummy.init_parser">
<code class="sig-name descname">init_parser</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#CmdDummy.init_parser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.init_parser" title="Permalink to this definition"></a></dt>
<dd><p>Fill out options.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy.key">
<code class="sig-name descname">key</code><em class="property"> = 'dummy'</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.CmdDummy.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'dummy', 'tags': '', 'text': 'A dummy UnixCommand.'}</em><a class="headerlink" href="#evennia.contrib.tests.CmdDummy.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.ForceUTCDatetime">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">ForceUTCDatetime</code><a class="reference internal" href="../_modules/evennia/contrib/tests.html#ForceUTCDatetime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.ForceUTCDatetime" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></p>
<p>Force UTC datetime.</p>
<dl class="method">
<dt id="evennia.contrib.tests.ForceUTCDatetime.fromtimestamp">
<em class="property">classmethod </em><code class="sig-name descname">fromtimestamp</code><span class="sig-paren">(</span><em class="sig-param">timestamp</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#ForceUTCDatetime.fromtimestamp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.ForceUTCDatetime.fromtimestamp" title="Permalink to this definition"></a></dt>
<dd><p>Force fromtimestamp to run with naive datetimes.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.Submenu">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">Submenu</code><span class="sig-paren">(</span><em class="sig-param">caller=None</em>, <em class="sig-param">obj=None</em>, <em class="sig-param">title='Building menu: {obj}'</em>, <em class="sig-param">keys=None</em>, <em class="sig-param">parents=None</em>, <em class="sig-param">persistent=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#Submenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.Submenu" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.building_menu.BuildingMenu" title="evennia.contrib.building_menu.BuildingMenu"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.building_menu.BuildingMenu</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.Submenu.init">
<code class="sig-name descname">init</code><span class="sig-paren">(</span><em class="sig-param">exit</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#Submenu.init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.Submenu.init" title="Permalink to this definition"></a></dt>
<dd><p>Create the sub-menu to edit the specified object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>Object</em>) the object to edit.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is probably to be overridden in your subclasses.
Use <cite>add_choice</cite> and its variants to create menu choices.</p>
</div>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestBarter">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestBarter</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestBarter.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBarter.test_cmdtrade">
<code class="sig-name descname">test_cmdtrade</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter.test_cmdtrade"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter.test_cmdtrade" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBarter.test_cmdtradehelp">
<code class="sig-name descname">test_cmdtradehelp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter.test_cmdtradehelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter.test_cmdtradehelp" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBarter.test_tradehandler_base">
<code class="sig-name descname">test_tradehandler_base</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter.test_tradehandler_base"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter.test_tradehandler_base" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBarter.test_tradehandler_joins">
<code class="sig-name descname">test_tradehandler_joins</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter.test_tradehandler_joins"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter.test_tradehandler_joins" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBarter.test_tradehandler_offers">
<code class="sig-name descname">test_tradehandler_offers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBarter.test_tradehandler_offers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBarter.test_tradehandler_offers" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestBuildingMenu">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestBuildingMenu</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.test_add_choice_without_key">
<code class="sig-name descname">test_add_choice_without_key</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.test_add_choice_without_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.test_add_choice_without_key" title="Permalink to this definition"></a></dt>
<dd><p>Try to add choices without keys.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.test_callbacks">
<code class="sig-name descname">test_callbacks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.test_callbacks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.test_callbacks" title="Permalink to this definition"></a></dt>
<dd><p>Test callbacks in menus.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.test_multi_level">
<code class="sig-name descname">test_multi_level</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.test_multi_level"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.test_multi_level" title="Permalink to this definition"></a></dt>
<dd><p>Test multi-level choices.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.test_quit">
<code class="sig-name descname">test_quit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.test_quit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.test_quit" title="Permalink to this definition"></a></dt>
<dd><p>Try to quit the building menu.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.test_setattr">
<code class="sig-name descname">test_setattr</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.test_setattr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.test_setattr" title="Permalink to this definition"></a></dt>
<dd><p>Test the simple setattr provided by building menus.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestBuildingMenu.test_submenu">
<code class="sig-name descname">test_submenu</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestBuildingMenu.test_submenu"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestBuildingMenu.test_submenu" title="Permalink to this definition"></a></dt>
<dd><p>Test to add sub-menus.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestChargen">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestChargen</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestChargen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestChargen" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestChargen.test_charcreate">
<code class="sig-name descname">test_charcreate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestChargen.test_charcreate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestChargen.test_charcreate" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestChargen.test_ooclook">
<code class="sig-name descname">test_ooclook</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestChargen.test_ooclook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestChargen.test_ooclook" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestClothingCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestClothingCmd</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestClothingCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestClothingCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestClothingCmd.test_clothingcommands">
<code class="sig-name descname">test_clothingcommands</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestClothingCmd.test_clothingcommands"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestClothingCmd.test_clothingcommands" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestClothingFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestClothingFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestClothingFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestClothingFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestClothingFunc.test_clothingfunctions">
<code class="sig-name descname">test_clothingfunctions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestClothingFunc.test_clothingfunctions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestClothingFunc.test_clothingfunctions" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestColorMarkup">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestColorMarkup</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestColorMarkup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestColorMarkup" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<p>Note: Normally this would be tested by importing the ansi parser and run
the mappings through it. This is not possible since the ansi module creates
its mapping at the module/class level; since the ansi module is used by so
many other modules it appears that trying to overload
settings to test it causes issues with unrelated tests.</p>
<dl class="method">
<dt id="evennia.contrib.tests.TestColorMarkup.test_curly_markup">
<code class="sig-name descname">test_curly_markup</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestColorMarkup.test_curly_markup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestColorMarkup.test_curly_markup" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestColorMarkup.test_mux_markup">
<code class="sig-name descname">test_mux_markup</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestColorMarkup.test_mux_markup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestColorMarkup.test_mux_markup" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestCustomGameTime">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestCustomGameTime</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.test_custom_gametime">
<code class="sig-name descname">test_custom_gametime</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.test_custom_gametime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.test_custom_gametime" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.test_gametime_to_realtime">
<code class="sig-name descname">test_gametime_to_realtime</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.test_gametime_to_realtime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.test_gametime_to_realtime" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.test_real_seconds_until">
<code class="sig-name descname">test_real_seconds_until</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.test_real_seconds_until"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.test_real_seconds_until" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.test_realtime_to_gametime">
<code class="sig-name descname">test_realtime_to_gametime</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.test_realtime_to_gametime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.test_realtime_to_gametime" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.test_schedule">
<code class="sig-name descname">test_schedule</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.test_schedule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.test_schedule" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestCustomGameTime.test_time_to_tuple">
<code class="sig-name descname">test_time_to_tuple</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestCustomGameTime.test_time_to_tuple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestCustomGameTime.test_time_to_tuple" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestDice">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestDice</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestDice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestDice" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestDice.test_cmddice">
<code class="sig-name descname">test_cmddice</code><span class="sig-paren">(</span><em class="sig-param">mocked_randint</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestDice.test_cmddice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestDice.test_cmddice" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestDice.test_roll_dice">
<code class="sig-name descname">test_roll_dice</code><span class="sig-paren">(</span><em class="sig-param">mocked_randint</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestDice.test_roll_dice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestDice.test_roll_dice" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestEmailLogin">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestEmailLogin</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestEmailLogin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestEmailLogin" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestEmailLogin.test_connect">
<code class="sig-name descname">test_connect</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestEmailLogin.test_connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestEmailLogin.test_connect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestEmailLogin.test_quit">
<code class="sig-name descname">test_quit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestEmailLogin.test_quit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestEmailLogin.test_quit" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestEmailLogin.test_unconnectedhelp">
<code class="sig-name descname">test_unconnectedhelp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestEmailLogin.test_unconnectedhelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestEmailLogin.test_unconnectedhelp" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestEmailLogin.test_unconnectedlook">
<code class="sig-name descname">test_unconnectedlook</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestEmailLogin.test_unconnectedlook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestEmailLogin.test_unconnectedlook" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestExtendedRoom">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestExtendedRoom</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="attribute">
<dt id="evennia.contrib.tests.TestExtendedRoom.DETAIL_DESC">
<code class="sig-name descname">DETAIL_DESC</code><em class="property"> = 'A test detail.'</em><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.DETAIL_DESC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.TestExtendedRoom.OLD_DESC">
<code class="sig-name descname">OLD_DESC</code><em class="property"> = 'Old description.'</em><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.OLD_DESC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.TestExtendedRoom.SPRING_DESC">
<code class="sig-name descname">SPRING_DESC</code><em class="property"> = 'A spring description.'</em><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.SPRING_DESC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tests.TestExtendedRoom.room_typeclass">
<code class="sig-name descname">room_typeclass</code><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.room_typeclass" title="Permalink to this definition"></a></dt>
<dd><p>alias of <a class="reference internal" href="#evennia.contrib.extended_room.ExtendedRoom" title="evennia.contrib.extended_room.ExtendedRoom"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.extended_room.ExtendedRoom</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestExtendedRoom.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestExtendedRoom.test_cmdextendedlook">
<code class="sig-name descname">test_cmdextendedlook</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom.test_cmdextendedlook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.test_cmdextendedlook" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestExtendedRoom.test_cmdgametime">
<code class="sig-name descname">test_cmdgametime</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom.test_cmdgametime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.test_cmdgametime" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestExtendedRoom.test_cmdsetdetail">
<code class="sig-name descname">test_cmdsetdetail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom.test_cmdsetdetail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.test_cmdsetdetail" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestExtendedRoom.test_return_appearance">
<code class="sig-name descname">test_return_appearance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom.test_return_appearance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.test_return_appearance" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestExtendedRoom.test_return_detail">
<code class="sig-name descname">test_return_detail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestExtendedRoom.test_return_detail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestExtendedRoom.test_return_detail" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestFieldFillFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestFieldFillFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestFieldFillFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestFieldFillFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestFieldFillFunc.test_field_functions">
<code class="sig-name descname">test_field_functions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestFieldFillFunc.test_field_functions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestFieldFillFunc.test_field_functions" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestGenderSub">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestGenderSub</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestGenderSub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestGenderSub" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestGenderSub.test_gendercharacter">
<code class="sig-name descname">test_gendercharacter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestGenderSub.test_gendercharacter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestGenderSub.test_gendercharacter" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestGenderSub.test_setgender">
<code class="sig-name descname">test_setgender</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestGenderSub.test_setgender"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestGenderSub.test_setgender" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestHealthBar">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestHealthBar</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestHealthBar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestHealthBar" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestHealthBar.test_healthbar">
<code class="sig-name descname">test_healthbar</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestHealthBar.test_healthbar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestHealthBar.test_healthbar" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestLanguage">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestLanguage</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestLanguage.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestLanguage.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestLanguage.test_available_languages">
<code class="sig-name descname">test_available_languages</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage.test_available_languages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage.test_available_languages" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestLanguage.test_faulty_language">
<code class="sig-name descname">test_faulty_language</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage.test_faulty_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage.test_faulty_language" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestLanguage.test_obfuscate_language">
<code class="sig-name descname">test_obfuscate_language</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage.test_obfuscate_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage.test_obfuscate_language" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestLanguage.test_obfuscate_whisper">
<code class="sig-name descname">test_obfuscate_whisper</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestLanguage.test_obfuscate_whisper"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestLanguage.test_obfuscate_whisper" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestMail">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestMail</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMail" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestMail.test_mail">
<code class="sig-name descname">test_mail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMail.test_mail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMail.test_mail" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestMapBuilder">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestMapBuilder</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMapBuilder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMapBuilder" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestMapBuilder.test_cmdmapbuilder">
<code class="sig-name descname">test_cmdmapbuilder</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMapBuilder.test_cmdmapbuilder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMapBuilder.test_cmdmapbuilder" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestMenuLogin">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestMenuLogin</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMenuLogin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMenuLogin" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestMenuLogin.test_cmdunloggedlook">
<code class="sig-name descname">test_cmdunloggedlook</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMenuLogin.test_cmdunloggedlook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMenuLogin.test_cmdunloggedlook" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestMultidescer">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestMultidescer</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMultidescer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMultidescer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestMultidescer.test_cmdmultidesc">
<code class="sig-name descname">test_cmdmultidesc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestMultidescer.test_cmdmultidesc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestMultidescer.test_cmdmultidesc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestPuzzles">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestPuzzles</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._arm">
<code class="sig-name descname">_arm</code><span class="sig-paren">(</span><em class="sig-param">recipe_dbref</em>, <em class="sig-param">name</em>, <em class="sig-param">parts</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._arm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._arm" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._assert_msg_matched">
<code class="sig-name descname">_assert_msg_matched</code><span class="sig-paren">(</span><em class="sig-param">msg</em>, <em class="sig-param">regexs</em>, <em class="sig-param">re_flags=0</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._assert_msg_matched"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._assert_msg_matched" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._assert_no_recipes">
<code class="sig-name descname">_assert_no_recipes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._assert_no_recipes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._assert_no_recipes" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._assert_recipe">
<code class="sig-name descname">_assert_recipe</code><span class="sig-paren">(</span><em class="sig-param">name</em>, <em class="sig-param">parts</em>, <em class="sig-param">results</em>, <em class="sig-param">and_destroy_it=True</em>, <em class="sig-param">expected_count=1</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._assert_recipe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._assert_recipe" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._check_room_contents">
<code class="sig-name descname">_check_room_contents</code><span class="sig-paren">(</span><em class="sig-param">expected</em>, <em class="sig-param">check_test_tags=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._check_room_contents"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._check_room_contents" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._good_recipe">
<code class="sig-name descname">_good_recipe</code><span class="sig-paren">(</span><em class="sig-param">name</em>, <em class="sig-param">parts</em>, <em class="sig-param">results</em>, <em class="sig-param">and_destroy_it=True</em>, <em class="sig-param">expected_count=1</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._good_recipe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._good_recipe" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles._use">
<code class="sig-name descname">_use</code><span class="sig-paren">(</span><em class="sig-param">cmdstr</em>, <em class="sig-param">expmsg</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles._use"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles._use" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_cmd_armpuzzle">
<code class="sig-name descname">test_cmd_armpuzzle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_cmd_armpuzzle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_cmd_armpuzzle" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_cmd_puzzle">
<code class="sig-name descname">test_cmd_puzzle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_cmd_puzzle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_cmd_puzzle" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_cmd_use">
<code class="sig-name descname">test_cmd_use</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_cmd_use"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_cmd_use" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_cmdset_puzzle">
<code class="sig-name descname">test_cmdset_puzzle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_cmdset_puzzle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_cmdset_puzzle" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_e2e">
<code class="sig-name descname">test_e2e</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_e2e"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_e2e" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_e2e_accumulative">
<code class="sig-name descname">test_e2e_accumulative</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_e2e_accumulative"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_e2e_accumulative" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_e2e_interchangeable_parts_and_results">
<code class="sig-name descname">test_e2e_interchangeable_parts_and_results</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_e2e_interchangeable_parts_and_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_e2e_interchangeable_parts_and_results" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_lspuzzlerecipes_lsarmedpuzzles">
<code class="sig-name descname">test_lspuzzlerecipes_lsarmedpuzzles</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_lspuzzlerecipes_lsarmedpuzzles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_lspuzzlerecipes_lsarmedpuzzles" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_puzzleedit">
<code class="sig-name descname">test_puzzleedit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_puzzleedit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_puzzleedit" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestPuzzles.test_puzzleedit_add_remove_parts_results">
<code class="sig-name descname">test_puzzleedit_add_remove_parts_results</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestPuzzles.test_puzzleedit_add_remove_parts_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestPuzzles.test_puzzleedit_add_remove_parts_results" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestRPSystem">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestRPSystem</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="attribute">
<dt id="evennia.contrib.tests.TestRPSystem.maxDiff">
<code class="sig-name descname">maxDiff</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.maxDiff" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.parse_sdescs_and_recogs">
<code class="sig-name descname">parse_sdescs_and_recogs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.parse_sdescs_and_recogs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.parse_sdescs_and_recogs" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.test_ordered_permutation_regex">
<code class="sig-name descname">test_ordered_permutation_regex</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.test_ordered_permutation_regex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.test_ordered_permutation_regex" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.test_parse_language">
<code class="sig-name descname">test_parse_language</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.test_parse_language"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.test_parse_language" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.test_recog_handler">
<code class="sig-name descname">test_recog_handler</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.test_recog_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.test_recog_handler" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.test_rpsearch">
<code class="sig-name descname">test_rpsearch</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.test_rpsearch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.test_rpsearch" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.test_sdesc_handler">
<code class="sig-name descname">test_sdesc_handler</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.test_sdesc_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.test_sdesc_handler" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystem.test_send_emote">
<code class="sig-name descname">test_send_emote</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystem.test_send_emote"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystem.test_send_emote" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestRPSystemCommands">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestRPSystemCommands</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystemCommands"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystemCommands" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystemCommands.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystemCommands.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystemCommands.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestRPSystemCommands.test_commands">
<code class="sig-name descname">test_commands</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRPSystemCommands.test_commands"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRPSystemCommands.test_commands" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestRandomStringGenerator">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestRandomStringGenerator</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRandomStringGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRandomStringGenerator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestRandomStringGenerator.test_generate">
<code class="sig-name descname">test_generate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestRandomStringGenerator.test_generate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestRandomStringGenerator.test_generate" title="Permalink to this definition"></a></dt>
<dd><p>Generate and fail when exhausted.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestSimpleDoor">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestSimpleDoor</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestSimpleDoor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestSimpleDoor" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestSimpleDoor.test_cmdopen">
<code class="sig-name descname">test_cmdopen</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestSimpleDoor.test_cmdopen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestSimpleDoor.test_cmdopen" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestSlowExit">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestSlowExit</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestSlowExit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestSlowExit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestSlowExit.test_exit">
<code class="sig-name descname">test_exit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestSlowExit.test_exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestSlowExit.test_exit" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTalkingNPC">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTalkingNPC</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTalkingNPC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTalkingNPC" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTalkingNPC.test_talkingnpc">
<code class="sig-name descname">test_talkingnpc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTalkingNPC.test_talkingnpc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTalkingNPC.test_talkingnpc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTreeSelectFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTreeSelectFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTreeSelectFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTreeSelectFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTreeSelectFunc.test_tree_functions">
<code class="sig-name descname">test_tree_functions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTreeSelectFunc.test_tree_functions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTreeSelectFunc.test_tree_functions" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleBasicCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleBasicCmd</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleBasicCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleBasicCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleBasicCmd.test_turnbattlecmd">
<code class="sig-name descname">test_turnbattlecmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleBasicCmd.test_turnbattlecmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleBasicCmd.test_turnbattlecmd" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleBasicFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleBasicFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleBasicFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleBasicFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleBasicFunc.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleBasicFunc.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleBasicFunc.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleBasicFunc.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleBasicFunc.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleBasicFunc.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleBasicFunc.test_tbbasicfunc">
<code class="sig-name descname">test_tbbasicfunc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleBasicFunc.test_tbbasicfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleBasicFunc.test_tbbasicfunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleEquipCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleEquipCmd</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleEquipCmd.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipCmd.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipCmd.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleEquipCmd.test_turnbattleequipcmd">
<code class="sig-name descname">test_turnbattleequipcmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipCmd.test_turnbattleequipcmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipCmd.test_turnbattleequipcmd" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleEquipFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleEquipFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleEquipFunc.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipFunc.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipFunc.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleEquipFunc.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipFunc.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipFunc.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleEquipFunc.test_tbequipfunc">
<code class="sig-name descname">test_tbequipfunc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleEquipFunc.test_tbequipfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleEquipFunc.test_tbequipfunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleItemsCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleItemsCmd</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleItemsCmd.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsCmd.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsCmd.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleItemsCmd.test_turnbattleitemcmd">
<code class="sig-name descname">test_turnbattleitemcmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsCmd.test_turnbattleitemcmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsCmd.test_turnbattleitemcmd" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleItemsFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleItemsFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleItemsFunc.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsFunc.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsFunc.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleItemsFunc.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsFunc.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsFunc.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleItemsFunc.test_tbitemsfunc">
<code class="sig-name descname">test_tbitemsfunc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleItemsFunc.test_tbitemsfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleItemsFunc.test_tbitemsfunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleMagicCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleMagicCmd</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleMagicCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleMagicCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleMagicCmd.test_turnbattlemagiccmd">
<code class="sig-name descname">test_turnbattlemagiccmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleMagicCmd.test_turnbattlemagiccmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleMagicCmd.test_turnbattlemagiccmd" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleMagicFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleMagicFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleMagicFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleMagicFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleMagicFunc.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleMagicFunc.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleMagicFunc.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleMagicFunc.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleMagicFunc.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleMagicFunc.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleMagicFunc.test_tbbasicfunc">
<code class="sig-name descname">test_tbbasicfunc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleMagicFunc.test_tbbasicfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleMagicFunc.test_tbbasicfunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleRangeCmd">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleRangeCmd</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleRangeCmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleRangeCmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleRangeCmd.test_turnbattlerangecmd">
<code class="sig-name descname">test_turnbattlerangecmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleRangeCmd.test_turnbattlerangecmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleRangeCmd.test_turnbattlerangecmd" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTurnBattleRangeFunc">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTurnBattleRangeFunc</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleRangeFunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleRangeFunc" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleRangeFunc.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleRangeFunc.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleRangeFunc.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleRangeFunc.tearDown">
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleRangeFunc.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleRangeFunc.tearDown" title="Permalink to this definition"></a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTurnBattleRangeFunc.test_tbrangefunc">
<code class="sig-name descname">test_tbrangefunc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTurnBattleRangeFunc.test_tbrangefunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTurnBattleRangeFunc.test_tbrangefunc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTutorialWorldMob">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTutorialWorldMob</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldMob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldMob" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldMob.test_mob">
<code class="sig-name descname">test_mob</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldMob.test_mob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldMob.test_mob" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTutorialWorldObjects</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.trial._asynctest.TestCase</span></code>, <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_climbable">
<code class="sig-name descname">test_climbable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_climbable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_climbable" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_crumblingwall">
<code class="sig-name descname">test_crumblingwall</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_crumblingwall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_crumblingwall" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_lightsource">
<code class="sig-name descname">test_lightsource</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_lightsource"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_lightsource" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_obelisk">
<code class="sig-name descname">test_obelisk</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_obelisk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_obelisk" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_readable">
<code class="sig-name descname">test_readable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_readable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_readable" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_tutorialobj">
<code class="sig-name descname">test_tutorialobj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_tutorialobj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_tutorialobj" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_weapon">
<code class="sig-name descname">test_weapon</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_weapon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_weapon" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldObjects.test_weaponrack">
<code class="sig-name descname">test_weaponrack</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldObjects.test_weaponrack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldObjects.test_weaponrack" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestTutorialWorldRooms</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_bridgeroom">
<code class="sig-name descname">test_bridgeroom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_bridgeroom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_bridgeroom" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_cmdtutorial">
<code class="sig-name descname">test_cmdtutorial</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_cmdtutorial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_cmdtutorial" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_darkroom">
<code class="sig-name descname">test_darkroom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_darkroom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_darkroom" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_introroom">
<code class="sig-name descname">test_introroom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_introroom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_introroom" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_outroroom">
<code class="sig-name descname">test_outroroom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_outroroom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_outroroom" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_teleportroom">
<code class="sig-name descname">test_teleportroom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_teleportroom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_teleportroom" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestTutorialWorldRooms.test_weatherroom">
<code class="sig-name descname">test_weatherroom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestTutorialWorldRooms.test_weatherroom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestTutorialWorldRooms.test_weatherroom" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestUnixCommand">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestUnixCommand</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestUnixCommand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestUnixCommand" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.default.html#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestUnixCommand.test_failure">
<code class="sig-name descname">test_failure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestUnixCommand.test_failure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestUnixCommand.test_failure" title="Permalink to this definition"></a></dt>
<dd><p>If not provided with the right info, should fail.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestUnixCommand.test_success">
<code class="sig-name descname">test_success</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestUnixCommand.test_success"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestUnixCommand.test_success" title="Permalink to this definition"></a></dt>
<dd><p>See the command parsing succeed.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.tests.TestWilderness">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">TestWilderness</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.get_wilderness_script">
<code class="sig-name descname">get_wilderness_script</code><span class="sig-paren">(</span><em class="sig-param">name='default'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.get_wilderness_script"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.get_wilderness_script" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.setUp">
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.setUp" title="Permalink to this definition"></a></dt>
<dd><p>Sets up testing environment</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_create_wilderness_custom_name">
<code class="sig-name descname">test_create_wilderness_custom_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_create_wilderness_custom_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_create_wilderness_custom_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_create_wilderness_default_name">
<code class="sig-name descname">test_create_wilderness_default_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_create_wilderness_default_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_create_wilderness_default_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_enter_wilderness">
<code class="sig-name descname">test_enter_wilderness</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_enter_wilderness"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_enter_wilderness" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_enter_wilderness_custom_coordinates">
<code class="sig-name descname">test_enter_wilderness_custom_coordinates</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_enter_wilderness_custom_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_enter_wilderness_custom_coordinates" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_enter_wilderness_custom_name">
<code class="sig-name descname">test_enter_wilderness_custom_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_enter_wilderness_custom_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_enter_wilderness_custom_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_get_new_coordinates">
<code class="sig-name descname">test_get_new_coordinates</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_get_new_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_get_new_coordinates" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_room_creation">
<code class="sig-name descname">test_room_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_room_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_room_creation" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tests.TestWilderness.test_wilderness_correct_exits">
<code class="sig-name descname">test_wilderness_correct_exits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#TestWilderness.test_wilderness_correct_exits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests.TestWilderness.test_wilderness_correct_exits" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tests._cancellable_mockdelay">
<code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">_cancellable_mockdelay</code><span class="sig-paren">(</span><em class="sig-param">time</em>, <em class="sig-param">callback</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#_cancellable_mockdelay"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests._cancellable_mockdelay" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="evennia.contrib.tests._testcallback">
<code class="sig-prename descclassname">evennia.contrib.tests.</code><code class="sig-name descname">_testcallback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tests.html#_testcallback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tests._testcallback" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-evennia.contrib.traits">
<span id="evennia-contrib-traits-module"></span><h2>evennia.contrib.traits module<a class="headerlink" href="#module-evennia.contrib.traits" title="Permalink to this headline"></a></h2>
<p>Traits</p>
<p>Whitenoise 2014, Ainneve contributors,
Griatch 2020</p>
<p>A <cite>Trait</cite> represents a modifiable property on (usually) a Character. They can
be used to represent everything from attributes (str, agi etc) to skills
(hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc.</p>
<p>Traits use Evennia Attributes under the hood, making them persistent (they survive
a server reload/reboot).</p>
<p>## Adding Traits to a typeclass</p>
<p>To access and manipulate traits on an object, its Typeclass needs to have a
<cite>TraitHandler</cite> assigned it. Usually, the handler is made available as <cite>.traits</cite>
(in the same way as <cite>.tags</cite> or <cite>.attributes</cite>).</p>
<p>Heres an example for adding the TraitHandler to the base Object class:</p>
<blockquote>
<div><p><a href="#id84"><span class="problematic" id="id85">``</span></a><a href="#id86"><span class="problematic" id="id87">`</span></a>python
# mygame/typeclasses/objects.py</p>
<p>from evennia import DefaultObject
from evennia.utils import lazy_property
from evennia.contrib.traits import TraitHandler</p>
<p># …</p>
<dl>
<dt>class Object(DefaultObject):</dt><dd><p>
&#64;lazy_property
def traits(self):</p>
<blockquote>
<div><p># this adds the handler as .traits
return TraitHandler(self)</p>
</div></blockquote>
</dd>
</dl>
<p><a href="#id88"><span class="problematic" id="id89">``</span></a><a href="#id90"><span class="problematic" id="id91">`</span></a></p>
</div></blockquote>
<p>After a reload you can now try adding some example traits:</p>
<p>## Using traits</p>
<p>A trait is added to the traithandler, after which one can access it
as a property on the handler (similarly to how you can do .db.attrname for Attributes
in Evennia).</p>
<p><a href="#id92"><span class="problematic" id="id93">``</span></a><a href="#id94"><span class="problematic" id="id95">`</span></a>python
# this is an example using the “static” trait, described below
&gt;&gt;&gt; obj.traits.add(“hunting”, “Hunting Skill”, trait_type=”static”, base=4)
&gt;&gt;&gt; obj.traits.hunting.value
4
&gt;&gt;&gt; obj.traits.hunting.value += 5
&gt;&gt;&gt; obj.traits.hunting.value
9
&gt;&gt;&gt; obj.traits.add(“hp”, “Health”, trait_type=”gauge”, min=0, max=100)
&gt;&gt;&gt; obj.traits.hp.value
100
&gt;&gt;&gt; obj.traits.hp -= 200
&gt;&gt;&gt; obj.traits.hp.value
0
&gt;&gt;&gt; obj.traits.hp.reset()
&gt;&gt;&gt; obj.traits.hp.value
100
# you can also access property with getitem
&gt;&gt;&gt; obj.traits.hp[“value”]
100
# you can store arbitrary data persistently as well
&gt;&gt;&gt; obj.traits.hp.effect = “poisoned!”
&gt;&gt;&gt; obj.traits.hp.effect
“poisoned!”</p>
<p><a href="#id96"><span class="problematic" id="id97">``</span></a><a href="#id98"><span class="problematic" id="id99">`</span></a></p>
<p>When adding the trait, you supply the name of the property (<cite>hunting</cite>) along
with a more human-friendly name (“Hunting Skill”). The latter will show if you
print the trait etc. The <cite>trait_type</cite> is important, this specifies which type
of trait this is.</p>
<p>## Trait types</p>
<p>All default traits have a read-only <cite>.value</cite> property that shows the relevant or
current value of the trait. Exactly what this means depends on the type of trait.</p>
<p>Traits can also be combined to do arithmetic with their .value, if both have a
compatible type.</p>
<p><a href="#id100"><span class="problematic" id="id101">``</span></a><a href="#id102"><span class="problematic" id="id103">`</span></a>python
&gt;&gt;&gt; trait1 + trait2
54
&gt;&gt;&gt; trait1.value
3
&gt;&gt;&gt; trait1 + 2
&gt;&gt;&gt; trait1.value
5</p>
<p><a href="#id104"><span class="problematic" id="id105">``</span></a><a href="#id106"><span class="problematic" id="id107">`</span></a></p>
<p>Two numerical traits can also be compared (bigger-than etc), which is useful in
all sorts of rule-resolution.</p>
<p><a href="#id108"><span class="problematic" id="id109">``</span></a><a href="#id110"><span class="problematic" id="id111">`</span></a>python</p>
<dl class="simple">
<dt>if trait1 &gt; trait2:</dt><dd><p># do stuff</p>
</dd>
</dl>
<p><a href="#id112"><span class="problematic" id="id113">``</span></a>`
## Static trait</p>
<p><cite>value = base + mod</cite></p>
<p>The static trait has a <cite>base</cite> value and an optional <cite>mod</cite>-ifier. A typical use
of a static trait would be a Strength stat or Skill value. That is, something
that varies slowly or not at all, and which may be modified in-place.</p>
<p><a href="#id114"><span class="problematic" id="id115">``</span></a><a href="#id116"><span class="problematic" id="id117">`</span></a>python
&gt;&gt;&gt; obj.traits.add(“str”, “Strength”, trait_type=”static”, base=10, mod=2)
&gt;&gt;&gt; obj.traits.mytrait.value
12 # base + mod
&gt;&gt;&gt; obj.traits.mytrait.base += 2
&gt;&gt;&gt; obj.traits.mytrait.mod += 1
&gt;&gt;&gt; obj.traits.mytrait.value
15
&gt;&gt;&gt; obj.traits.mytrait.mod = 0
&gt;&gt;&gt; obj.traits.mytrait.value
12</p>
<p><a href="#id118"><span class="problematic" id="id119">``</span></a><a href="#id120"><span class="problematic" id="id121">`</span></a></p>
<p>### Counter</p>
<blockquote>
<div><dl class="simple">
<dt>min/unset base base+mod max/unset</dt><dd><dl class="simple">
<dt><a href="#id210"><span class="problematic" id="id211">|--------------|</span></a>——–<a href="#id212"><span class="problematic" id="id213">|---------X--------X------------|</span></a></dt><dd><dl class="simple">
<dt>current value</dt><dd><p>= current
+ mod</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<p>A counter describes a value that can move from a base. The <cite>current</cite> property
is the thing usually modified. It starts at the <cite>base</cite>. One can also add a modifier,
which will both be added to the base and to current (forming .value).
The min/max of the range are optional, a boundary set to None will remove it.</p>
<p><a href="#id122"><span class="problematic" id="id123">``</span></a><a href="#id124"><span class="problematic" id="id125">`</span></a>python
&gt;&gt;&gt; obj.traits.add(“hunting”, “Hunting Skill”, trait_type=”counter”,</p>
<blockquote>
<div><p>base=10, mod=1, min=0, max=100)</p>
</div></blockquote>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">11 # current starts at base + mod</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span> <span class="o">+=</span> <span class="mi">10</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">21</span>
<span class="go"># reset back to base+mod by deleting current</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">del</span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">11</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">max</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># removing upper bound</span>
</pre></div>
</div>
<p><a href="#id126"><span class="problematic" id="id127">``</span></a><a href="#id128"><span class="problematic" id="id129">`</span></a></p>
<p>Counters have some extra properties:</p>
<p><cite>descs</cite> is a dict {upper_bound:text_description}. This allows for easily
storing a more human-friendly description of the current value in the
interval. Here is an example for skill values between 0 and 10:</p>
<blockquote>
<div><p>{0: “unskilled”, 1: “neophyte”, 5: “trained”, 7: “expert”, 9: “master”}</p>
</div></blockquote>
<p>The keys must be supplied from smallest to largest. Any values below the lowest and above the
highest description will be considered to be included in the closest description slot.
By calling <cite>.desc()</cite> on the Counter, will you get the text matching the current <cite>value</cite>
value.</p>
<p><a href="#id130"><span class="problematic" id="id131">``</span></a><a href="#id132"><span class="problematic" id="id133">`</span></a>python
# (could also have passed descs= to traits.add())
&gt;&gt;&gt; obj.traits.hunting.descs = {</p>
<blockquote>
<div><p>0: “unskilled”, 10: “neophyte”, 50: “trained”, 70: “expert”, 90: “master”}</p>
</div></blockquote>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">11</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">desc</span><span class="p">()</span>
<span class="go">&quot;neophyte&quot;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span> <span class="o">+=</span> <span class="mi">60</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">71</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">desc</span><span class="p">()</span>
<span class="go">&quot;expert&quot;</span>
</pre></div>
</div>
<p><a href="#id134"><span class="problematic" id="id135">``</span></a><a href="#id136"><span class="problematic" id="id137">`</span></a></p>
<p>#### .rate</p>
<p>The <cite>rate</cite> property defaults to 0. If set to a value different from 0, it
allows the trait to change value dynamically. This could be used for example
for an attribute that was temporarily lowered but will gradually (or abruptly)
recover after a certain time. The rate is given as change of the <cite>current</cite>
per-second, and the .value will still be restrained by min/max boundaries, if
those are set.</p>
<p>It is also possible to set a “.ratetarget”, for the auto-change to stop at
(rather than at the min/max boundaries). This allows the value to return to
a previous value.</p>
<p><a href="#id138"><span class="problematic" id="id139">``</span></a><a href="#id140"><span class="problematic" id="id141">`</span></a>python</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">71</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">ratetarget</span> <span class="o">=</span> <span class="mi">71</span>
<span class="go"># debuff hunting for some reason</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span> <span class="o">-=</span> <span class="mi">30</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">41</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">1</span> <span class="c1"># 1/s increase</span>
<span class="go"># Waiting 5s</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">46</span>
<span class="go"># Waiting 8s</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">54</span>
<span class="go"># Waiting 100s</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
<span class="go">71 # we have stopped at the ratetarget</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># disable auto-change</span>
</pre></div>
</div>
<p><a href="#id142"><span class="problematic" id="id143">``</span></a>`
Note that if rate is a non-integer, the resulting .value (at least until it
reaches the boundary) will likely also come out a float. If you expect an
integer, you must run run int() on the result yourself.</p>
<p>#### .percentage()</p>
<p>If both min and max are defined, the <cite>.percentage()</cite> method of the trait will
return the value as a percentage.</p>
<p><a href="#id144"><span class="problematic" id="id145">``</span></a><a href="#id146"><span class="problematic" id="id147">`</span></a>python
&gt;&gt;&gt; obj.traits.hunting.percentage()
“71.0%”</p>
<p><a href="#id148"><span class="problematic" id="id149">``</span></a><a href="#id150"><span class="problematic" id="id151">`</span></a></p>
<p>### Gauge</p>
<p>This emulates a [fuel-] gauge that empties from a base+mod value.</p>
<blockquote>
<div><dl>
<dt>min/0 max=base+mod</dt><dd><dl>
<dt><a href="#id214"><span class="problematic" id="id215">|-----------------------X---------------------------|</span></a></dt><dd><blockquote>
<div><p>value</p>
</div></blockquote>
<p>= current</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<p>The current value will start from a full gauge. The .max property is
read-only and is set by .base + .mod. So contrary to a Counter, the modifier
only applies to the max value of the gauge and not the current value. The
minimum bound defaults to 0. This trait is useful for showing resources that
can deplete, like health, stamina and the like.</p>
<p><a href="#id152"><span class="problematic" id="id153">``</span></a><a href="#id154"><span class="problematic" id="id155">`</span></a>python
&gt;&gt;&gt; obj.traits.add(“hp”, “Health”, trait_type=”gauge”, base=100)
&gt;&gt;&gt; obj.traits.hp.value # (or .current)
100
&gt;&gt;&gt; obj.traits.hp.mod = 10
&gt;&gt;&gt; obj.traits.hp.value
110
&gt;&gt;&gt; obj.traits.hp.current -= 30
&gt;&gt;&gt; obj.traits.hp.value
80</p>
<p><a href="#id156"><span class="problematic" id="id157">``</span></a><a href="#id158"><span class="problematic" id="id159">`</span></a></p>
<p>Same as Counters, Gauges can also have <cite>descs</cite> to describe the interval and can also
have <cite>rate</cite> and <cite>ratetarget</cite> to auto-update the value. The rate is particularly useful
for gauges, for everything from poison slowly draining your health, to resting gradually
increasing it. You can also use the <cite>.percentage()</cite> function to show the current value
as a percentage.</p>
<p>### Trait</p>
<p>A single value of any type.</p>
<p>This is the base Trait, meant to inherit from if you want to make your own
trait-types (see below). Its .value can be anything (that can be stored in an Attribute)
and if its a integer/float you can do arithmetic with it, but otherwise it
acts just like a glorified Attribute.</p>
<p><a href="#id160"><span class="problematic" id="id161">``</span></a><a href="#id162"><span class="problematic" id="id163">`</span></a>python
&gt;&gt;&gt; obj.traits.add(“mytrait”, “My Trait”, trait_type=”trait”, value=30)
&gt;&gt;&gt; obj.traits.mytrait.value
30
&gt;&gt;&gt; obj.traits.mytrait.value = “stringvalue”
&gt;&gt;&gt; obj.traits.mytrait.value
“stringvalue”</p>
<p><a href="#id164"><span class="problematic" id="id165">``</span></a><a href="#id166"><span class="problematic" id="id167">`</span></a></p>
<p>## Expanding with your own Traits</p>
<p>A Trait is a class inhering from <cite>evennia.contrib.traits.Trait</cite> (or
from one of the existing Trait classes).</p>
<p><a href="#id168"><span class="problematic" id="id169">``</span></a><a href="#id170"><span class="problematic" id="id171">`</span></a>python
# in a file, say, mygame/world/traits.py</p>
<p>from evennia.contrib.traits import Trait</p>
<p>class RageTrait(Trait):</p>
<blockquote>
<div><p>trait_type = “rage”
default_keys = {</p>
<blockquote>
<div><p>“rage”: 0</p>
</div></blockquote>
<p>}</p>
</div></blockquote>
<p><a href="#id172"><span class="problematic" id="id173">``</span></a><a href="#id174"><span class="problematic" id="id175">`</span></a></p>
<p>Above is an example custom-trait-class “rage” that stores a property “rage” on
itself, with a default value of 0. This has all the
functionality of a Trait - for example, if you do del on the <cite>rage</cite> property, it will be
set back to its default (0). If you wanted to customize what it does, you
just add <cite>rage</cite> property get/setters/deleters on the class.</p>
<p>To add your custom RageTrait to Evennia, add the following to your settings file
(assuming your class is in mygame/world/traits.py):</p>
<blockquote>
<div><p>TRAIT_CLASS_PATHS = [“world.traits.RageTrait”]</p>
</div></blockquote>
<p>Reload the server and you should now be able to use your trait:</p>
<p><a href="#id176"><span class="problematic" id="id177">``</span></a><a href="#id178"><span class="problematic" id="id179">`</span></a>python
&gt;&gt;&gt; obj.traits.add(“mood”, “A dark mood”, rage=30)
&gt;&gt;&gt; obj.traits.mood.rage
30</p>
<p><a href="#id180"><span class="problematic" id="id181">``</span></a><a href="#id182"><span class="problematic" id="id183">`</span></a></p>
<dl class="class">
<dt id="evennia.contrib.traits.CounterTrait">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">CounterTrait</code><span class="sig-paren">(</span><em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.Trait" title="evennia.contrib.traits.Trait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.Trait</span></code></a></p>
<p>Counter Trait.</p>
<p>This includes modifications and min/max limits as well as the notion of a
current value. The value can also be reset to the base value.</p>
<dl class="simple">
<dt>min/unset base base+mod max/unset</dt><dd><dl class="simple">
<dt><a href="#id216"><span class="problematic" id="id217">|--------------|</span></a>——–<a href="#id218"><span class="problematic" id="id219">|---------X--------X------------|</span></a></dt><dd><dl class="simple">
<dt>current value</dt><dd><p>= current
+ mod</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<ul>
<li><p>value = current + mod, starts at base + mod</p></li>
<li><p>if min or max is None, there is no upper/lower bound (default)</p></li>
<li><p>if max is set to “base”, max will be equal ot base+mod</p></li>
<li><p>descs are used to optionally describe each value interval.
The desc of the current <cite>value</cite> value can then be retrieved
with .desc(). The property is set as {lower_bound_inclusive:desc}
and should be given smallest-to-biggest. For example, for
a skill rating between 0 and 10:</p>
<blockquote>
<div><dl class="simple">
<dt>{0: “unskilled”,</dt><dd><p>1: “neophyte”,
5: “traited”,
7: “expert”,
9: “master”}</p>
</dd>
</dl>
</div></blockquote>
</li>
<li><p>rate/ratetarget are optional settings to include a rate-of-change
of the current value. This is calculated on-demand and allows for
describing a value that is gradually growing smaller/bigger. The
increase will stop when either reaching a boundary (if set) or
ratetarget. Setting the rate to 0 (default) stops any change.</p></li>
</ul>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait._check_and_start_timer">
<code class="sig-name descname">_check_and_start_timer</code><span class="sig-paren">(</span><em class="sig-param">value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait._check_and_start_timer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait._check_and_start_timer" title="Permalink to this definition"></a></dt>
<dd><p>Start timer if we are not at a boundary.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait._enforce_boundaries">
<code class="sig-name descname">_enforce_boundaries</code><span class="sig-paren">(</span><em class="sig-param">value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait._enforce_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait._enforce_boundaries" title="Permalink to this definition"></a></dt>
<dd><p>Ensures that incoming value falls within boundaries</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait._passed_ratetarget">
<code class="sig-name descname">_passed_ratetarget</code><span class="sig-paren">(</span><em class="sig-param">value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait._passed_ratetarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait._passed_ratetarget" title="Permalink to this definition"></a></dt>
<dd><p>Check if we passed the ratetarget in either direction.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait._stop_timer">
<code class="sig-name descname">_stop_timer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait._stop_timer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait._stop_timer" title="Permalink to this definition"></a></dt>
<dd><p>Stop rate-timer component.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait._update_current">
<code class="sig-name descname">_update_current</code><span class="sig-paren">(</span><em class="sig-param">current</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait._update_current"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait._update_current" title="Permalink to this definition"></a></dt>
<dd><p>Update current value by scaling with rate and time passed.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait._within_boundaries">
<code class="sig-name descname">_within_boundaries</code><span class="sig-paren">(</span><em class="sig-param">value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait._within_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait._within_boundaries" title="Permalink to this definition"></a></dt>
<dd><p>Check if given value is within boundaries</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.base">
<em class="property">property </em><code class="sig-name descname">base</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.base" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.current">
<em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.current" title="Permalink to this definition"></a></dt>
<dd><p>The <cite>current</cite> value of the <cite>Trait</cite>. This does not have .mod added.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.CounterTrait.default_keys">
<code class="sig-name descname">default_keys</code><em class="property"> = {'base': 0, 'descs': None, 'max': None, 'min': None, 'mod': 0, 'rate': 0, 'ratetarget': None}</em><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.default_keys" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.desc">
<code class="sig-name descname">desc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.desc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.desc" title="Permalink to this definition"></a></dt>
<dd><p>Retrieve descriptions of the current value, if available.</p>
<p>This must be a mapping {upper_bound_inclusive: text},
ordered from small to big. Any value above the highest
upper bound will be included as being in the highest bound.
rely on Python3.7+ dicts retaining ordering to let this
describe the interval.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>The description describing the <cite>value</cite> value.</dt><dd><p>If not found, returns the empty string.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>str</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.max">
<em class="property">property </em><code class="sig-name descname">max</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.max" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.min">
<em class="property">property </em><code class="sig-name descname">min</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.min" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.mod">
<em class="property">property </em><code class="sig-name descname">mod</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.mod" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.percent">
<code class="sig-name descname">percent</code><span class="sig-paren">(</span><em class="sig-param">formatting='{:3.1f}%'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.percent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.percent" title="Permalink to this definition"></a></dt>
<dd><p>Return the current value as a percentage.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>formatting</strong> (<em>str</em><em>, </em><em>optional</em>) Should contain a
format-tag which will receive the value. If
this is set to None, the raw float will be
returned.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Depending of if a <cite>formatting</cite> string</dt><dd><p>is supplied or not.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float or str</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.ratetarget">
<em class="property">property </em><code class="sig-name descname">ratetarget</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.ratetarget" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.reset">
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.reset" title="Permalink to this definition"></a></dt>
<dd><p>Resets <cite>current</cite> property equal to <cite>base</cite> value.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.CounterTrait.trait_type">
<code class="sig-name descname">trait_type</code><em class="property"> = 'counter'</em><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.trait_type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.validate_input">
<em class="property">static </em><code class="sig-name descname">validate_input</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.validate_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.validate_input" title="Permalink to this definition"></a></dt>
<dd><p>Add extra validation for descs</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.CounterTrait.value">
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.value" title="Permalink to this definition"></a></dt>
<dd><p>The value of the Trait (current + mod)</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.traits.GaugeTrait">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">GaugeTrait</code><span class="sig-paren">(</span><em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.CounterTrait" title="evennia.contrib.traits.CounterTrait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.CounterTrait</span></code></a></p>
<p>Gauge Trait.</p>
<p>This emulates a gauge-meter that empties from a base+mod value.</p>
<dl>
<dt>min/0 max=base+mod</dt><dd><dl>
<dt><a href="#id220"><span class="problematic" id="id221">|-----------------------X---------------------------|</span></a></dt><dd><blockquote>
<div><p>value</p>
</div></blockquote>
<p>= current</p>
</dd>
</dl>
</dd>
</dl>
<ul>
<li><p>min defaults to 0</p></li>
<li><p>max value is always base + mad</p></li>
<li><p>.max is an alias of .base</p></li>
<li><p>value = current and varies from min to max.</p></li>
<li><dl>
<dt>descs is a mapping {upper_bound_inclusive: desc}. These</dt><dd><p>are checked with .desc() and can be retrieve a text
description for a given current value.</p>
<p>For example, this could be used to describe health
values between 0 and 100:</p>
<blockquote>
<div><dl class="simple">
<dt>{0: “Dead”</dt><dd><p>10: “Badly hurt”,
30: “Bleeding”,
50: “Hurting”,
90: “Healthy”}</p>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</li>
</ul>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait._enforce_boundaries">
<code class="sig-name descname">_enforce_boundaries</code><span class="sig-paren">(</span><em class="sig-param">value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait._enforce_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait._enforce_boundaries" title="Permalink to this definition"></a></dt>
<dd><p>Ensures that incoming value falls within traits range.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait._update_current">
<code class="sig-name descname">_update_current</code><span class="sig-paren">(</span><em class="sig-param">current</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait._update_current"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait._update_current" title="Permalink to this definition"></a></dt>
<dd><p>Update current value by scaling with rate and time passed.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.base">
<em class="property">property </em><code class="sig-name descname">base</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.base" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.current">
<em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.current" title="Permalink to this definition"></a></dt>
<dd><p>The <cite>current</cite> value of the gauge.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.GaugeTrait.default_keys">
<code class="sig-name descname">default_keys</code><em class="property"> = {'base': 0, 'descs': None, 'min': 0, 'mod': 0, 'rate': 0, 'ratetarget': None}</em><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.default_keys" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.max">
<em class="property">property </em><code class="sig-name descname">max</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.max" title="Permalink to this definition"></a></dt>
<dd><p>The max is always base + mod.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.min">
<em class="property">property </em><code class="sig-name descname">min</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.min" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.mod">
<em class="property">property </em><code class="sig-name descname">mod</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.mod" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.percent">
<code class="sig-name descname">percent</code><span class="sig-paren">(</span><em class="sig-param">formatting='{:3.1f}%'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait.percent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.percent" title="Permalink to this definition"></a></dt>
<dd><p>Return the current value as a percentage.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>formatting</strong> (<em>str</em><em>, </em><em>optional</em>) Should contain a
format-tag which will receive the value. If
this is set to None, the raw float will be
returned.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Depending of if a <cite>formatting</cite> string</dt><dd><p>is supplied or not.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>float or str</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.reset">
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.reset" title="Permalink to this definition"></a></dt>
<dd><p>Fills the gauge to its maximum allowed by base + mod</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.GaugeTrait.trait_type">
<code class="sig-name descname">trait_type</code><em class="property"> = 'gauge'</em><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.trait_type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.GaugeTrait.value">
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.value" title="Permalink to this definition"></a></dt>
<dd><p>The value of the trait</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.traits.MandatoryTraitKey">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">MandatoryTraitKey</code><a class="reference internal" href="../_modules/evennia/contrib/traits.html#MandatoryTraitKey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.MandatoryTraitKey" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This represents a required key that must be
supplied when a Trait is initialized. Its used
by Trait classes when defining their required keys.</p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.traits.StaticTrait">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">StaticTrait</code><span class="sig-paren">(</span><em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#StaticTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.StaticTrait" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.Trait" title="evennia.contrib.traits.Trait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.Trait</span></code></a></p>
<p>Static Trait. This is a single value with a modifier,
with no concept of a current value.</p>
<p>value = base + mod</p>
<dl class="attribute">
<dt id="evennia.contrib.traits.StaticTrait.default_keys">
<code class="sig-name descname">default_keys</code><em class="property"> = {'base': 0, 'mod': 0}</em><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.default_keys" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.StaticTrait.mod">
<em class="property">property </em><code class="sig-name descname">mod</code><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.mod" title="Permalink to this definition"></a></dt>
<dd><p>The traits modifier.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.StaticTrait.trait_type">
<code class="sig-name descname">trait_type</code><em class="property"> = 'static'</em><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.trait_type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.StaticTrait.value">
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.value" title="Permalink to this definition"></a></dt>
<dd><p>The value of the Trait</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.traits.Trait">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">Trait</code><span class="sig-paren">(</span><em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#Trait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.Trait" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Represents an object or Character trait. This simple base is just
storing anything in its value property, so its pretty much just a
different wrapper to an Attribute. It does no type-checking of what is
stored.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>See module docstring for configuration details.</p>
</div>
<p>value</p>
<dl class="method">
<dt id="evennia.contrib.traits.Trait.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#Trait.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.Trait.__init__" title="Permalink to this definition"></a></dt>
<dd><p>This both initializes and validates the Trait on creation. It must
raise exception if validation fails. The TraitHandler will call this
when the trait is furst added, to make sure it validates before
storing.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trait_data</strong> (<em>any</em>) Any pickle-able values to store with this trait.
This must contain any cls.default_keys that do not have a default
value in cls.data_default_values. Any extra kwargs will be made
available as extra properties on the Trait, assuming the class
variable <cite>allow_extra_properties</cite> is set.</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.traits.TraitException" title="evennia.contrib.traits.TraitException"><strong>TraitException</strong></a> If input-validation failed.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.Trait.allow_extra_properties">
<code class="sig-name descname">allow_extra_properties</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.traits.Trait.allow_extra_properties" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.Trait.default_keys">
<code class="sig-name descname">default_keys</code><em class="property"> = {'value': None}</em><a class="headerlink" href="#evennia.contrib.traits.Trait.default_keys" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.Trait.key">
<em class="property">property </em><code class="sig-name descname">key</code><a class="headerlink" href="#evennia.contrib.traits.Trait.key" title="Permalink to this definition"></a></dt>
<dd><p>Display name for the trait.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.Trait.name">
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#evennia.contrib.traits.Trait.name" title="Permalink to this definition"></a></dt>
<dd><p>Display name for the trait.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.traits.Trait.trait_type">
<code class="sig-name descname">trait_type</code><em class="property"> = 'trait'</em><a class="headerlink" href="#evennia.contrib.traits.Trait.trait_type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.Trait.validate_input">
<em class="property">static </em><code class="sig-name descname">validate_input</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#Trait.validate_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.Trait.validate_input" title="Permalink to this definition"></a></dt>
<dd><p>Validate input</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trait_data</strong> (<em>dict</em><em> or </em><em>_SaverDict</em>) Data to be used for
initialization of this trait.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Validated data, possibly complemented with default</dt><dd><p>values from default_keys.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>dict</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.traits.TraitException" title="evennia.contrib.traits.TraitException"><strong>TraitException</strong></a> If finding unset keys without a default.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.Trait.value">
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.Trait.value" title="Permalink to this definition"></a></dt>
<dd><p>Store a value</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.traits.TraitException">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">TraitException</code><span class="sig-paren">(</span><em class="sig-param">msg</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">RuntimeError</span></code></p>
<p>Base exception class raised by <cite>Trait</cite> objects.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>msg</strong> (<em>str</em>) informative error message</p>
</dd>
</dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitException.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">msg</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitException.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitException.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.traits.TraitHandler">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">TraitHandler</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">db_attribute_key='traits'</em>, <em class="sig-param">db_attribute_category='traits'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Factory class that instantiates Trait objects.</p>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">db_attribute_key='traits'</em>, <em class="sig-param">db_attribute_category='traits'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize the handler and set up its internal Attribute-based storage.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>obj</strong> (<em>Object</em>) Parent Object typeclass for this TraitHandler</p></li>
<li><p><strong>db_attribute_key</strong> (<em>str</em>) Name of the DB attribute for trait data storage</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler._get_trait_class">
<code class="sig-name descname">_get_trait_class</code><span class="sig-paren">(</span><em class="sig-param">trait_type=None</em>, <em class="sig-param">trait_key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler._get_trait_class"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler._get_trait_class" title="Permalink to this definition"></a></dt>
<dd><p>Helper to retrieve Trait class based on type (like “static”)
or trait-key (like “hp”).</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler.add">
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">trait_key</em>, <em class="sig-param">name=None</em>, <em class="sig-param">trait_type='static'</em>, <em class="sig-param">force=True</em>, <em class="sig-param">**trait_properties</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.add" title="Permalink to this definition"></a></dt>
<dd><p>Create a new Trait and add it to the handler.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trait_key</strong> (<em>str</em>) This is the name of the property that will be made
available on this handler (example hp).</p></li>
<li><p><strong>name</strong> (<em>str</em><em>, </em><em>optional</em>) Name of the Trait, like “Health”. If
not given, will use <cite>trait_key</cite> starting with a capital letter.</p></li>
<li><p><strong>trait_type</strong> (<em>str</em><em>, </em><em>optional</em>) One of static, counter or gauge.</p></li>
<li><p><strong>force_add</strong> (<em>bool</em>) If set, create a new Trait even if a Trait with
the same <cite>trait_key</cite> already exists.</p></li>
<li><p><strong>trait_properties</strong> (<em>dict</em>) These will all be use to initialize
the new trait. See the <cite>properties</cite> class variable on each
Trait class to see which are required.</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.traits.TraitException" title="evennia.contrib.traits.TraitException"><strong>TraitException</strong></a> If specifying invalid values for the given Trait,
the <cite>trait_type</cite> is not recognized, or an existing trait
already exists (and <cite>force</cite> is unset).</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler.all">
<em class="property">property </em><code class="sig-name descname">all</code><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.all" title="Permalink to this definition"></a></dt>
<dd><p>Get all trait keys in this handler.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>All Trait keys.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>list</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.clear" title="Permalink to this definition"></a></dt>
<dd><p>Remove all Traits from the handlers parent object.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler.get">
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">trait_key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.get" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trait_key</strong> (<em>str</em>) key from the traits dict containing config data.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>named Trait class or None if trait key
is not found in traits collection.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(<cite>Trait</cite> or <cite>None</cite>)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.traits.TraitHandler.remove">
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param">trait_key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.remove" title="Permalink to this definition"></a></dt>
<dd><p>Remove a Trait from the handlers parent object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trait_key</strong> (<em>str</em>) The name of the trait to remove.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.traits.UpdatingTrait">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">UpdatingTrait</code><span class="sig-paren">(</span><em class="sig-param">trait_data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#UpdatingTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.UpdatingTrait" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.CounterTrait" title="evennia.contrib.traits.CounterTrait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.CounterTrait</span></code></a></p>
<p>This is a trait that</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.traits._DA">
<code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">_DA</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.contrib.traits._DA" title="Permalink to this definition"></a></dt>
<dd><p>Implement delattr(self, name).</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.traits._GA">
<code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">_GA</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.contrib.traits._GA" title="Permalink to this definition"></a></dt>
<dd><p>Return getattr(self, name).</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.traits._SA">
<code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">_SA</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.contrib.traits._SA" title="Permalink to this definition"></a></dt>
<dd><p>Implement setattr(self, name, value).</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.traits._delayed_import_trait_classes">
<code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">_delayed_import_trait_classes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#_delayed_import_trait_classes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits._delayed_import_trait_classes" title="Permalink to this definition"></a></dt>
<dd><p>Import classes based on the given paths. Note that
imports from settings are last in the list, so if they
have the same trait_type set, they will replace the
default.</p>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.tree_select">
<span id="evennia-contrib-tree-select-module"></span><h2>evennia.contrib.tree_select module<a class="headerlink" href="#module-evennia.contrib.tree_select" title="Permalink to this headline"></a></h2>
<p>Easy menu selection tree</p>
<p>Contrib - Tim Ashley Jenkins 2017</p>
<p>This module allows you to create and initialize an entire branching EvMenu
instance with nothing but a multi-line string passed to one function.</p>
<p>EvMenu is incredibly powerful and flexible, but using it for simple menus
can often be fairly cumbersome - a simple menu that can branch into five
categories would require six nodes, each with options represented as a list
of dictionaries.</p>
<p>This module provides a function, init_tree_selection, which acts as a frontend
for EvMenu, dynamically sourcing the options from a multi-line string you provide.
For example, if you define a string as such:</p>
<blockquote>
<div><p>TEST_MENU = Foo
Bar
Baz
Qux</p>
</div></blockquote>
<p>And then use TEST_MENU as the treestr source when you call init_tree_selection
on a player:</p>
<blockquote>
<div><p>init_tree_selection(TEST_MENU, caller, callback)</p>
</div></blockquote>
<p>The player will be presented with an EvMenu, like so:</p>
<blockquote>
<div><p>Foo
Bar
Baz
Qux</p>
</div></blockquote>
<p>Making a selection will pass the selections key to the specified callback as a
string along with the caller, as well as the index of the selection (the line number
on the source string) along with the source string for the tree itself.</p>
<p>In addition to specifying selections on the menu, you can also specify categories.
Categories are indicated by putting options below it preceded with a - character.
If a selection is a category, then choosing it will bring up a new menu node, prompting
the player to select between those options, or to go back to the previous menu. In
addition, categories are marked by default with a [+] at the end of their key. Both
this marker and the option to go back can be disabled.</p>
<p>Categories can be nested in other categories as well - just go another - deeper. You
can do this as many times as you like. Theres no hard limit to the number of
categories you can go down.</p>
<p>For example, lets add some more options to our menu, turning Bar into a category.</p>
<blockquote>
<div><p>TEST_MENU = Foo
Bar
-Youve got to know
When to hold em
When to fold em
When to walk away
Baz
Qux</p>
</div></blockquote>
<p>Now when we call the menu, we can see that Bar has become a category instead of a
selectable option.</p>
<blockquote>
<div><p>Foo
Bar [+]
Baz
Qux</p>
</div></blockquote>
<p>Note the [+] next to Bar. If we select Bar, itll show us the option listed under it.</p>
<blockquote>
<div><p>Youve got to know [+]
&lt;&lt; Go Back: Return to the previous menu.</p>
</div></blockquote>
<p>Just the one option, which is a category itself, and the option to go back, which will
take us back to the previous menu. Lets select Youve got to know.</p>
<blockquote>
<div><p>When to hold em
When to fold em
When to walk away
&lt;&lt; Go Back: Return to the previous menu.</p>
</div></blockquote>
<p>Now we see the three options listed under it, too. We can select one of them or use Go
Back to return to the Bar menu we were just at before. Its very simple to make a
branching tree of selections!</p>
<p>One last thing - you can set the descriptions for the various options simply by adding a
: character followed by the description to the options line. For example, lets add a
description to Baz in our menu:</p>
<blockquote>
<div><p>TEST_MENU = Foo
Bar
-Youve got to know
When to hold em
When to fold em
When to walk away
Baz: Look at this one: the best option.
Qux</p>
</div></blockquote>
<p>Now we see that the Baz option has a description attached thats separate from its key:</p>
<blockquote>
<div><p>Foo
Bar [+]
Baz: Look at this one: the best option.
Qux</p>
</div></blockquote>
<p>Once the player makes a selection - lets say, Foo - the menu will terminate and call
your specified callback with the selection, like so:</p>
<blockquote>
<div><p>callback(caller, TEST_MENU, 0, “Foo”)</p>
</div></blockquote>
<p>The index of the selection is given along with a string containing the selections key.
That way, if you have two selections in the menu with the same key, you can still
differentiate between them.</p>
<p>And thats all there is to it! For simple branching-tree selections, using this system is
much easier than manually creating EvMenu nodes. It also makes generating menus with dynamic
options much easier - since the source of the menu tree is just a string, you could easily
generate that string procedurally before passing it to the init_tree_selection function.
For example, if a player casts a spell or does an attack without specifying a target, instead
of giving them an error, you could present them with a list of valid targets to select by
generating a multi-line string of targets and passing it to init_tree_selection, with the
callable performing the maneuver once a selection is made.</p>
<p>This selection system only works for simple branching trees - doing anything really complicated
like jumping between categories or prompting for arbitrary input would still require a full
EvMenu implementation. For simple selections, however, Im sure you will find using this function
to be much easier!</p>
<p>Included in this module is a sample menu and function which will let a player change the color
of their name - feel free to mess with it to get a feel for how this system works by importing
this module in your games default_cmdsets.py module and adding CmdNameColor to your default
characters command set.</p>
<dl class="class">
<dt id="evennia.contrib.tree_select.CmdNameColor">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">CmdNameColor</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#CmdNameColor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>Set or remove a special color on your name. Just an example for the
easy menu selection tree contrib.</p>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('namecolor',)</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'namecolor'}</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.tree_select.CmdNameColor.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#CmdNameColor.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.func" title="Permalink to this definition"></a></dt>
<dd><p>This is the actual executing part of the command. It is
called directly after self.parse(). See the docstring of this
module for which object properties are available (beyond those
set in self.parse())</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor.key">
<code class="sig-name descname">key</code><em class="property"> = 'namecolor'</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.tree_select.CmdNameColor.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'namecolor', 'tags': '', 'text': '\n Set or remove a special color on your name. Just an example for the\n easy menu selection tree contrib.\n '}</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.change_name_color">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">change_name_color</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">treestr</em>, <em class="sig-param">index</em>, <em class="sig-param">selection</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#change_name_color"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.change_name_color" title="Permalink to this definition"></a></dt>
<dd><p>Changes a players name color.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>obj</em>) Character whose name to color.</p></li>
<li><p><strong>treestr</strong> (<em>str</em>) String for the color change menu - unused</p></li>
<li><p><strong>index</strong> (<em>int</em>) Index of menu selection - unused</p></li>
<li><p><strong>selection</strong> (<em>str</em>) Selection made from the name color menu - used
to determine the color the player chose.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.dashcount">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">dashcount</code><span class="sig-paren">(</span><em class="sig-param">entry</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#dashcount"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.dashcount" title="Permalink to this definition"></a></dt>
<dd><p>Counts the number of dashes at the beginning of a string. This
is needed to determine the depth of options in categories.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>entry</strong> (<em>str</em>) String to count the dashes at the start of</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Number of dashes at the start</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>dashes (int)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.go_up_one_category">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">go_up_one_category</code><span class="sig-paren">(</span><em class="sig-param">treestr</em>, <em class="sig-param">index</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#go_up_one_category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.go_up_one_category" title="Permalink to this definition"></a></dt>
<dd><p>Given a menu tree string and an index, returns the category that the given option
belongs to. Used for the go back option.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>treestr</strong> (<em>str</em>) Multi-line string representing menu options</p></li>
<li><p><strong>index</strong> (<em>int</em>) Index to determine the parent category of</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Index of parent category</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>parent_category (int)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.index_to_selection">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">index_to_selection</code><span class="sig-paren">(</span><em class="sig-param">treestr</em>, <em class="sig-param">index</em>, <em class="sig-param">desc=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#index_to_selection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.index_to_selection" title="Permalink to this definition"></a></dt>
<dd><p>Given a menu tree string and an index, returns the corresponding selections
name as a string. If desc is set to True, will return the selections
description as a string instead.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>treestr</strong> (<em>str</em>) Multi-line string representing menu options</p></li>
<li><p><strong>index</strong> (<em>int</em>) Index to convert to selection key or description</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Options:</dt><dd><p>desc (bool): If true, returns description instead of key</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Selection key or description if desc is set</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>selection (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.init_tree_selection">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">init_tree_selection</code><span class="sig-paren">(</span><em class="sig-param">treestr</em>, <em class="sig-param">caller</em>, <em class="sig-param">callback</em>, <em class="sig-param">index=None</em>, <em class="sig-param">mark_category=True</em>, <em class="sig-param">go_back=True</em>, <em class="sig-param">cmd_on_exit='look'</em>, <em class="sig-param">start_text='Make your selection:'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#init_tree_selection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.init_tree_selection" title="Permalink to this definition"></a></dt>
<dd><p>Prompts a player to select an option from a menu tree given as a multi-line string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>treestr</strong> (<em>str</em>) Multi-lne string representing menu options</p></li>
<li><p><strong>caller</strong> (<em>obj</em>) Player to initialize the menu for</p></li>
<li><p><strong>callback</strong> (<em>callable</em>) Function to run when a selection is made. Must take 4 args:
caller (obj): Caller given above
treestr (str): Menu tree string given above
index (int): Index of final selection
selection (str): Key of final selection</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Options:</dt><dd><p>index (int or None): Index to start the menu at, or None for top level
mark_category (bool): If True, marks categories with a [+] symbol in the menu
go_back (bool): If True, present an option to go back to previous categories
start_text (str): Text to display at the top level of the menu
cmd_on_exit(str): Command to enter when the menu exits - look by default</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>This function will initialize an instance of EvMenu with options generated
dynamically from the source string, and passes the menu users selection to
a function of your choosing. The EvMenu is made of a single, repeating node,
which will call itself over and over at different levels of the menu tree as
categories are selected.</p>
<p>Once a non-category selection is made, the users selection will be passed to
the given callable, both as a string and as an index number. The index is given
to ensure every selection has a unique identifier, so that selections with the
same key in different categories can be distinguished between.</p>
<p>The menus called by this function are not persistent and cannot perform
complicated tasks like prompt for arbitrary input or jump multiple category
levels at once - youll have to use EvMenu itself if you want to take full
advantage of its features.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.is_category">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">is_category</code><span class="sig-paren">(</span><em class="sig-param">treestr</em>, <em class="sig-param">index</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#is_category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.is_category" title="Permalink to this definition"></a></dt>
<dd><p>Determines whether an option in a tree string is a category by
whether or not there are additional options below it.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>treestr</strong> (<em>str</em>) Multi-line string representing menu options</p></li>
<li><p><strong>index</strong> (<em>int</em>) Which line of the string to test</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Whether the option is a category</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>is_category (bool)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.menunode_treeselect">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">menunode_treeselect</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">raw_string</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#menunode_treeselect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.menunode_treeselect" title="Permalink to this definition"></a></dt>
<dd><p>This is the repeating menu node that handles the tree selection.</p>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.optlist_to_menuoptions">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">optlist_to_menuoptions</code><span class="sig-paren">(</span><em class="sig-param">treestr</em>, <em class="sig-param">optlist</em>, <em class="sig-param">index</em>, <em class="sig-param">mark_category</em>, <em class="sig-param">go_back</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#optlist_to_menuoptions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.optlist_to_menuoptions" title="Permalink to this definition"></a></dt>
<dd><p>Takes a list of options processed by parse_opts and turns it into
a list/dictionary of menu options for use in menunode_treeselect.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>treestr</strong> (<em>str</em>) Multi-line string representing menu options</p></li>
<li><p><strong>optlist</strong> (<em>list</em>) List of options to convert to EvMenus option format</p></li>
<li><p><strong>index</strong> (<em>int</em>) Index of current category</p></li>
<li><p><strong>mark_category</strong> (<em>bool</em>) Whether or not to mark categories with [+]</p></li>
<li><p><strong>go_back</strong> (<em>bool</em>) Whether or not to add an option to go back in the menu</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>List of menu options formatted for use</dt><dd><p>in EvMenu, each passing a different “newindex” kwarg that changes
the menu level or makes a selection</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>menuoptions (list of dicts)</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.tree_select.parse_opts">
<code class="sig-prename descclassname">evennia.contrib.tree_select.</code><code class="sig-name descname">parse_opts</code><span class="sig-paren">(</span><em class="sig-param">treestr</em>, <em class="sig-param">category_index=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tree_select.html#parse_opts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tree_select.parse_opts" title="Permalink to this definition"></a></dt>
<dd><p>Parses a tree string and given index into a list of options. If
category_index is none, returns all the options at the top level of
the menu. If category_index corresponds to a category, returns a list
of options under that category. If category_index corresponds to
an option that is not a category, its a selection and returns True.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>treestr</strong> (<em>str</em>) Multi-line string representing menu options</p></li>
<li><p><strong>category_index</strong> (<em>int</em>) Index of category or None for top level</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Either a list of options in the selected</dt><dd><p>category or True if a selection was made</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>kept_opts (list or True)</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.unixcommand">
<span id="evennia-contrib-unixcommand-module"></span><h2>evennia.contrib.unixcommand module<a class="headerlink" href="#module-evennia.contrib.unixcommand" title="Permalink to this headline"></a></h2>
<p>Unix-like Command style parent</p>
<p>Evennia contribution, Vincent Le Geoff 2017</p>
<p>This module contains a command class that allows for unix-style command syntax in-game, using
options, positional arguments and stuff like -n 10 etc similarly to a unix command. It might not
the best syntax for the average player but can be really useful for builders when they need to have
a single command do many things with many options. It uses the ArgumentParser from Pythons standard
library under the hood.</p>
<p>To use, inherit <cite>UnixCommand</cite> from this module from your own commands. You need
to override two methods:</p>
<ul class="simple">
<li><dl class="simple">
<dt>The <cite>init_parser</cite> method, which adds options to the parser. Note that you should normally</dt><dd><p><em>not</em> override the normal <cite>parse</cite> method when inheriting from <cite>UnixCommand</cite>.</p>
</dd>
</dl>
</li>
<li><p>The <cite>func</cite> method, called to execute the command once parsed (like any Command).</p></li>
</ul>
<p>Heres a short example:</p>
<p><a href="#id184"><span class="problematic" id="id185">``</span></a><a href="#id186"><span class="problematic" id="id187">`</span></a>python
class CmdPlant(UnixCommand):</p>
<blockquote>
<div><p>
Plant a tree or plant.</p>
<p>This command is used to plant something in the room you are in.</p>
<dl class="simple">
<dt>Examples:</dt><dd><p>plant orange -a 8
plant strawberry hidden
plant potato hidden age 5</p>
</dd>
</dl>
<p></p>
<p>key = “plant”</p>
<dl>
<dt>def init_parser(self):</dt><dd><p>“Add the arguments to the parser.”
# self.parser inherits <cite>argparse.ArgumentParser</cite>
self.parser.add_argument(“key”,</p>
<blockquote>
<div><p>help=”the key of the plant to be planted here”)</p>
</div></blockquote>
<dl class="simple">
<dt>self.parser.add_argument(“-a”, “age”, type=int,</dt><dd><p>default=1, help=”the age of the plant to be planted”)</p>
</dd>
<dt>self.parser.add_argument(“hidden”, action=”store_true”,</dt><dd><p>help=”should the newly-planted plant be hidden to players?”)</p>
</dd>
</dl>
</dd>
<dt>def func(self):</dt><dd><p>“func is called only if the parser succeeded.”
# self.opts contains the parsed options
key = self.opts.key
age = self.opts.age
hidden = self.opts.hidden
self.msg(“Going to plant {}, age={}, hidden={}.”.format(</p>
<blockquote>
<div><p>key, age, hidden))</p>
</div></blockquote>
</dd>
</dl>
</div></blockquote>
<p><a href="#id188"><span class="problematic" id="id189">``</span></a><a href="#id190"><span class="problematic" id="id191">`</span></a></p>
<p>To see the full power of argparse and the types of supported options, visit
[the documentation of argparse](<a class="reference external" href="https://docs.python.org/2/library/argparse.html">https://docs.python.org/2/library/argparse.html</a>).</p>
<dl class="class">
<dt id="evennia.contrib.unixcommand.HelpAction">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.unixcommand.</code><code class="sig-name descname">HelpAction</code><span class="sig-paren">(</span><em class="sig-param">option_strings</em>, <em class="sig-param">dest</em>, <em class="sig-param">nargs=None</em>, <em class="sig-param">const=None</em>, <em class="sig-param">default=None</em>, <em class="sig-param">type=None</em>, <em class="sig-param">choices=None</em>, <em class="sig-param">required=False</em>, <em class="sig-param">help=None</em>, <em class="sig-param">metavar=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#HelpAction"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.HelpAction" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">argparse.Action</span></code></p>
<p>Override the -h/help action in the default parser.</p>
<p>Using the default -h/help will call the exit function in different
ways, preventing the entire help message to be provided. Hence
this override.</p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.unixcommand.ParseError">
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.unixcommand.</code><code class="sig-name descname">ParseError</code><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#ParseError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.ParseError" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>An error occurred during parsing.</p>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.unixcommand.UnixCommand">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.unixcommand.</code><code class="sig-name descname">UnixCommand</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
<p>Unix-type commands, supporting short and long options.</p>
<p>This command syntax uses the Unix-style commands with short options
(-X) and long options (something). The <cite>argparse</cite> module is
used to parse the command.</p>
<p>In order to use it, you should override two methods:
- <cite>init_parser</cite>: this method is called when the command is created.</p>
<blockquote>
<div><p>It can be used to set options in the parser. <cite>self.parser</cite>
contains the <cite>argparse.ArgumentParser</cite>, so you can add arguments
here.</p>
</div></blockquote>
<ul class="simple">
<li><p><cite>func</cite>: this method is called to execute the command, but after
the parser has checked the arguments given to it are valid.
You can access the namespace of valid arguments in <cite>self.opts</cite>
at this point.</p></li>
</ul>
<p>The help of UnixCommands is derived from the docstring, in a
slightly different way than usual: the first line of the docstring
is used to represent the program description (the very short
line at the top of the help message). The other lines below are
used as the programs “epilog”, displayed below the options. It
means in your docstring, you dont have to write the options.
They will be automatically provided by the parser and displayed
accordingly. The <cite>argparse</cite> module provides a default -h or
help option on the command. Typing <a href="#id192"><span class="problematic" id="id193">|</span></a>whelp commandname|n will
display the same as <a href="#id194"><span class="problematic" id="id195">|</span></a>wcommandname -h|n, though this behavior can
be changed.</p>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommand.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommand.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.__init__" title="Permalink to this definition"></a></dt>
<dd><p>The lockhandler works the same as for objects.
optional kwargs will be set as properties on the Command at runtime,
overloading evential same-named class properties.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand._keyaliases">
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('command',)</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand._keyaliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand._matchset">
<code class="sig-name descname">_matchset</code><em class="property"> = {'command'}</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand._matchset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommand.func">
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommand.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.func" title="Permalink to this definition"></a></dt>
<dd><p>Override to handle the command execution.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommand.get_help">
<code class="sig-name descname">get_help</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">cmdset</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommand.get_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.get_help" title="Permalink to this definition"></a></dt>
<dd><p>Return the help message for this command and this caller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Player</em>) the caller asking for help on the command.</p></li>
<li><p><strong>cmdset</strong> (<a class="reference internal" href="evennia.commands.html#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><em>CmdSet</em></a>) the command set (if you need additional commands).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the help text to provide the caller for this command.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>docstring (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand.help_category">
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.help_category" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommand.init_parser">
<code class="sig-name descname">init_parser</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommand.init_parser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.init_parser" title="Permalink to this definition"></a></dt>
<dd><p>Configure the argument parser, adding in options.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is to be overridden in order to add options
to the argument parser. Use <cite>self.parser</cite>, which contains
the <cite>argparse.ArgumentParser</cite>. You can, for instance,
use its <cite>add_argument</cite> method.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand.key">
<code class="sig-name descname">key</code><em class="property"> = 'command'</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.key" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand.lock_storage">
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.lock_storage" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommand.parse">
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommand.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.parse" title="Permalink to this definition"></a></dt>
<dd><p>Process arguments provided in <cite>self.args</cite>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You should not override this method. Consider overriding
<cite>init_parser</cite> instead.</p>
</div>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.unixcommand.UnixCommand.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Unix-type commands, supporting short and long options.\n\n This command syntax uses the Unix-style commands with short options\n (-X) and long options (--something). The `argparse` module is\n used to parse the command.\n\n In order to use it, you should override two methods:\n - `init_parser`: this method is called when the command is created.\n It can be used to set options in the parser. `self.parser`\n contains the `argparse.ArgumentParser`, so you can add arguments\n here.\n - `func`: this method is called to execute the command, but after\n the parser has checked the arguments given to it are valid.\n You can access the namespace of valid arguments in `self.opts`\n at this point.\n\n The help of UnixCommands is derived from the docstring, in a\n slightly different way than usual: the first line of the docstring\n is used to represent the program description (the very short\n line at the top of the help message). The other lines below are\n used as the program\'s &quot;epilog&quot;, displayed below the options. It\n means in your docstring, you don\'t have to write the options.\n They will be automatically provided by the parser and displayed\n accordingly. The `argparse` module provides a default \'-h\' or\n \'--help\' option on the command. Typing |whelp commandname|n will\n display the same as |wcommandname -h|n, though this behavior can\n be changed.\n\n '}</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.unixcommand.UnixCommandParser">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.unixcommand.</code><code class="sig-name descname">UnixCommandParser</code><span class="sig-paren">(</span><em class="sig-param">prog</em>, <em class="sig-param">description=''</em>, <em class="sig-param">epilog=''</em>, <em class="sig-param">command=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommandParser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommandParser" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">argparse.ArgumentParser</span></code></p>
<p>A modifier command parser for unix commands.</p>
<p>This parser is used to replace <cite>argparse.ArgumentParser</cite>. It
is aware of the command calling it, and can more easily report to
the caller. Some features (like the “brutal exit” of the original
parser) are disabled or replaced. This parser is used by UnixCommand
and creating one directly isnt recommended nor necessary. Even
adding a sub-command will use this replaced parser automatically.</p>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommandParser.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">prog</em>, <em class="sig-param">description=''</em>, <em class="sig-param">epilog=''</em>, <em class="sig-param">command=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommandParser.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommandParser.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Build a UnixCommandParser with a link to the command using it.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>prog</strong> (<em>str</em>) the program name (usually the command key).</p></li>
<li><p><strong>description</strong> (<em>str</em>) a very brief line to show in the usage text.</p></li>
<li><p><strong>epilog</strong> (<em>str</em>) the epilog to show below options.</p></li>
<li><p><strong>command</strong> (<a class="reference internal" href="evennia.commands.html#evennia.commands.command.Command" title="evennia.commands.command.Command"><em>Command</em></a>) the command calling the parser.</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Kwargs:</dt><dd><p>Additional keyword arguments are directly sent to
<cite>argparse.ArgumentParser</cite>. You will find them on the
[parsers documentation](<a class="reference external" href="https://docs.python.org/2/library/argparse.html">https://docs.python.org/2/library/argparse.html</a>).</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Its doubtful you would need to create this parser manually.
The <cite>UnixCommand</cite> does that automatically. If you create
sub-commands, this class will be used.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommandParser.format_help">
<code class="sig-name descname">format_help</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommandParser.format_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommandParser.format_help" title="Permalink to this definition"></a></dt>
<dd><p>Return the parser help, including its epilog.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is present to return the raw-escaped help,
in order to avoid unintentional color codes. Color codes
in the epilog (the command docstring) are supported.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommandParser.format_usage">
<code class="sig-name descname">format_usage</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommandParser.format_usage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommandParser.format_usage" title="Permalink to this definition"></a></dt>
<dd><p>Return the usage line.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is present to return the raw-escaped usage line,
in order to avoid unintentional color codes.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommandParser.print_help">
<code class="sig-name descname">print_help</code><span class="sig-paren">(</span><em class="sig-param">file=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommandParser.print_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommandParser.print_help" title="Permalink to this definition"></a></dt>
<dd><p>Print the help to the caller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>file</strong> (<em>file-object</em>) not used here, the caller is used.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method will override <cite>argparse.ArgumentParser</cite>s in order
to not display the help on stdout or stderr, but to the
commands caller.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.unixcommand.UnixCommandParser.print_usage">
<code class="sig-name descname">print_usage</code><span class="sig-paren">(</span><em class="sig-param">file=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/unixcommand.html#UnixCommandParser.print_usage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommandParser.print_usage" title="Permalink to this definition"></a></dt>
<dd><p>Print the usage to the caller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>file</strong> (<em>file-object</em>) not used here, the caller is used.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method will override <cite>argparse.ArgumentParser</cite>s in order
to not display the help on stdout or stderr, but to the
commands caller.</p>
</div>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-evennia.contrib.wilderness">
<span id="evennia-contrib-wilderness-module"></span><h2>evennia.contrib.wilderness module<a class="headerlink" href="#module-evennia.contrib.wilderness" title="Permalink to this headline"></a></h2>
<p>Wilderness system</p>
<p>Evennia contrib - titeuf87 2017</p>
<p>This contrib provides a wilderness map. This is an area that can be huge where
the rooms are mostly similar, except for some small cosmetic changes like the
room name.</p>
<p>Usage:</p>
<blockquote>
<div><p>This contrib does not provide any commands. Instead the &#64;py command can be
used.</p>
<p>A wilderness map needs to created first. There can be different maps, all
with their own name. If no name is provided, then a default one is used. Internally,
the wilderness is stored as a Script with the name you specify. If you dont
specify the name, a script named “default” will be created and used.</p>
<p>&#64;py from evennia.contrib import wilderness; wilderness.create_wilderness()</p>
<p>Once created, it is possible to move into that wilderness map:</p>
<p>&#64;py from evennia.contrib import wilderness; wilderness.enter_wilderness(me)</p>
<p>All coordinates used by the wilderness map are in the format of <cite>(x, y)</cite>
tuples. x goes from left to right and y goes from bottom to top. So <cite>(0, 0)</cite>
is the bottom left corner of the map.</p>
</div></blockquote>
<p>Customisation:</p>
<blockquote>
<div><p>The defaults, while useable, are meant to be customised. When creating a
new wilderness map it is possible to give a “map provider”: this is a
python object that is smart enough to create the map.</p>
<p>The default provider, WildernessMapProvider, just creates a grid area that
is unlimited in size.
This WildernessMapProvider can be subclassed to create more interesting
maps and also to customize the room/exit typeclass used.</p>
<p>There is also no command that allows players to enter the wilderness. This
still needs to be added: it can be a command or an exit, depending on your
needs.</p>
</div></blockquote>
<p>Customisation example:</p>
<blockquote>
<div><p>To give an example of how to customize, we will create a very simple (and
small) wilderness map that is shaped like a pyramid. The map will be
provided as a string: a “.” symbol is a location we can walk on.</p>
<p>Lets create a file world/pyramid.py:</p>
<p><a href="#id196"><span class="problematic" id="id197">``</span></a><a href="#id198"><span class="problematic" id="id199">`</span></a>python
map_str = “””</p>
<blockquote>
<div><blockquote>
<div><blockquote>
<div><blockquote>
<div><p>.</p>
</div></blockquote>
<p></p>
</div></blockquote>
</div></blockquote>
</div></blockquote>
<p>“””</p>
<p>from evennia.contrib import wilderness</p>
<p>class PyramidMapProvider(wilderness.WildernessMapProvider):</p>
<blockquote>
<div><dl>
<dt>def is_valid_coordinates(self, wilderness, coordinates):</dt><dd><p>“Validates if these coordinates are inside the map”
x, y = coordinates
try:</p>
<blockquote>
<div><p>lines = map_str.split(“</p>
</div></blockquote>
</dd>
</dl>
</div></blockquote>
</div></blockquote>
<dl>
<dt>“)</dt><dd><blockquote>
<div><blockquote>
<div><blockquote>
<div><p># The reverse is needed because otherwise the pyramid will be
# upside down
lines.reverse()
line = lines[y]
column = line[x]
return column == “.”</p>
</div></blockquote>
<dl class="simple">
<dt>except IndexError:</dt><dd><p>return False</p>
</dd>
</dl>
</div></blockquote>
<dl>
<dt>def get_location_name(self, coordinates):</dt><dd><p>“Set the location name”
x, y = coordinates
if y == 3:</p>
<blockquote>
<div><p>return “Atop the pyramid.”</p>
</div></blockquote>
<dl class="simple">
<dt>else:</dt><dd><p>return “Inside a pyramid.”</p>
</dd>
</dl>
</dd>
<dt>def at_prepare_room(self, coordinates, caller, room):</dt><dd><p>“Any other changes done to the room before showing it”
x, y = coordinates
desc = “This is a room in the pyramid.”
if y == 3 :</p>
<blockquote>
<div><p>desc = “You can see far and wide from the top of the pyramid.”</p>
</div></blockquote>
<p>room.db.desc = desc</p>
</dd>
</dl>
</div></blockquote>
<p><a href="#id200"><span class="problematic" id="id201">``</span></a><a href="#id202"><span class="problematic" id="id203">`</span></a></p>
<p>Now we can use our new pyramid-shaped wilderness map. From inside Evennia we
create a new wilderness (with the name “default”) but using our new map provider:</p>
<p><a href="#id204"><span class="problematic" id="id205">``</span></a>`
&#64;py from world import pyramid as p; p.wilderness.create_wilderness(mapprovider=p.PyramidMapProvider())</p>
<p>&#64;py from evennia.contrib import wilderness; wilderness.enter_wilderness(me, coordinates=(4, 1))</p>
<p><a href="#id206"><span class="problematic" id="id207">``</span></a><a href="#id208"><span class="problematic" id="id209">`</span></a></p>
</dd>
</dl>
<p>Implementation details:</p>
<blockquote>
<div><p>When a character moves into the wilderness, they get their own room. If
they move, instead of moving the character, the room changes to match the
new coordinates.
If a character meets another character in the wilderness, then their room
merges. When one of the character leaves again, they each get their own
separate rooms.
Rooms are created as needed. Unneeded rooms are stored away to avoid the
overhead cost of creating new rooms again in the future.</p>
</div></blockquote>
<dl class="class">
<dt id="evennia.contrib.wilderness.WildernessExit">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">WildernessExit</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessExit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultExit" title="evennia.objects.objects.DefaultExit"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultExit</span></code></a></p>
<p>This is an Exit object used inside a WildernessRoom. Instead of changing
the location of an Object traversing through it (like a traditional exit
would do) it changes the coordinates of that traversing Object inside
the wilderness map.</p>
<dl class="exception">
<dt id="evennia.contrib.wilderness.WildernessExit.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.wilderness.WildernessExit.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessExit._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for WildernessExit&gt;</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessExit.at_traverse">
<code class="sig-name descname">at_traverse</code><span class="sig-paren">(</span><em class="sig-param">traversing_object</em>, <em class="sig-param">target_location</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessExit.at_traverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.at_traverse" title="Permalink to this definition"></a></dt>
<dd><p>This implements the actual traversal. The traverse lock has
already been checked (in the Exit command) at this point.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>traversing_object</strong> (<em>Object</em>) Object traversing us.</p></li>
<li><p><strong>target_location</strong> (<em>Object</em>) Where target is going.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the traverse is allowed to happen</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessExit.at_traverse_coordinates">
<code class="sig-name descname">at_traverse_coordinates</code><span class="sig-paren">(</span><em class="sig-param">traversing_object</em>, <em class="sig-param">current_coordinates</em>, <em class="sig-param">new_coordinates</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessExit.at_traverse_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.at_traverse_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Called when an object wants to travel from one place inside the
wilderness to another place inside the wilderness.</p>
<p>If this returns True, then the traversing can happen. Otherwise it will
be blocked.</p>
<p>This method is similar how the <cite>at_traverse</cite> works on normal exits.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>traversing_object</strong> (<em>Object</em>) The object doing the travelling.</p></li>
<li><p><strong>current_coordinates</strong> (<em>tuple</em>) (x, y) coordinates where
<cite>traversing_object</cite> currently is.</p></li>
<li><p><strong>new_coordinates</strong> (<em>tuple</em>) (x, y) coordinates of where
<cite>traversing_object</cite> wants to travel to.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if traversing_object is allowed to traverse</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessExit.mapprovider">
<em class="property">property </em><code class="sig-name descname">mapprovider</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.mapprovider" title="Permalink to this definition"></a></dt>
<dd><p>Shortcut property to the map provider.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>the mapprovider object used with this</dt><dd><p>wilderness map.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>MapProvider object</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessExit.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.wilderness.WildernessExit'</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessExit.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'WildernessExit'</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessExit.wilderness">
<em class="property">property </em><code class="sig-name descname">wilderness</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessExit.wilderness" title="Permalink to this definition"></a></dt>
<dd><p>Shortcut property to the wilderness script.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the WildernessScript attached to this exits room</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.wilderness.WildernessScript" title="evennia.contrib.wilderness.WildernessScript">WildernessScript</a></p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.wilderness.WildernessMapProvider">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">WildernessMapProvider</code><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessMapProvider"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessMapProvider" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Default Wilderness Map provider.</p>
<p>This is a simple provider that just creates an infinite large grid area.</p>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessMapProvider.at_prepare_room">
<code class="sig-name descname">at_prepare_room</code><span class="sig-paren">(</span><em class="sig-param">coordinates</em>, <em class="sig-param">caller</em>, <em class="sig-param">room</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessMapProvider.at_prepare_room"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessMapProvider.at_prepare_room" title="Permalink to this definition"></a></dt>
<dd><p>Called when a room gets activated for certain coordinates. This happens
after every object is moved in it.
This can be used to set a custom room desc for instance or run other
customisations on the room.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coordinates</strong> (<em>tuple</em>) the coordinates as (x, y) where room is
located at</p></li>
<li><p><strong>caller</strong> (<em>Object</em>) the object that moved into this room</p></li>
<li><p><strong>room</strong> (<a class="reference internal" href="#evennia.contrib.wilderness.WildernessRoom" title="evennia.contrib.wilderness.WildernessRoom"><em>WildernessRoom</em></a>) the room object that will be used at that
wilderness location</p></li>
</ul>
</dd>
</dl>
<p class="rubric">Example</p>
<p>An example use of this would to plug in a randomizer to show different
descriptions for different coordinates, or place a treasure at a special
coordinate.</p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessMapProvider.exit_typeclass">
<code class="sig-name descname">exit_typeclass</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessMapProvider.exit_typeclass" title="Permalink to this definition"></a></dt>
<dd><p>alias of <a class="reference internal" href="#evennia.contrib.wilderness.WildernessExit" title="evennia.contrib.wilderness.WildernessExit"><code class="xref py py-class docutils literal notranslate"><span class="pre">WildernessExit</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessMapProvider.get_location_name">
<code class="sig-name descname">get_location_name</code><span class="sig-paren">(</span><em class="sig-param">coordinates</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessMapProvider.get_location_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessMapProvider.get_location_name" title="Permalink to this definition"></a></dt>
<dd><p>Returns a name for the position at coordinates.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>coordinates</strong> (<em>tuple</em>) the coordinates as (x, y) tuple.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>name (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessMapProvider.is_valid_coordinates">
<code class="sig-name descname">is_valid_coordinates</code><span class="sig-paren">(</span><em class="sig-param">wilderness</em>, <em class="sig-param">coordinates</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessMapProvider.is_valid_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessMapProvider.is_valid_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if coordinates is valid and can be walked to.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>wilderness</strong> the wilderness script</p></li>
<li><p><strong>coordinates</strong> (<em>tuple</em>) the coordinates to check as (x, y) tuple.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the coordinates are valid</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessMapProvider.room_typeclass">
<code class="sig-name descname">room_typeclass</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessMapProvider.room_typeclass" title="Permalink to this definition"></a></dt>
<dd><p>alias of <a class="reference internal" href="#evennia.contrib.wilderness.WildernessRoom" title="evennia.contrib.wilderness.WildernessRoom"><code class="xref py py-class docutils literal notranslate"><span class="pre">WildernessRoom</span></code></a></p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.wilderness.WildernessRoom">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">WildernessRoom</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessRoom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.objects.html#evennia.objects.objects.DefaultRoom" title="evennia.objects.objects.DefaultRoom"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultRoom</span></code></a></p>
<p>This is a single room inside the wilderness. This room provides a “view”
into the wilderness map. When an account moves around, instead of going to
another room as with traditional rooms, they stay in the same room but the
room itself changes to display another area of the wilderness.</p>
<dl class="exception">
<dt id="evennia.contrib.wilderness.WildernessRoom.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.wilderness.WildernessRoom.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessRoom._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for WildernessRoom&gt;</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.at_object_leave">
<code class="sig-name descname">at_object_leave</code><span class="sig-paren">(</span><em class="sig-param">moved_obj</em>, <em class="sig-param">target_location</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessRoom.at_object_leave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.at_object_leave" title="Permalink to this definition"></a></dt>
<dd><p>Called just before an object leaves from inside this object. This is a
default Evennia hook.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>moved_obj</strong> (<em>Object</em>) The object leaving</p></li>
<li><p><strong>target_location</strong> (<em>Object</em>) Where <cite>moved_obj</cite> is going.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.at_object_receive">
<code class="sig-name descname">at_object_receive</code><span class="sig-paren">(</span><em class="sig-param">moved_obj</em>, <em class="sig-param">source_location</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessRoom.at_object_receive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.at_object_receive" title="Permalink to this definition"></a></dt>
<dd><p>Called after an object has been moved into this object. This is a
default Evennia hook.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>moved_obj</strong> (<em>Object</em>) The object moved into this one.</p></li>
<li><p><strong>source_location</strong> (<em>Object</em>) Where <cite>moved_obj</cite> came from.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.coordinates">
<em class="property">property </em><code class="sig-name descname">coordinates</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns the coordinates of this room into the wilderness.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>(x, y) coordinates of where this room is inside the</dt><dd><p>wilderness.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>tuple</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.get_display_name">
<code class="sig-name descname">get_display_name</code><span class="sig-paren">(</span><em class="sig-param">looker</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessRoom.get_display_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.get_display_name" title="Permalink to this definition"></a></dt>
<dd><p>Displays the name of the object in a viewer-aware manner.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>looker</strong> (<a class="reference internal" href="evennia.typeclasses.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><em>TypedObject</em></a>) The object or account that is looking
at/getting inforamtion for this object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>A string containing the name of the object,</dt><dd><p>including the DBREF if this user is privileged to control
said object and also its coordinates into the wilderness map.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>name (str)</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>This function could be extended to change how object names
appear to users in character, but be wary. This function
does not change an objects keys or aliases when
searching, and is expected to produce something useful for
builders.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.location_name">
<em class="property">property </em><code class="sig-name descname">location_name</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.location_name" title="Permalink to this definition"></a></dt>
<dd><p>Returns the name of the wilderness at this rooms coordinates.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>name (str)</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessRoom.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.wilderness.WildernessRoom'</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.set_active_coordinates">
<code class="sig-name descname">set_active_coordinates</code><span class="sig-paren">(</span><em class="sig-param">new_coordinates</em>, <em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessRoom.set_active_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.set_active_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Changes this room to show the wilderness map from other coordinates.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>new_coordinates</strong> (<em>tuple</em>) coordinates as tuple of (x, y)</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) the object that moved into this room and caused the
coordinates to change</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessRoom.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'WildernessRoom'</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessRoom.wilderness">
<em class="property">property </em><code class="sig-name descname">wilderness</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessRoom.wilderness" title="Permalink to this definition"></a></dt>
<dd><p>Shortcut property to the wilderness script this room belongs to.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the WildernessScript attached to this room</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.wilderness.WildernessScript" title="evennia.contrib.wilderness.WildernessScript">WildernessScript</a></p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="evennia.contrib.wilderness.WildernessScript">
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">WildernessScript</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="evennia.scripts.html#evennia.scripts.scripts.DefaultScript" title="evennia.scripts.scripts.DefaultScript"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DefaultScript</span></code></a></p>
<p>This is the main “handler” for the wilderness system: inside here the
coordinates of every item currently inside the wilderness is stored. This
script is responsible for creating rooms as needed and storing rooms away
into storage when they are not needed anymore.</p>
<dl class="exception">
<dt id="evennia.contrib.wilderness.WildernessScript.DoesNotExist">
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.DoesNotExist" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.DoesNotExist</span></code></p>
</dd></dl>
<dl class="exception">
<dt id="evennia.contrib.wilderness.WildernessScript.MultipleObjectsReturned">
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.MultipleObjectsReturned" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.MultipleObjectsReturned</span></code></p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript._create_room">
<code class="sig-name descname">_create_room</code><span class="sig-paren">(</span><em class="sig-param">coordinates</em>, <em class="sig-param">report_to</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript._create_room"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript._create_room" title="Permalink to this definition"></a></dt>
<dd><p>Gets a new WildernessRoom to be used for the provided coordinates.</p>
<p>It first tries to retrieve a room out of storage. If there are no rooms
left a new one will be created.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coordinates</strong> (<em>tuple</em>) coordinate tuple of (x, y)</p></li>
<li><p><strong>report_to</strong> (<em>object</em>) the obj to return error messages to</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript._destroy_room">
<code class="sig-name descname">_destroy_room</code><span class="sig-paren">(</span><em class="sig-param">room</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript._destroy_room"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript._destroy_room" title="Permalink to this definition"></a></dt>
<dd><p>Moves a room back to storage. If room is not a WildernessRoom or there
is a player inside the room, then this does nothing.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>room</strong> (<a class="reference internal" href="#evennia.contrib.wilderness.WildernessRoom" title="evennia.contrib.wilderness.WildernessRoom"><em>WildernessRoom</em></a>) the room to put in storage</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessScript._meta">
<code class="sig-name descname">_meta</code><em class="property"> = &lt;Options for WildernessScript&gt;</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript._meta" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.at_after_object_leave">
<code class="sig-name descname">at_after_object_leave</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.at_after_object_leave"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.at_after_object_leave" title="Permalink to this definition"></a></dt>
<dd><p>Called after an object left this wilderness map. Used for cleaning up.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>object</em>) the object that left</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.at_script_creation">
<code class="sig-name descname">at_script_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.at_script_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.at_script_creation" title="Permalink to this definition"></a></dt>
<dd><p>Only called once, when the script is created. This is a default Evennia
hook.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.at_start">
<code class="sig-name descname">at_start</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.at_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.at_start" title="Permalink to this definition"></a></dt>
<dd><p>Called when the script is started and also after server reloads.</p>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.get_obj_coordinates">
<code class="sig-name descname">get_obj_coordinates</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.get_obj_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.get_obj_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns the coordinates of obj in the wilderness.</p>
<p>Returns (x, y)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<em>object</em>) an object inside the wilderness</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>(x, y) tuple of where obj is located</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>tuple</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.get_objs_at_coordinates">
<code class="sig-name descname">get_objs_at_coordinates</code><span class="sig-paren">(</span><em class="sig-param">coordinates</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.get_objs_at_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.get_objs_at_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of every object at certain coordinates.</p>
<p>Imeplementation detail: this uses a naive iteration through every
object inside the wilderness which could cause slow downs when there
are a lot of objects in the map.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>coordinates</strong> (<em>tuple</em>) a coordinate tuple like (x, y)</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>list of Objects at coordinates</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>[Object, ]</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.is_valid_coordinates">
<code class="sig-name descname">is_valid_coordinates</code><span class="sig-paren">(</span><em class="sig-param">coordinates</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.is_valid_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.is_valid_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if coordinates are valid (and can be travelled to).
Otherwise returns False</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>coordinates</strong> (<em>tuple</em>) coordinates as (x, y) tuple</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the coordinates are valid</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.itemcoordinates">
<em class="property">property </em><code class="sig-name descname">itemcoordinates</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.itemcoordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns a dictionary with the coordinates of every item inside this
wilderness map. The key is the item, the value are the coordinates as
(x, y) tuple.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>coordinates}</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>{item</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.mapprovider">
<em class="property">property </em><code class="sig-name descname">mapprovider</code><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.mapprovider" title="Permalink to this definition"></a></dt>
<dd><p>Shortcut property to the map provider.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the mapprovider used with this wilderness</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>MapProvider</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="evennia.contrib.wilderness.WildernessScript.move_obj">
<code class="sig-name descname">move_obj</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">new_coordinates</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#WildernessScript.move_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.move_obj" title="Permalink to this definition"></a></dt>
<dd><p>Moves obj to new coordinates in this wilderness.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>obj</strong> (<em>object</em>) the object to move</p></li>
<li><p><strong>new_coordinates</strong> (<em>tuple</em>) tuple of (x, y) where to move obj to.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessScript.path">
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.wilderness.WildernessScript'</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.path" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="evennia.contrib.wilderness.WildernessScript.typename">
<code class="sig-name descname">typename</code><em class="property"> = 'WildernessScript'</em><a class="headerlink" href="#evennia.contrib.wilderness.WildernessScript.typename" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.wilderness.create_wilderness">
<code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">create_wilderness</code><span class="sig-paren">(</span><em class="sig-param">name='default'</em>, <em class="sig-param">mapprovider=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#create_wilderness"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.create_wilderness" title="Permalink to this definition"></a></dt>
<dd><p>Creates a new wilderness map. Does nothing if a wilderness map already
exists with the same name.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em><em>, </em><em>optional</em>) the name to use for that wilderness map</p></li>
<li><p><strong>mapprovider</strong> (<em>WildernessMap instance</em><em>, </em><em>optional</em>) an instance of a
WildernessMap class (or subclass) that will be used to provide the
layout of this wilderness map. If none is provided, the default
infinite grid map will be used.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.wilderness.enter_wilderness">
<code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">enter_wilderness</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">coordinates=(0</em>, <em class="sig-param">0)</em>, <em class="sig-param">name='default'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#enter_wilderness"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.enter_wilderness" title="Permalink to this definition"></a></dt>
<dd><p>Moves obj into the wilderness. The wilderness needs to exist first and the
provided coordinates needs to be valid inside that wilderness.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>obj</strong> (<em>object</em>) the object to move into the wilderness</p></li>
<li><p><strong>coordinates</strong> (<em>tuple</em><em>)</em><em>, </em><em>optional</em>) the coordinates to move obj to into
the wilderness. If not provided, defaults (0, 0)</p></li>
<li><p><strong>name</strong> (<em>str</em><em>, </em><em>optional</em>) name of the wilderness map, if not using the
default one</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if obj successfully moved into the wilderness.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="evennia.contrib.wilderness.get_new_coordinates">
<code class="sig-prename descclassname">evennia.contrib.wilderness.</code><code class="sig-name descname">get_new_coordinates</code><span class="sig-paren">(</span><em class="sig-param">coordinates</em>, <em class="sig-param">direction</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/wilderness.html#get_new_coordinates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.wilderness.get_new_coordinates" title="Permalink to this definition"></a></dt>
<dd><p>Returns the coordinates of direction applied to the provided coordinates.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coordinates</strong> tuple of (x, y)</p></li>
<li><p><strong>direction</strong> a direction string (like “northeast”)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>tuple of (x, y) coordinates</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>tuple</p>
</dd>
</dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<p><h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">evennia.contrib package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.barter">evennia.contrib.barter module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.building_menu">evennia.contrib.building_menu module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.chargen">evennia.contrib.chargen module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.clothing">evennia.contrib.clothing module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.color_markups">evennia.contrib.color_markups module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.custom_gametime">evennia.contrib.custom_gametime module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.dice">evennia.contrib.dice module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.email_login">evennia.contrib.email_login module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.extended_room">evennia.contrib.extended_room module</a><ul>
<li><a class="reference internal" href="#id59">```</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-evennia.contrib.fieldfill">evennia.contrib.fieldfill module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.gendersub">evennia.contrib.gendersub module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.health_bar">evennia.contrib.health_bar module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.mail">evennia.contrib.mail module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.mapbuilder">evennia.contrib.mapbuilder module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.menu_login">evennia.contrib.menu_login module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.multidescer">evennia.contrib.multidescer module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.puzzles">evennia.contrib.puzzles module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.random_string_generator">evennia.contrib.random_string_generator module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.rplanguage">evennia.contrib.rplanguage module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.rpsystem">evennia.contrib.rpsystem module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.simpledoor">evennia.contrib.simpledoor module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.slow_exit">evennia.contrib.slow_exit module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.talking_npc">evennia.contrib.talking_npc module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.test_traits">evennia.contrib.test_traits module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.tests">evennia.contrib.tests module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.traits">evennia.contrib.traits module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.tree_select">evennia.contrib.tree_select module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.unixcommand">evennia.contrib.unixcommand module</a></li>
<li><a class="reference internal" href="#module-evennia.contrib.wilderness">evennia.contrib.wilderness module</a></li>
</ul>
</li>
</ul>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/api/evennia.contrib.rst.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div>
<h3>Versions</h3>
<ul>
<li><a href="evennia.contrib.html">1.0-dev (develop branch)</a></li>
<li><a href="../../0.9.1/api/evennia.contrib.html">0.9.1 (master branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, The Evennia developer community.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
</div>
</body>
</html>