Updated HTML docs.

This commit is contained in:
Evennia docbuilder action 2024-02-25 15:41:14 +00:00
parent 817fe7cb41
commit 842791297a
43 changed files with 727 additions and 629 deletions

View file

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: bee62a60e87a7d499134e040f17e1f7a
config: 9843c9ebb164850b1f9b8b77fa5ec43e
tags: 645f666f9bcd5a90fca523b33c5a78b7

View file

@ -193,23 +193,38 @@
<section id="main-branch">
<h2>main branch<a class="headerlink" href="#main-branch" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>[Feature] Add <code class="docutils literal notranslate"><span class="pre">evennia.ON_DEMAND_HANDLER</span></code> for making it easier to implement
timed element with the on-demand approach (Griatch)</p></li>
<li><p>[Fix] Remove <code class="docutils literal notranslate"><span class="pre">AMP_ENABLED</span></code> setting since it services no real purpose and
erroring out on setting it would make it even less useful (Griatch).</p></li>
<li><p>[Fix] <code class="docutils literal notranslate"><span class="pre">services</span></code> command with no args would traceback (regression) (Griatch)</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3412">Feature</a>: Make it possible to add custom webclient css in
<li><p>Feature: Add [<code class="docutils literal notranslate"><span class="pre">evennia.ON_DEMAND_HANDLER</span></code>][new-ondemandhandler] for making it
easier to implement changes that are calculated on-demand (Griatch)</p></li>
<li><p>[Feature][pull3412]: Make it possible to add custom webclient css in
<code class="docutils literal notranslate"><span class="pre">webclient/css/custom.css</span></code>, same as for website (InspectorCaracal)</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3423">Fix</a>: Fix wilderness contrib error moving to an already existing
<li><p>[Feature][pull3367]: [Component contrib][pull3367extra] got better
inheritance, slot names to choose attr storage, speedups and fixes (ChrisLR)</p></li>
<li><p>Feature: Break up <code class="docutils literal notranslate"><span class="pre">DefaultObject.search</span></code> method into several helpers to make
it easier to override (Griatch)</p></li>
<li><p>Fix: Resolve multimatch error with rpsystem contrib (Griatch)</p></li>
<li><p>Fix: Remove <code class="docutils literal notranslate"><span class="pre">AMP_ENABLED</span></code> setting since it services no real purpose and
erroring out on setting it would make it even less useful (Griatch).</p></li>
<li><p>Feature: Remove too-strict password restrictions for Evennia logins, using
django defaults instead for passwords with more varied characters.</p></li>
<li><p>Fix <code class="docutils literal notranslate"><span class="pre">services</span></code> command with no args would traceback (regression) (Griatch)</p></li>
<li><p>[Fix][pull3423]: Fix wilderness contrib error moving to an already existing
wilderness room (InspectorCaracal)</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3425">Fix</a>: Dont always include example the crafting recipe when
<li><p>[Fix][pull3425]: Dont always include example the crafting recipe when
using the crafting contrib (InspectorCaracal)</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3426">pull3426</a>: Traceback banning a channel using with only one nick
<li><p>[Fix][pull3426]: Traceback banning a channel using with only one nick
(InspectorCaracal)</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3434">pull3434</a>: Adjust lunr search weights to void clashing of cmd-aliases over
<li><p>[Fix][pull3434]: Adjust lunr search weights to void clashing of cmd-aliases over
keys which caused some help entries to shadow others (InspectorCaracal)</p></li>
<li><p>Doc fixes (InspectorCaracal, Griatch)</p></li>
</ul>
<p>[new-ondemandhandler][<a class="reference external" href="https://www.evennia.com/docs/latest/Components/OnDemandHandler.html">https://www.evennia.com/docs/latest/Components/OnDemandHandler.html</a>]
[pull3412]: <a class="reference external" href="https://github.com/evennia/evennia/pull/3412">https://github.com/evennia/evennia/pull/3412</a>
[pull3423]: <a class="reference external" href="https://github.com/evennia/evennia/pull/3423">https://github.com/evennia/evennia/pull/3423</a>
[pull3425]: <a class="reference external" href="https://github.com/evennia/evennia/pull/3425">https://github.com/evennia/evennia/pull/3425</a>
[pull3426]: <a class="reference external" href="https://github.com/evennia/evennia/pull/3426">https://github.com/evennia/evennia/pull/3426</a>
[pull3434]: <a class="reference external" href="https://github.com/evennia/evennia/pull/3434">https://github.com/evennia/evennia/pull/3434</a>
[pull3367]: <a class="reference external" href="https://github.com/evennia/evennia/pull/3367">https://github.com/evennia/evennia/pull/3367</a>
[pull3367extra]: <a class="reference external" href="https://www.evennia.com/docs/latest/Contribs/Contrib-Components.html">https://www.evennia.com/docs/latest/Contribs/Contrib-Components.html</a></p>
</section>
<section id="evennia-3-1-1">
<h2>Evennia 3.1.1<a class="headerlink" href="#evennia-3-1-1" title="Permalink to this headline"></a></h2>

View file

@ -1219,7 +1219,6 @@ to change into <code class="docutils literal notranslate"><span class="pre">myga
<span class="p">},</span>
<span class="p">{</span><span class="s2">&quot;NAME&quot;</span><span class="p">:</span> <span class="s2">&quot;django.contrib.auth.password_validation.CommonPasswordValidator&quot;</span><span class="p">},</span>
<span class="p">{</span><span class="s2">&quot;NAME&quot;</span><span class="p">:</span> <span class="s2">&quot;django.contrib.auth.password_validation.NumericPasswordValidator&quot;</span><span class="p">},</span>
<span class="p">{</span><span class="s2">&quot;NAME&quot;</span><span class="p">:</span> <span class="s2">&quot;evennia.server.validators.EvenniaPasswordValidator&quot;</span><span class="p">},</span>
<span class="p">]</span>
<span class="c1"># Username validation plugins</span>

View file

@ -104,13 +104,10 @@
<span class="kn">import</span> <span class="nn">datetime</span>
<span class="kn">from</span> <span class="nn">unittest.mock</span> <span class="kn">import</span> <span class="n">MagicMock</span><span class="p">,</span> <span class="n">Mock</span><span class="p">,</span> <span class="n">patch</span>
<span class="kn">import</span> <span class="nn">evennia</span>
<span class="kn">from</span> <span class="nn">anything</span> <span class="kn">import</span> <span class="n">Anything</span>
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
<span class="kn">from</span> <span class="nn">django.test</span> <span class="kn">import</span> <span class="n">override_settings</span>
<span class="kn">from</span> <span class="nn">parameterized</span> <span class="kn">import</span> <span class="n">parameterized</span>
<span class="kn">from</span> <span class="nn">twisted.internet</span> <span class="kn">import</span> <span class="n">task</span>
<span class="kn">import</span> <span class="nn">evennia</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">DefaultCharacter</span><span class="p">,</span>
<span class="n">DefaultExit</span><span class="p">,</span>
@ -122,14 +119,7 @@
<span class="kn">from</span> <span class="nn">evennia.commands</span> <span class="kn">import</span> <span class="n">cmdparser</span>
<span class="kn">from</span> <span class="nn">evennia.commands.cmdset</span> <span class="kn">import</span> <span class="n">CmdSet</span>
<span class="kn">from</span> <span class="nn">evennia.commands.command</span> <span class="kn">import</span> <span class="n">Command</span><span class="p">,</span> <span class="n">InterruptCommand</span>
<span class="kn">from</span> <span class="nn">evennia.commands.default</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">account</span><span class="p">,</span>
<span class="n">admin</span><span class="p">,</span>
<span class="n">batchprocess</span><span class="p">,</span>
<span class="n">building</span><span class="p">,</span>
<span class="n">comms</span><span class="p">,</span>
<span class="n">general</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">evennia.commands.default</span> <span class="kn">import</span> <span class="n">account</span><span class="p">,</span> <span class="n">admin</span><span class="p">,</span> <span class="n">batchprocess</span><span class="p">,</span> <span class="n">building</span><span class="p">,</span> <span class="n">comms</span><span class="p">,</span> <span class="n">general</span>
<span class="kn">from</span> <span class="nn">evennia.commands.default</span> <span class="kn">import</span> <span class="n">help</span> <span class="k">as</span> <span class="n">help_module</span>
<span class="kn">from</span> <span class="nn">evennia.commands.default</span> <span class="kn">import</span> <span class="n">syscommands</span><span class="p">,</span> <span class="n">system</span><span class="p">,</span> <span class="n">unloggedin</span>
<span class="kn">from</span> <span class="nn">evennia.commands.default.cmdset_character</span> <span class="kn">import</span> <span class="n">CharacterCmdSet</span>
@ -138,6 +128,8 @@
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">create</span><span class="p">,</span> <span class="n">gametime</span><span class="p">,</span> <span class="n">utils</span>
<span class="kn">from</span> <span class="nn">evennia.utils.test_resources</span> <span class="kn">import</span> <span class="n">BaseEvenniaCommandTest</span> <span class="c1"># noqa</span>
<span class="kn">from</span> <span class="nn">evennia.utils.test_resources</span> <span class="kn">import</span> <span class="n">BaseEvenniaTest</span><span class="p">,</span> <span class="n">EvenniaCommandTest</span>
<span class="kn">from</span> <span class="nn">parameterized</span> <span class="kn">import</span> <span class="n">parameterized</span>
<span class="kn">from</span> <span class="nn">twisted.internet</span> <span class="kn">import</span> <span class="n">task</span>
<span class="c1"># ------------------------------------------------------------</span>
<span class="c1"># Command testing</span>
@ -239,14 +231,18 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">CmdTest</span><span class="p">(),</span>
<span class="s2">&quot;/t&quot;</span><span class="p">,</span>
<span class="s2">&quot;test: Ambiguous switch supplied: &quot;</span>
<span class="s2">&quot;Did you mean /test or /testswitch or /testswitch2?|Switches matched: []&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;test: Ambiguous switch supplied: &quot;</span>
<span class="s2">&quot;Did you mean /test or /testswitch or /testswitch2?|Switches matched: []&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">CmdTest</span><span class="p">(),</span>
<span class="s2">&quot;/tests&quot;</span><span class="p">,</span>
<span class="s2">&quot;test: Ambiguous switch supplied: &quot;</span>
<span class="s2">&quot;Did you mean /testswitch or /testswitch2?|Switches matched: []&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;test: Ambiguous switch supplied: &quot;</span>
<span class="s2">&quot;Did you mean /testswitch or /testswitch2?|Switches matched: []&quot;</span>
<span class="p">),</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="TestGeneral.test_say"><a class="viewcode-back" href="../../../../api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestGeneral.test_say">[docs]</a> <span class="k">def</span> <span class="nf">test_say</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -936,8 +932,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdCpAttr</span><span class="p">(),</span>
<span class="s2">&quot;/copy Obj2/test2 = Obj2/test3&quot;</span><span class="p">,</span>
<span class="s1">&#39;@cpattr: Extra switch &quot;/copy&quot; ignored.|</span><span class="se">\n</span><span class="s1">Copied Obj2.test2 -&gt; Obj2.test3. &#39;</span>
<span class="s2">&quot;(value: &#39;value2&#39;)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s1">&#39;@cpattr: Extra switch &quot;/copy&quot; ignored.|</span><span class="se">\n</span><span class="s1">Copied Obj2.test2 -&gt; Obj2.test3. &#39;</span>
<span class="s2">&quot;(value: &#39;value2&#39;)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">building</span><span class="o">.</span><span class="n">CmdMvAttr</span><span class="p">(),</span> <span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;Usage: &quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">building</span><span class="o">.</span><span class="n">CmdMvAttr</span><span class="p">(),</span> <span class="s2">&quot;Obj2/test2 = Obj/test3&quot;</span><span class="p">,</span> <span class="s2">&quot;Moved Obj2.test2 -&gt; Obj.test3&quot;</span><span class="p">)</span>
@ -992,8 +990,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
<span class="s2">&quot;Obj/test1[5] =&quot;</span><span class="p">,</span>
<span class="s2">&quot;No attribute Obj/test1[5] [category: None] was found to &quot;</span>
<span class="s2">&quot;delete. (Nested lookups attempted)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;No attribute Obj/test1[5] [category: None] was found to &quot;</span>
<span class="s2">&quot;delete. (Nested lookups attempted)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="c1"># Append</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
@ -1046,8 +1046,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
<span class="s2">&quot;Obj/test2[+&#39;three&#39;]&quot;</span><span class="p">,</span>
<span class="s2">&quot;Attribute Obj/test2[+&#39;three&#39;] [category:None] does not exist. (Nested lookups&quot;</span>
<span class="s2">&quot; attempted)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Attribute Obj/test2[+&#39;three&#39;] [category:None] does not exist. (Nested lookups&quot;</span>
<span class="s2">&quot; attempted)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
@ -1088,8 +1090,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
<span class="s2">&quot;Obj/test2[&#39;five&#39;] =&quot;</span><span class="p">,</span>
<span class="s2">&quot;No attribute Obj/test2[&#39;five&#39;] [category: None] &quot;</span>
<span class="s2">&quot;was found to delete. (Nested lookups attempted)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;No attribute Obj/test2[&#39;five&#39;] [category: None] &quot;</span>
<span class="s2">&quot;was found to delete. (Nested lookups attempted)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
@ -1099,8 +1103,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
<span class="s2">&quot;Obj/test2[+1]=33&quot;</span><span class="p">,</span>
<span class="s2">&quot;Modified attribute Obj/test2 [category:None] = &quot;</span>
<span class="s2">&quot;{&#39;one&#39;: 99, &#39;three&#39;: 3, &#39;+&#39;: 42, &#39;+1&#39;: 33}&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Modified attribute Obj/test2 [category:None] = &quot;</span>
<span class="s2">&quot;{&#39;one&#39;: 99, &#39;three&#39;: 3, &#39;+&#39;: 42, &#39;+1&#39;: 33}&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="c1"># dict - case sensitive keys</span>
@ -1161,8 +1167,10 @@
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
<span class="c1"># Special case for tuple, could have a better message</span>
<span class="s2">&quot;Obj/tup[1] = &quot;</span><span class="p">,</span>
<span class="s2">&quot;No attribute Obj/tup[1] [category: None] &quot;</span>
<span class="s2">&quot;was found to delete. (Nested lookups attempted)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;No attribute Obj/tup[1] [category: None] &quot;</span>
<span class="s2">&quot;was found to delete. (Nested lookups attempted)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="c1"># Deaper nesting</span>
@ -1237,8 +1245,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSetAttribute</span><span class="p">(),</span>
<span class="s2">&quot;Obj/test4[0][&#39;one&#39;]&quot;</span><span class="p">,</span>
<span class="s2">&quot;Attribute Obj/test4[0][&#39;one&#39;] [category:None] does not exist. (Nested lookups&quot;</span>
<span class="s2">&quot; attempted)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Attribute Obj/test4[0][&#39;one&#39;] [category:None] does not exist. (Nested lookups&quot;</span>
<span class="s2">&quot; attempted)&quot;</span>
<span class="p">),</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="TestBuilding.test_split_nested_attr"><a class="viewcode-back" href="../../../../api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestBuilding.test_split_nested_attr">[docs]</a> <span class="k">def</span> <span class="nf">test_split_nested_attr</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -1345,8 +1355,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdDestroy</span><span class="p">(),</span>
<span class="s2">&quot;Obj&quot;</span><span class="p">,</span>
<span class="s2">&quot;Could not find &#39;Obj&#39;.| (Objects to destroy &quot;</span>
<span class="s2">&quot;must either be local or specified with a unique #dbref.)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Could not find &#39;Obj&#39;.| (Objects to destroy &quot;</span>
<span class="s2">&quot;must either be local or specified with a unique #dbref.)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="n">settings</span><span class="o">.</span><span class="n">DEFAULT_HOME</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;#</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">room1</span><span class="o">.</span><span class="n">dbid</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
@ -1466,14 +1478,18 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
<span class="s2">&quot;Obj = evennia.objects.objects.DefaultExit&quot;</span><span class="p">,</span>
<span class="s2">&quot;Obj changed typeclass from evennia.objects.objects.DefaultObject &quot;</span>
<span class="s2">&quot;to evennia.objects.objects.DefaultExit.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Obj changed typeclass from evennia.objects.objects.DefaultObject &quot;</span>
<span class="s2">&quot;to evennia.objects.objects.DefaultExit.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
<span class="s2">&quot;Obj2 = evennia.objects.objects.DefaultExit&quot;</span><span class="p">,</span>
<span class="s2">&quot;Obj2 changed typeclass from evennia.objects.objects.DefaultObject &quot;</span>
<span class="s2">&quot;to evennia.objects.objects.DefaultExit.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Obj2 changed typeclass from evennia.objects.objects.DefaultObject &quot;</span>
<span class="s2">&quot;to evennia.objects.objects.DefaultExit.&quot;</span>
<span class="p">),</span>
<span class="n">cmdstring</span><span class="o">=</span><span class="s2">&quot;swap&quot;</span><span class="p">,</span>
<span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;yes&quot;</span><span class="p">],</span>
<span class="p">)</span>
@ -1486,8 +1502,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
<span class="s2">&quot;Obj = evennia.objects.objects.DefaultExit&quot;</span><span class="p">,</span>
<span class="s2">&quot;Obj already has the typeclass &#39;evennia.objects.objects.DefaultExit&#39;. Use /force to&quot;</span>
<span class="s2">&quot; override.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Obj already has the typeclass &#39;evennia.objects.objects.DefaultExit&#39;. Use /force to&quot;</span>
<span class="s2">&quot; override.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
@ -1503,16 +1521,20 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
<span class="s2">&quot;Obj&quot;</span><span class="p">,</span>
<span class="s2">&quot;Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).</span><span class="se">\n</span><span class="s2">Only the&quot;</span>
<span class="s2">&quot; at_object_creation hook was run (update mode). Attributes set before swap were not&quot;</span>
<span class="s2">&quot; removed</span><span class="se">\n</span><span class="s2">(use `swap` or `type/reset` to clear all).&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).</span><span class="se">\n</span><span class="s2">Only&quot;</span>
<span class="s2">&quot; the at_object_creation hook was run (update mode). Attributes set before swap&quot;</span>
<span class="s2">&quot; were not removed</span><span class="se">\n</span><span class="s2">(use `swap` or `type/reset` to clear all).&quot;</span>
<span class="p">),</span>
<span class="n">cmdstring</span><span class="o">=</span><span class="s2">&quot;update&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
<span class="s2">&quot;/reset/force Obj=evennia.objects.objects.DefaultObject&quot;</span><span class="p">,</span>
<span class="s2">&quot;Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="s2">&quot;All object creation hooks were run. All old attributes where deleted before the swap.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).</span><span class="se">\n</span><span class="s2">All&quot;</span>
<span class="s2">&quot; object creation hooks were run. All old attributes where deleted before the swap.&quot;</span>
<span class="p">),</span>
<span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;yes&quot;</span><span class="p">],</span>
<span class="p">)</span>
@ -1536,11 +1558,13 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTypeclass</span><span class="p">(),</span>
<span class="s2">&quot;/prototype Obj=testkey&quot;</span><span class="p">,</span>
<span class="s2">&quot;replaced_obj changed typeclass from evennia.objects.objects.DefaultObject to &quot;</span>
<span class="s2">&quot;typeclasses.objects.Object.</span><span class="se">\n</span><span class="s2">Only the at_object_creation hook was run &quot;</span>
<span class="s2">&quot;(update mode). Attributes set before swap were not removed</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="s2">&quot;(use `swap` or `type/reset` to clear all). Prototype &#39;replaced_obj&#39; was &quot;</span>
<span class="s2">&quot;successfully applied over the object type.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;replaced_obj changed typeclass from evennia.objects.objects.DefaultObject to &quot;</span>
<span class="s2">&quot;typeclasses.objects.Object.</span><span class="se">\n</span><span class="s2">Only the at_object_creation hook was run &quot;</span>
<span class="s2">&quot;(update mode). Attributes set before swap were not removed</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="s2">&quot;(use `swap` or `type/reset` to clear all). Prototype &#39;replaced_obj&#39; was &quot;</span>
<span class="s2">&quot;successfully applied over the object type.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="k">assert</span> <span class="bp">self</span><span class="o">.</span><span class="n">obj1</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">desc</span> <span class="o">==</span> <span class="s2">&quot;protdesc&quot;</span></div>
@ -1557,8 +1581,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdLock</span><span class="p">(),</span>
<span class="s2">&quot;/view Obj = edit:false()&quot;</span><span class="p">,</span>
<span class="s2">&quot;Switch(es) view can not be used with a lock assignment. &quot;</span>
<span class="s2">&quot;Use e.g. lock/del objname/locktype instead.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Switch(es) view can not be used with a lock assignment. &quot;</span>
<span class="s2">&quot;Use e.g. lock/del objname/locktype instead.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">building</span><span class="o">.</span><span class="n">CmdLock</span><span class="p">(),</span> <span class="s2">&quot;Obj = control:false()&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">building</span><span class="o">.</span><span class="n">CmdLock</span><span class="p">(),</span> <span class="s2">&quot;Obj = edit:false()&quot;</span><span class="p">)</span>
@ -1684,9 +1710,11 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdScripts</span><span class="p">(),</span>
<span class="s2">&quot;/delete #</span><span class="si">{}</span><span class="s2">-#</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">script1</span><span class="o">.</span><span class="n">id</span><span class="p">,</span> <span class="n">script3</span><span class="o">.</span><span class="n">id</span><span class="p">),</span>
<span class="sa">f</span><span class="s2">&quot;Global Script Deleted - #</span><span class="si">{</span><span class="n">script1</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2"> (evennia.scripts.scripts.DefaultScript)|&quot;</span>
<span class="sa">f</span><span class="s2">&quot;Global Script Deleted - #</span><span class="si">{</span><span class="n">script2</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2"> (evennia.scripts.scripts.DefaultScript)|&quot;</span>
<span class="sa">f</span><span class="s2">&quot;Global Script Deleted - #</span><span class="si">{</span><span class="n">script3</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2"> (evennia.scripts.scripts.DefaultScript)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Global Script Deleted - #</span><span class="si">{</span><span class="n">script1</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2"> (evennia.scripts.scripts.DefaultScript)|&quot;</span>
<span class="sa">f</span><span class="s2">&quot;Global Script Deleted - #</span><span class="si">{</span><span class="n">script2</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2"> (evennia.scripts.scripts.DefaultScript)|&quot;</span>
<span class="sa">f</span><span class="s2">&quot;Global Script Deleted - #</span><span class="si">{</span><span class="n">script3</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2"> (evennia.scripts.scripts.DefaultScript)&quot;</span>
<span class="p">),</span>
<span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;y&quot;</span><span class="p">],</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertFalse</span><span class="p">(</span><span class="n">script1</span><span class="o">.</span><span class="n">pk</span><span class="p">)</span>
@ -1707,9 +1735,8 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdTeleport</span><span class="p">(),</span>
<span class="s2">&quot;Obj = Room2&quot;</span><span class="p">,</span>
<span class="s2">&quot;Obj(#</span><span class="si">{}</span><span class="s2">) is leaving Room(#</span><span class="si">{}</span><span class="s2">), heading for Room2(#</span><span class="si">{}</span><span class="s2">).|Teleported Obj -&gt; Room2.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="n">oid</span><span class="p">,</span> <span class="n">rid</span><span class="p">,</span> <span class="n">rid2</span>
<span class="p">),</span>
<span class="s2">&quot;Obj(#</span><span class="si">{}</span><span class="s2">) is leaving Room(#</span><span class="si">{}</span><span class="s2">), heading for Room2(#</span><span class="si">{}</span><span class="s2">).|Teleported Obj -&gt; Room2.&quot;</span>
<span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">oid</span><span class="p">,</span> <span class="n">rid</span><span class="p">,</span> <span class="n">rid2</span><span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">building</span><span class="o">.</span><span class="n">CmdTeleport</span><span class="p">(),</span> <span class="s2">&quot;NotFound = Room&quot;</span><span class="p">,</span> <span class="s2">&quot;Could not find &#39;NotFound&#39;.&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
@ -1782,16 +1809,20 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSpawn</span><span class="p">(),</span>
<span class="s2">&quot;/save {&#39;prototype_key&#39;: &#39;testprot&#39;, &#39;key&#39;:&#39;Test Char&#39;, &quot;</span>
<span class="s2">&quot;&#39;typeclass&#39;:&#39;evennia.objects.objects.DefaultCharacter&#39;}&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;/save {&#39;prototype_key&#39;: &#39;testprot&#39;, &#39;key&#39;:&#39;Test Char&#39;, &quot;</span>
<span class="s2">&quot;&#39;typeclass&#39;:&#39;evennia.objects.objects.DefaultCharacter&#39;}&quot;</span>
<span class="p">),</span>
<span class="s2">&quot;Saved prototype: testprot&quot;</span><span class="p">,</span>
<span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;y&quot;</span><span class="p">],</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSpawn</span><span class="p">(),</span>
<span class="s2">&quot;/save testprot2 = {&#39;key&#39;:&#39;Test Char&#39;, &quot;</span>
<span class="s2">&quot;&#39;typeclass&#39;:&#39;evennia.objects.objects.DefaultCharacter&#39;}&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;/save testprot2 = {&#39;key&#39;:&#39;Test Char&#39;, &quot;</span>
<span class="s2">&quot;&#39;typeclass&#39;:&#39;evennia.objects.objects.DefaultCharacter&#39;}&quot;</span>
<span class="p">),</span>
<span class="s2">&quot;(Replacing `prototype_key` in prototype with given key.)|Saved prototype: testprot2&quot;</span><span class="p">,</span>
<span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;y&quot;</span><span class="p">],</span>
<span class="p">)</span>
@ -1802,8 +1833,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSpawn</span><span class="p">(),</span>
<span class="s2">&quot;/save {&#39;key&#39;:&#39;Test Char&#39;, &#39;typeclass&#39;:&#39;evennia.objects.objects.DefaultCharacter&#39;}&quot;</span><span class="p">,</span>
<span class="s2">&quot;A prototype_key must be given, either as `prototype_key = &lt;prototype&gt;` or as &quot;</span>
<span class="s2">&quot;a key &#39;prototype_key&#39; inside the prototype structure.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;A prototype_key must be given, either as `prototype_key = &lt;prototype&gt;` or as &quot;</span>
<span class="s2">&quot;a key &#39;prototype_key&#39; inside the prototype structure.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">building</span><span class="o">.</span><span class="n">CmdSpawn</span><span class="p">(),</span> <span class="s2">&quot;/list&quot;</span><span class="p">,</span> <span class="s2">&quot;Key &quot;</span><span class="p">)</span>
@ -1825,7 +1858,8 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSpawn</span><span class="p">(),</span>
<span class="s2">&quot;{&#39;prototype_key&#39;:&#39;GOBLIN&#39;, &#39;typeclass&#39;:&#39;evennia.objects.objects.DefaultCharacter&#39;, &quot;</span>
<span class="s2">&quot;&#39;key&#39;:&#39;goblin&#39;, &#39;location&#39;:&#39;</span><span class="si">%s</span><span class="s2">&#39;}&quot;</span> <span class="o">%</span> <span class="n">spawnLoc</span><span class="o">.</span><span class="n">dbref</span><span class="p">,</span>
<span class="s2">&quot;&#39;key&#39;:&#39;goblin&#39;, &#39;location&#39;:&#39;</span><span class="si">%s</span><span class="s2">&#39;}&quot;</span>
<span class="o">%</span> <span class="n">spawnLoc</span><span class="o">.</span><span class="n">dbref</span><span class="p">,</span>
<span class="s2">&quot;Spawned goblin&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">goblin</span> <span class="o">=</span> <span class="n">get_object</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;goblin&quot;</span><span class="p">)</span>
@ -1873,7 +1907,8 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">building</span><span class="o">.</span><span class="n">CmdSpawn</span><span class="p">(),</span>
<span class="s2">&quot;/noloc {&#39;prototype_parent&#39;:&#39;TESTBALL&#39;, &#39;key&#39;: &#39;Ball&#39;, &#39;prototype_key&#39;: &#39;foo&#39;,&quot;</span>
<span class="s2">&quot; &#39;location&#39;:&#39;</span><span class="si">%s</span><span class="s2">&#39;}&quot;</span> <span class="o">%</span> <span class="n">spawnLoc</span><span class="o">.</span><span class="n">dbref</span><span class="p">,</span>
<span class="s2">&quot; &#39;location&#39;:&#39;</span><span class="si">%s</span><span class="s2">&#39;}&quot;</span>
<span class="o">%</span> <span class="n">spawnLoc</span><span class="o">.</span><span class="n">dbref</span><span class="p">,</span>
<span class="s2">&quot;Spawned Ball&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">ball</span> <span class="o">=</span> <span class="n">get_object</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;Ball&quot;</span><span class="p">)</span>
@ -2111,8 +2146,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">comms</span><span class="o">.</span><span class="n">CmdPage</span><span class="p">(),</span>
<span class="s2">&quot;TestAccount2 = Test&quot;</span><span class="p">,</span>
<span class="s2">&quot;TestAccount2 is offline. They will see your message if they list their pages later.&quot;</span>
<span class="s2">&quot;|You paged TestAccount2 with: &#39;Test&#39;.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;TestAccount2 is offline. They will see your message if they list their pages&quot;</span>
<span class="s2">&quot; later.|You paged TestAccount2 with: &#39;Test&#39;.&quot;</span>
<span class="p">),</span>
<span class="n">receiver</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">account</span><span class="p">,</span>
<span class="p">)</span></div></div>
@ -2185,8 +2222,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">batchprocess</span><span class="o">.</span><span class="n">CmdBatchCommands</span><span class="p">(),</span>
<span class="s2">&quot;batchprocessor.example_batch_cmds_test&quot;</span><span class="p">,</span>
<span class="s2">&quot;Running Batch-command processor - Automatic mode for&quot;</span>
<span class="s2">&quot; batchprocessor.example_batch_cmds&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Running Batch-command processor - Automatic mode for&quot;</span>
<span class="s2">&quot; batchprocessor.example_batch_cmds&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="c1"># we make sure to delete the button again here to stop the running reactor</span>
<span class="n">confirm</span> <span class="o">=</span> <span class="n">building</span><span class="o">.</span><span class="n">CmdDestroy</span><span class="o">.</span><span class="n">confirm</span>

View file

@ -244,18 +244,12 @@
<span class="kn">import</span> <span class="nn">inflect</span>
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
<span class="kn">from</span> <span class="nn">evennia.commands.cmdset</span> <span class="kn">import</span> <span class="n">CmdSet</span>
<span class="kn">from</span> <span class="nn">evennia.commands.command</span> <span class="kn">import</span> <span class="n">Command</span>
<span class="kn">from</span> <span class="nn">evennia.objects.models</span> <span class="kn">import</span> <span class="n">ObjectDB</span>
<span class="kn">from</span> <span class="nn">evennia.objects.objects</span> <span class="kn">import</span> <span class="n">DefaultCharacter</span><span class="p">,</span> <span class="n">DefaultObject</span>
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">ansi</span><span class="p">,</span> <span class="n">logger</span>
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">iter_to_str</span><span class="p">,</span>
<span class="n">lazy_property</span><span class="p">,</span>
<span class="n">make_iter</span><span class="p">,</span>
<span class="n">variable_from_module</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">iter_to_str</span><span class="p">,</span> <span class="n">lazy_property</span><span class="p">,</span> <span class="n">make_iter</span><span class="p">,</span> <span class="n">variable_from_module</span>
<span class="n">_INFLECT</span> <span class="o">=</span> <span class="n">inflect</span><span class="o">.</span><span class="n">engine</span><span class="p">()</span>
@ -269,7 +263,7 @@
<span class="c1"># The prefix is the (single-character) symbol used to find the start</span>
<span class="c1"># of a object reference, such as /tall (note that</span>
<span class="c1"># the system will understand multi-word references like &#39;/a tall man&#39; too).</span>
<span class="n">_PREFIX</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s1">&#39;RPSYSTEM_EMOTE_PREFIX&#39;</span><span class="p">,</span> <span class="s2">&quot;/&quot;</span><span class="p">)</span>
<span class="n">_PREFIX</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s2">&quot;RPSYSTEM_EMOTE_PREFIX&quot;</span><span class="p">,</span> <span class="s2">&quot;/&quot;</span><span class="p">)</span>
<span class="c1"># The num_sep is the (single-character) symbol used to separate the</span>
<span class="c1"># sdesc from the number when trying to separate identical sdescs from</span>
@ -1407,145 +1401,25 @@
<span class="bp">self</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">pose_default</span> <span class="o">=</span> <span class="s2">&quot;is here.&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">_sdesc</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span></div>
<div class="viewcode-block" id="ContribRPObject.search"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.rpsystem.html#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.search">[docs]</a> <span class="k">def</span> <span class="nf">search</span><span class="p">(</span>
<div class="viewcode-block" id="ContribRPObject.get_search_result"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.rpsystem.html#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.get_search_result">[docs]</a> <span class="k">def</span> <span class="nf">get_search_result</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">searchdata</span><span class="p">,</span>
<span class="n">global_search</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">use_nicks</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">typeclass</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">location</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">attribute_name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">quiet</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">typeclass</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">candidates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">nofound_string</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">multimatch_string</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">use_dbref</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns an Object matching a search string/condition, taking</span>
<span class="sd"> sdescs into account.</span>
<span class="sd"> Perform a standard object search in the database, handling</span>
<span class="sd"> multiple results and lack thereof gracefully. By default, only</span>
<span class="sd"> objects in the current `location` of `self` or its inventory are searched for.</span>
<span class="sd"> Args:</span>
<span class="sd"> searchdata (str or obj): Primary search criterion. Will be matched</span>
<span class="sd"> against `object.key` (with `object.aliases` second) unless</span>
<span class="sd"> the keyword attribute_name specifies otherwise.</span>
<span class="sd"> **Special strings:**</span>
<span class="sd"> - `#&lt;num&gt;`: search by unique dbref. This is always</span>
<span class="sd"> a global search.</span>
<span class="sd"> - `me,self`: self-reference to this object</span>
<span class="sd"> - `&lt;num&gt;-&lt;string&gt;` - can be used to differentiate</span>
<span class="sd"> between multiple same-named matches</span>
<span class="sd"> global_search (bool): Search all objects globally. This is overruled</span>
<span class="sd"> by `location` keyword.</span>
<span class="sd"> use_nicks (bool): Use nickname-replace (nicktype &quot;object&quot;) on `searchdata`.</span>
<span class="sd"> typeclass (str or Typeclass, or list of either): Limit search only</span>
<span class="sd"> to `Objects` with this typeclass. May be a list of typeclasses</span>
<span class="sd"> for a broader search.</span>
<span class="sd"> location (Object or list): Specify a location or multiple locations</span>
<span class="sd"> to search. Note that this is used to query the *contents* of a</span>
<span class="sd"> location and will not match for the location itself -</span>
<span class="sd"> if you want that, don&#39;t set this or use `candidates` to specify</span>
<span class="sd"> exactly which objects should be searched.</span>
<span class="sd"> attribute_name (str): Define which property to search. If set, no</span>
<span class="sd"> key+alias search will be performed. This can be used</span>
<span class="sd"> to search database fields (db_ will be automatically</span>
<span class="sd"> appended), and if that fails, it will try to return</span>
<span class="sd"> objects having Attributes with this name and value</span>
<span class="sd"> equal to searchdata. A special use is to search for</span>
<span class="sd"> &quot;key&quot; here if you want to do a key-search without</span>
<span class="sd"> including aliases.</span>
<span class="sd"> quiet (bool): don&#39;t display default error messages - this tells the</span>
<span class="sd"> search method that the user wants to handle all errors</span>
<span class="sd"> themselves. It also changes the return value type, see</span>
<span class="sd"> below.</span>
<span class="sd"> exact (bool): if unset (default) - prefers to match to beginning of</span>
<span class="sd"> string rather than not matching at all. If set, requires</span>
<span class="sd"> exact matching of entire string.</span>
<span class="sd"> candidates (list of objects): this is an optional custom list of objects</span>
<span class="sd"> to search (filter) between. It is ignored if `global_search`</span>
<span class="sd"> is given. If not set, this list will automatically be defined</span>
<span class="sd"> to include the location, the contents of location and the</span>
<span class="sd"> caller&#39;s contents (inventory).</span>
<span class="sd"> nofound_string (str): optional custom string for not-found error message.</span>
<span class="sd"> multimatch_string (str): optional custom string for multimatch error header.</span>
<span class="sd"> use_dbref (bool or None): If None, only turn off use_dbref if we are of a lower</span>
<span class="sd"> permission than Builder. Otherwise, honor the True/False value.</span>
<span class="sd"> Returns:</span>
<span class="sd"> match (Object, None or list): will return an Object/None if `quiet=False`,</span>
<span class="sd"> otherwise it will return a list of 0, 1 or more matches.</span>
<span class="sd"> Notes:</span>
<span class="sd"> To find Accounts, use eg. `evennia.account_search`. If</span>
<span class="sd"> `quiet=False`, error messages will be handled by</span>
<span class="sd"> `settings.SEARCH_AT_RESULT` and echoed automatically (on</span>
<span class="sd"> error, return will be `None`). If `quiet=True`, the error</span>
<span class="sd"> messaging is assumed to be handled by the caller.</span>
<span class="sd"> Override of the parent method for producing search results that understands sdescs.</span>
<span class="sd"> These are used in the main .search() method of the parent class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">is_string</span> <span class="o">=</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span>
<span class="k">if</span> <span class="n">is_string</span><span class="p">:</span>
<span class="c1"># searchdata is a string; wrap some common self-references</span>
<span class="k">if</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;here&quot;</span><span class="p">,):</span>
<span class="k">return</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">location</span><span class="p">]</span> <span class="k">if</span> <span class="n">quiet</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">location</span>
<span class="k">if</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;me&quot;</span><span class="p">,</span> <span class="s2">&quot;self&quot;</span><span class="p">):</span>
<span class="k">return</span> <span class="p">[</span><span class="bp">self</span><span class="p">]</span> <span class="k">if</span> <span class="n">quiet</span> <span class="k">else</span> <span class="bp">self</span>
<span class="k">if</span> <span class="n">use_nicks</span><span class="p">:</span>
<span class="c1"># do nick-replacement on search</span>
<span class="n">searchdata</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">nicks</span><span class="o">.</span><span class="n">nickreplace</span><span class="p">(</span>
<span class="n">searchdata</span><span class="p">,</span> <span class="n">categories</span><span class="o">=</span><span class="p">(</span><span class="s2">&quot;object&quot;</span><span class="p">,</span> <span class="s2">&quot;account&quot;</span><span class="p">),</span> <span class="n">include_account</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">global_search</span> <span class="ow">or</span> <span class="p">(</span>
<span class="n">is_string</span>
<span class="ow">and</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;#&quot;</span><span class="p">)</span>
<span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">searchdata</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span>
<span class="ow">and</span> <span class="n">searchdata</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span><span class="o">.</span><span class="n">isdigit</span><span class="p">()</span>
<span class="p">):</span>
<span class="c1"># only allow exact matching if searching the entire database</span>
<span class="c1"># or unique #dbrefs</span>
<span class="n">exact</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">elif</span> <span class="n">candidates</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># no custom candidates given - get them automatically</span>
<span class="k">if</span> <span class="n">location</span><span class="p">:</span>
<span class="c1"># location(s) were given</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">make_iter</span><span class="p">(</span><span class="n">location</span><span class="p">):</span>
<span class="n">candidates</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">obj</span><span class="o">.</span><span class="n">contents</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># local search. Candidates are taken from</span>
<span class="c1"># self.contents, self.location and</span>
<span class="c1"># self.location.contents</span>
<span class="n">location</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">location</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">contents</span>
<span class="k">if</span> <span class="n">location</span><span class="p">:</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="n">candidates</span> <span class="o">+</span> <span class="p">[</span><span class="n">location</span><span class="p">]</span> <span class="o">+</span> <span class="n">location</span><span class="o">.</span><span class="n">contents</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># normally we don&#39;t need this since we are</span>
<span class="c1"># included in location.contents</span>
<span class="n">candidates</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="c1"># the sdesc-related substitution</span>
<span class="c1"># we also want to use the default search method</span>
<span class="n">search_obj</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">get_search_result</span>
<span class="n">is_builder</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">locks</span><span class="o">.</span><span class="n">check_lockstring</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;perm(Builder)&quot;</span><span class="p">)</span>
<span class="n">use_dbref</span> <span class="o">=</span> <span class="n">is_builder</span> <span class="k">if</span> <span class="n">use_dbref</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">use_dbref</span>
<span class="k">def</span> <span class="nf">search_obj</span><span class="p">(</span><span class="n">string</span><span class="p">):</span>
<span class="s2">&quot;helper wrapper for searching&quot;</span>
<span class="k">return</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">object_search</span><span class="p">(</span>
<span class="n">string</span><span class="p">,</span>
<span class="n">attribute_name</span><span class="o">=</span><span class="n">attribute_name</span><span class="p">,</span>
<span class="n">typeclass</span><span class="o">=</span><span class="n">typeclass</span><span class="p">,</span>
<span class="n">candidates</span><span class="o">=</span><span class="n">candidates</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="n">exact</span><span class="p">,</span>
<span class="n">use_dbref</span><span class="o">=</span><span class="n">use_dbref</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">candidates</span><span class="p">:</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="n">parse_sdescs_and_recogs</span><span class="p">(</span>
@ -1568,16 +1442,7 @@
<span class="c1"># only done in code, so is controlled, #dbrefs are turned off</span>
<span class="c1"># for non-Builders.</span>
<span class="n">results</span> <span class="o">=</span> <span class="n">search_obj</span><span class="p">(</span><span class="n">searchdata</span><span class="p">)</span>
<span class="k">if</span> <span class="n">quiet</span><span class="p">:</span>
<span class="k">return</span> <span class="n">results</span>
<span class="k">return</span> <span class="n">_AT_SEARCH_RESULT</span><span class="p">(</span>
<span class="n">results</span><span class="p">,</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">query</span><span class="o">=</span><span class="n">searchdata</span><span class="p">,</span>
<span class="n">nofound_string</span><span class="o">=</span><span class="n">nofound_string</span><span class="p">,</span>
<span class="n">multimatch_string</span><span class="o">=</span><span class="n">multimatch_string</span><span class="p">,</span>
<span class="p">)</span></div>
<span class="k">return</span> <span class="n">results</span></div>
<div class="viewcode-block" id="ContribRPObject.get_posed_sdesc"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.rpsystem.html#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.get_posed_sdesc">[docs]</a> <span class="k">def</span> <span class="nf">get_posed_sdesc</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sdesc</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>

View file

@ -95,8 +95,7 @@
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">anything</span> <span class="kn">import</span> <span class="n">Anything</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">create_object</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">DefaultObject</span><span class="p">,</span> <span class="n">create_object</span><span class="p">,</span> <span class="n">default_cmds</span>
<span class="kn">from</span> <span class="nn">evennia.commands.default.tests</span> <span class="kn">import</span> <span class="n">BaseEvenniaCommandTest</span>
<span class="kn">from</span> <span class="nn">evennia.utils.test_resources</span> <span class="kn">import</span> <span class="n">BaseEvenniaTest</span>
@ -247,12 +246,11 @@
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="n">rpsystem</span><span class="o">.</span><span class="n">parse_language</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">speaker</span><span class="p">,</span> <span class="n">language_emote</span><span class="p">),</span>
<span class="p">(</span>
<span class="s1">&#39;For a change of pace, /me says, {##0}&#39;</span><span class="p">,</span>
<span class="p">{</span><span class="s2">&quot;##0&quot;</span><span class="p">:</span> <span class="p">(</span><span class="s1">&#39;elvish&#39;</span><span class="p">,</span> <span class="s1">&#39;&quot;This is in elvish!&quot;&#39;</span><span class="p">)},</span>
<span class="s2">&quot;For a change of pace, /me says, {##0}&quot;</span><span class="p">,</span>
<span class="p">{</span><span class="s2">&quot;##0&quot;</span><span class="p">:</span> <span class="p">(</span><span class="s2">&quot;elvish&quot;</span><span class="p">,</span> <span class="s1">&#39;&quot;This is in elvish!&quot;&#39;</span><span class="p">)},</span>
<span class="p">),</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="TestRPSystem.test_parse_sdescs_and_recogs"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.tests.html#evennia.contrib.rpg.rpsystem.tests.TestRPSystem.test_parse_sdescs_and_recogs">[docs]</a> <span class="k">def</span> <span class="nf">test_parse_sdescs_and_recogs</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">speaker</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">speaker</span>
<span class="n">speaker</span><span class="o">.</span><span class="n">sdesc</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">sdesc0</span><span class="p">)</span>
@ -341,18 +339,24 @@
<span class="n">rpsystem</span><span class="o">.</span><span class="n">send_emote</span><span class="p">(</span><span class="n">speaker</span><span class="p">,</span> <span class="n">receivers</span><span class="p">,</span> <span class="n">emote</span><span class="p">,</span> <span class="n">case_sensitive</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out0</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;With a flair, |mSender|n looks at |bThe first receiver of emotes.|n &quot;</span>
<span class="s1">&#39;and |bAnother nice colliding sdesc-guy for tests|n. She says |w&quot;This is a test.&quot;|n&#39;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;With a flair, |mSender|n looks at |bThe first receiver of emotes.|n &quot;</span>
<span class="s1">&#39;and |bAnother nice colliding sdesc-guy for tests|n. She says |w&quot;This is a test.&quot;|n&#39;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out1</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;With a flair, |bA nice sender of emotes|n looks at |mReceiver1|n and &quot;</span>
<span class="s1">&#39;|bAnother nice colliding sdesc-guy for tests|n. She says |w&quot;This is a test.&quot;|n&#39;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;With a flair, |bA nice sender of emotes|n looks at |mReceiver1|n and &quot;</span>
<span class="s1">&#39;|bAnother nice colliding sdesc-guy for tests|n. She says |w&quot;This is a test.&quot;|n&#39;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out2</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;With a flair, |bA nice sender of emotes|n looks at |bThe first &quot;</span>
<span class="s1">&#39;receiver of emotes.|n and |mReceiver2|n. She says |w&quot;This is a test.&quot;|n&#39;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;With a flair, |bA nice sender of emotes|n looks at |bThe first &quot;</span>
<span class="s1">&#39;receiver of emotes.|n and |mReceiver2|n. She says |w&quot;This is a test.&quot;|n&#39;</span>
<span class="p">),</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="TestRPSystem.test_send_emote_fallback"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.tests.html#evennia.contrib.rpg.rpsystem.tests.TestRPSystem.test_send_emote_fallback">[docs]</a> <span class="k">def</span> <span class="nf">test_send_emote_fallback</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -377,8 +381,10 @@
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out2</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;|bA nice sender of emotes|n is distracted from |bthe first receiver of emotes.|n by&quot;</span>
<span class="s2">&quot; something.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;|bA nice sender of emotes|n is distracted from |bthe first receiver of emotes.|n&quot;</span>
<span class="s2">&quot; by something.&quot;</span>
<span class="p">),</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="TestRPSystem.test_send_case_sensitive_emote"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.tests.html#evennia.contrib.rpg.rpsystem.tests.TestRPSystem.test_send_case_sensitive_emote">[docs]</a> <span class="k">def</span> <span class="nf">test_send_case_sensitive_emote</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -396,21 +402,27 @@
<span class="n">rpsystem</span><span class="o">.</span><span class="n">send_emote</span><span class="p">(</span><span class="n">speaker</span><span class="p">,</span> <span class="n">receivers</span><span class="p">,</span> <span class="n">case_emote</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out0</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;|mSender|n looks at |bthe first receiver of emotes.|n. Then, |mSender|n &quot;</span>
<span class="s2">&quot;looks at |bTHE FIRST RECEIVER OF EMOTES.|n, |bThe first receiver of emotes.|n &quot;</span>
<span class="s2">&quot;and |bAnother nice colliding sdesc-guy for tests|n twice.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;|mSender|n looks at |bthe first receiver of emotes.|n. Then, |mSender|n &quot;</span>
<span class="s2">&quot;looks at |bTHE FIRST RECEIVER OF EMOTES.|n, |bThe first receiver of emotes.|n &quot;</span>
<span class="s2">&quot;and |bAnother nice colliding sdesc-guy for tests|n twice.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out1</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;|bA nice sender of emotes|n looks at |mReceiver1|n. Then, &quot;</span>
<span class="s2">&quot;|ba nice sender of emotes|n looks at |mReceiver1|n, |mReceiver1|n &quot;</span>
<span class="s2">&quot;and |bAnother nice colliding sdesc-guy for tests|n twice.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;|bA nice sender of emotes|n looks at |mReceiver1|n. Then, &quot;</span>
<span class="s2">&quot;|ba nice sender of emotes|n looks at |mReceiver1|n, |mReceiver1|n &quot;</span>
<span class="s2">&quot;and |bAnother nice colliding sdesc-guy for tests|n twice.&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">out2</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;|bA nice sender of emotes|n looks at |bthe first receiver of emotes.|n. &quot;</span>
<span class="s2">&quot;Then, |ba nice sender of emotes|n looks at |bTHE FIRST RECEIVER OF EMOTES.|n, &quot;</span>
<span class="s2">&quot;|bThe first receiver of emotes.|n and |mReceiver2|n twice.&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;|bA nice sender of emotes|n looks at |bthe first receiver of emotes.|n. &quot;</span>
<span class="s2">&quot;Then, |ba nice sender of emotes|n looks at |bTHE FIRST RECEIVER OF EMOTES.|n, &quot;</span>
<span class="s2">&quot;|bThe first receiver of emotes.|n and |mReceiver2|n twice.&quot;</span>
<span class="p">),</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="TestRPSystem.test_rpsearch"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.tests.html#evennia.contrib.rpg.rpsystem.tests.TestRPSystem.test_rpsearch">[docs]</a> <span class="k">def</span> <span class="nf">test_rpsearch</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -461,8 +473,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">rpsystem</span><span class="o">.</span><span class="n">CmdRecog</span><span class="p">(),</span>
<span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;Currently recognized (use &#39;recog &lt;sdesc&gt; as &lt;alias&gt;&#39; to add new &quot;</span>
<span class="s2">&quot;and &#39;forget &lt;alias&gt;&#39; to remove):</span><span class="se">\n</span><span class="s2"> friend (BarFoo Character)&quot;</span><span class="p">,</span>
<span class="p">(</span>
<span class="s2">&quot;Currently recognized (use &#39;recog &lt;sdesc&gt; as &lt;alias&gt;&#39; to add new &quot;</span>
<span class="s2">&quot;and &#39;forget &lt;alias&gt;&#39; to remove):</span><span class="se">\n</span><span class="s2"> friend (BarFoo Character)&quot;</span>
<span class="p">),</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
<span class="n">rpsystem</span><span class="o">.</span><span class="n">CmdRecog</span><span class="p">(),</span>
@ -471,7 +485,35 @@
<span class="n">cmdstring</span><span class="o">=</span><span class="s2">&quot;forget&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">rpsystem</span><span class="o">.</span><span class="n">CmdSdesc</span><span class="p">(),</span> <span class="s2">&quot;clear&quot;</span><span class="p">,</span> <span class="s1">&#39;Cleared sdesc, using name &quot;Char&quot;.&#39;</span><span class="p">,</span> <span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">])</span></div></div>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">rpsystem</span><span class="o">.</span><span class="n">CmdSdesc</span><span class="p">(),</span> <span class="s2">&quot;clear&quot;</span><span class="p">,</span> <span class="s1">&#39;Cleared sdesc, using name &quot;Char&quot;.&#39;</span><span class="p">,</span> <span class="n">inputs</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;Y&quot;</span><span class="p">])</span></div>
<div class="viewcode-block" id="TestRPSystemCommands.test_multi_match_search"><a class="viewcode-back" href="../../../../../api/evennia.contrib.rpg.rpsystem.tests.html#evennia.contrib.rpg.rpsystem.tests.TestRPSystemCommands.test_multi_match_search">[docs]</a> <span class="k">def</span> <span class="nf">test_multi_match_search</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Test that the multi-match search works as expected</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">mushroom1</span> <span class="o">=</span> <span class="n">create_object</span><span class="p">(</span><span class="n">rpsystem</span><span class="o">.</span><span class="n">ContribRPObject</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">&quot;Mushroom&quot;</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">room1</span><span class="p">)</span>
<span class="n">mushroom1</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">desc</span> <span class="o">=</span> <span class="s2">&quot;The first mushroom is brown.&quot;</span>
<span class="n">mushroom2</span> <span class="o">=</span> <span class="n">create_object</span><span class="p">(</span><span class="n">rpsystem</span><span class="o">.</span><span class="n">ContribRPObject</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">&quot;Mushroom&quot;</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">room1</span><span class="p">)</span>
<span class="n">mushroom2</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">desc</span> <span class="o">=</span> <span class="s2">&quot;The second mushroom is red.&quot;</span>
<span class="c1"># check locations and contents</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">char1</span><span class="o">.</span><span class="n">location</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">room1</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertTrue</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">room1</span><span class="o">.</span><span class="n">contents</span><span class="p">)</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="nb">set</span><span class="p">([</span><span class="n">mushroom1</span><span class="p">,</span> <span class="n">mushroom2</span><span class="p">])))</span>
<span class="n">expected_first_call</span> <span class="o">=</span> <span class="p">[</span>
<span class="s2">&quot;More than one match for &#39;Mushroom&#39; (please narrow target):&quot;</span><span class="p">,</span>
<span class="sa">f</span><span class="s2">&quot; Mushroom(</span><span class="si">{</span><span class="n">mushroom1</span><span class="o">.</span><span class="n">dbref</span><span class="si">}</span><span class="s2">)-1 []&quot;</span><span class="p">,</span>
<span class="sa">f</span><span class="s2">&quot; Mushroom(</span><span class="si">{</span><span class="n">mushroom2</span><span class="o">.</span><span class="n">dbref</span><span class="si">}</span><span class="s2">)-2 []&quot;</span><span class="p">,</span>
<span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">default_cmds</span><span class="o">.</span><span class="n">CmdLook</span><span class="p">(),</span> <span class="s2">&quot;Mushroom&quot;</span><span class="p">,</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">expected_first_call</span><span class="p">))</span> <span class="c1"># PASSES</span>
<span class="n">expected_second_call</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;Mushroom(</span><span class="si">{</span><span class="n">mushroom1</span><span class="o">.</span><span class="n">dbref</span><span class="si">}</span><span class="s2">)</span><span class="se">\n</span><span class="s2">The first mushroom is brown.&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">default_cmds</span><span class="o">.</span><span class="n">CmdLook</span><span class="p">(),</span> <span class="s2">&quot;Mushroom-1&quot;</span><span class="p">,</span> <span class="n">expected_second_call</span><span class="p">)</span> <span class="c1"># FAILS</span>
<span class="n">expected_third_call</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;Mushroom(</span><span class="si">{</span><span class="n">mushroom2</span><span class="o">.</span><span class="n">dbref</span><span class="si">}</span><span class="s2">)</span><span class="se">\n</span><span class="s2">The second mushroom is red.&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">default_cmds</span><span class="o">.</span><span class="n">CmdLook</span><span class="p">(),</span> <span class="s2">&quot;Mushroom-2&quot;</span><span class="p">,</span> <span class="n">expected_third_call</span><span class="p">)</span> <span class="c1"># FAILS</span></div></div>
</pre></div>
</div>

View file

@ -116,6 +116,7 @@
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">ansi</span><span class="p">,</span> <span class="n">create</span><span class="p">,</span> <span class="n">funcparser</span><span class="p">,</span> <span class="n">logger</span><span class="p">,</span> <span class="n">search</span>
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">class_from_module</span><span class="p">,</span>
<span class="n">dbref</span><span class="p">,</span>
<span class="n">is_iter</span><span class="p">,</span>
<span class="n">iter_to_str</span><span class="p">,</span>
<span class="n">lazy_property</span><span class="p">,</span>
@ -416,7 +417,213 @@
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">[</span><span class="n">exi</span> <span class="k">for</span> <span class="n">exi</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">contents</span> <span class="k">if</span> <span class="n">exi</span><span class="o">.</span><span class="n">destination</span><span class="p">]</span>
<span class="c1"># main methods</span>
<span class="c1"># search methods and hooks</span>
<div class="viewcode-block" id="DefaultObject.get_search_query_replacement"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_query_replacement">[docs]</a> <span class="k">def</span> <span class="nf">get_search_query_replacement</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">searchdata</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This method is called by the search method to allow for direct</span>
<span class="sd"> replacements of the search string before it is used in the search.</span>
<span class="sd"> Args:</span>
<span class="sd"> searchdata (str): The search string to replace.</span>
<span class="sd"> **kwargs (any): These are the same as passed to the `search` method.</span>
<span class="sd"> Returns:</span>
<span class="sd"> str: The (potentially modified) search string.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;use_nicks&quot;</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">nicks</span><span class="o">.</span><span class="n">nickreplace</span><span class="p">(</span>
<span class="n">searchdata</span><span class="p">,</span> <span class="n">categories</span><span class="o">=</span><span class="p">(</span><span class="s2">&quot;object&quot;</span><span class="p">,</span> <span class="s2">&quot;account&quot;</span><span class="p">),</span> <span class="n">include_account</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">searchdata</span></div>
<div class="viewcode-block" id="DefaultObject.get_search_direct_match"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_direct_match">[docs]</a> <span class="k">def</span> <span class="nf">get_search_direct_match</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">searchdata</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This method is called by the search method to allow for direct</span>
<span class="sd"> replacements, such as &#39;me&#39; always being an alias for this object.</span>
<span class="sd"> Args:</span>
<span class="sd"> searchdata (str): The search string to replace.</span>
<span class="sd"> **kwargs (any): These are the same as passed to the `search` method.</span>
<span class="sd"> Returns:</span>
<span class="sd"> tuple: `(should_return, str or Obj)`, where `should_return` is a boolean indicating</span>
<span class="sd"> the `.search` method should return the result immediately without further</span>
<span class="sd"> processing. If `should_return` is `True`, the second element of the tuple is the result</span>
<span class="sd"> that is returned.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
<span class="k">match</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">lower</span><span class="p">():</span>
<span class="k">case</span> <span class="s2">&quot;me&quot;</span> <span class="o">|</span> <span class="s2">&quot;self&quot;</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">True</span><span class="p">,</span> <span class="bp">self</span>
<span class="k">case</span> <span class="s2">&quot;here&quot;</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">True</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">location</span>
<span class="k">return</span> <span class="kc">False</span><span class="p">,</span> <span class="n">searchdata</span></div>
<div class="viewcode-block" id="DefaultObject.get_search_candidates"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_candidates">[docs]</a> <span class="k">def</span> <span class="nf">get_search_candidates</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">searchdata</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the candidates for a search. Also the `candidates` provided to the</span>
<span class="sd"> search function is included, and could be modified in-place here.</span>
<span class="sd"> Args:</span>
<span class="sd"> searchdata (str): The search criterion (could be modified by `get_search_query_replacement`).</span>
<span class="sd"> **kwargs (any): These are the same as passed to the `search` method.</span>
<span class="sd"> Returns:</span>
<span class="sd"> list: A list of objects to search between.</span>
<span class="sd"> Notes:</span>
<span class="sd"> If `searchdata` is a #dbref, this method should always return `None`. This is because</span>
<span class="sd"> the search should always be global in this case. If `candidates` were already given,</span>
<span class="sd"> they should be used as is. If `location` was given, the candidates should be based on</span>
<span class="sd"> that.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;global_search&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="n">dbref</span><span class="p">(</span><span class="n">searchdata</span><span class="p">):</span>
<span class="c1"># global searches (dbref-searches are always global too) should not have any candidates</span>
<span class="k">return</span> <span class="kc">None</span>
<span class="c1"># if candidates were already given, use them</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;candidates&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">candidates</span><span class="p">:</span>
<span class="k">return</span> <span class="n">candidates</span>
<span class="c1"># find candidates based on location</span>
<span class="n">location</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;location&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">location</span><span class="p">:</span>
<span class="c1"># location(s) were given</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">make_iter</span><span class="p">(</span><span class="n">location</span><span class="p">):</span>
<span class="n">candidates</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">obj</span><span class="o">.</span><span class="n">contents</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># local search. Candidates are taken from</span>
<span class="c1"># self.contents, self.location and</span>
<span class="c1"># self.location.contents</span>
<span class="n">location</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">location</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">contents</span>
<span class="k">if</span> <span class="n">location</span><span class="p">:</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="n">candidates</span> <span class="o">+</span> <span class="p">[</span><span class="n">location</span><span class="p">]</span> <span class="o">+</span> <span class="n">location</span><span class="o">.</span><span class="n">contents</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># normally we don&#39;t need this since we are</span>
<span class="c1"># included in location.contents</span>
<span class="n">candidates</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="k">return</span> <span class="n">candidates</span></div>
<div class="viewcode-block" id="DefaultObject.get_search_result"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_result">[docs]</a> <span class="k">def</span> <span class="nf">get_search_result</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">searchdata</span><span class="p">,</span>
<span class="n">attribute_name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">typeclass</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">candidates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">use_dbref</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This is a wrapper for actually searching for objects, used by the `search` method.</span>
<span class="sd"> This is broken out into a separate method to allow for easier overriding in child classes.</span>
<span class="sd"> Args:</span>
<span class="sd"> searchdata (str): The search criterion.</span>
<span class="sd"> attribute_name (str): The attribute to search on (default is `.</span>
<span class="sd"> typeclass (Typeclass or list): The typeclass to search for.</span>
<span class="sd"> candidates (list): A list of objects to search between.</span>
<span class="sd"> exact (bool): Require exact match.</span>
<span class="sd"> use_dbref (bool): Allow dbref search.</span>
<span class="sd"> tags (list): Tags to search for.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">search_object</span><span class="p">(</span>
<span class="n">searchdata</span><span class="p">,</span>
<span class="n">attribute_name</span><span class="o">=</span><span class="n">attribute_name</span><span class="p">,</span>
<span class="n">typeclass</span><span class="o">=</span><span class="n">typeclass</span><span class="p">,</span>
<span class="n">candidates</span><span class="o">=</span><span class="n">candidates</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="n">exact</span><span class="p">,</span>
<span class="n">use_dbref</span><span class="o">=</span><span class="n">use_dbref</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="n">tags</span><span class="p">,</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="DefaultObject.get_stacked_results"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_stacked_results">[docs]</a> <span class="k">def</span> <span class="nf">get_stacked_results</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">results</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This method is called by the search method to allow for handling of multi-match</span>
<span class="sd"> results that should be stacked.</span>
<span class="sd"> Args:</span>
<span class="sd"> results (list): The list of results from the search.</span>
<span class="sd"> Returns:</span>
<span class="sd"> tuple: `(stacked, results)`, where `stacked` is a boolean indicating if the</span>
<span class="sd"> result is stacked and `results` is the list of results to return. If `stacked`</span>
<span class="sd"> is True, the &quot;.search&quot; method will return `results` immediately without further</span>
<span class="sd"> processing (it will not result in a multimatch-error).</span>
<span class="sd"> Notes:</span>
<span class="sd"> The `stacked` keyword argument is an integer that controls the max size of each stack</span>
<span class="sd"> (if &gt;0). It&#39;s important to make sure to only stack _identical_ objects, otherwise we</span>
<span class="sd"> risk losing track of objects.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">nresults</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">results</span><span class="p">)</span>
<span class="n">max_stack_size</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;stacked&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="n">typeclass</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;typeclass&quot;</span><span class="p">)</span>
<span class="n">exact</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;exact&quot;</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="k">if</span> <span class="n">max_stack_size</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">nresults</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">nstack</span> <span class="o">=</span> <span class="n">nresults</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">exact</span><span class="p">:</span>
<span class="c1"># we re-run exact match against one of the matches to make sure all are indeed</span>
<span class="c1"># equal and we were not catching partial matches not belonging to the stack</span>
<span class="n">nstack</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span>
<span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">get_objs_with_key_or_alias</span><span class="p">(</span>
<span class="n">results</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">key</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">candidates</span><span class="o">=</span><span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">),</span>
<span class="n">typeclasses</span><span class="o">=</span><span class="p">[</span><span class="n">typeclass</span><span class="p">]</span> <span class="k">if</span> <span class="n">typeclass</span> <span class="k">else</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">)</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">nstack</span> <span class="o">==</span> <span class="n">nresults</span><span class="p">:</span>
<span class="c1"># a valid stack of identical items, return multiple results</span>
<span class="k">return</span> <span class="kc">True</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">)[:</span><span class="n">max_stack_size</span><span class="p">]</span>
<span class="k">return</span> <span class="kc">False</span><span class="p">,</span> <span class="n">results</span></div>
<div class="viewcode-block" id="DefaultObject.handle_search_results"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.handle_search_results">[docs]</a> <span class="k">def</span> <span class="nf">handle_search_results</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">searchdata</span><span class="p">,</span> <span class="n">results</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This method is called by the search method to allow for handling of the final search result.</span>
<span class="sd"> Args:</span>
<span class="sd"> searchdata (str): The original search criterion (potentially modified by</span>
<span class="sd"> `get_search_query_replacement`).</span>
<span class="sd"> results (list): The list of results from the search.</span>
<span class="sd"> **kwargs (any): These are the same as passed to the `search` method.</span>
<span class="sd"> Returns:</span>
<span class="sd"> Object, None or list: Normally this is a single object, but if `quiet=True` it should be</span>
<span class="sd"> a list. If quiet=False and we have to handle a no/multi-match error (directly messaging</span>
<span class="sd"> the user), this should return `None`.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;quiet&quot;</span><span class="p">):</span>
<span class="c1"># don&#39;t care about no/multi-match errors, just return list of whatever we have</span>
<span class="k">return</span> <span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">)</span>
<span class="c1"># handle any error messages, otherwise return a single result</span>
<span class="n">nofound_string</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;nofound_string&quot;</span><span class="p">)</span>
<span class="n">multimatch_string</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;multimatch_string&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">_AT_SEARCH_RESULT</span><span class="p">(</span>
<span class="n">results</span><span class="p">,</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">query</span><span class="o">=</span><span class="n">searchdata</span><span class="p">,</span>
<span class="n">nofound_string</span><span class="o">=</span><span class="n">nofound_string</span><span class="p">,</span>
<span class="n">multimatch_string</span><span class="o">=</span><span class="n">multimatch_string</span><span class="p">,</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="DefaultObject.search"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.search">[docs]</a> <span class="k">def</span> <span class="nf">search</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
@ -501,10 +708,10 @@
<span class="sd"> more tag definitions on the form `tagname` or `(tagname, tagcategory)`.</span>
<span class="sd"> stacked (int, optional): If &gt; 0, multimatches will be analyzed to determine if they</span>
<span class="sd"> only contains identical objects; these are then assumed &#39;stacked&#39; and no multi-match</span>
<span class="sd"> error will be generated, instead `stacked` number of matches will be returned. If</span>
<span class="sd"> `stacked` is larger than number of matches, returns that number of matches. If</span>
<span class="sd"> the found stack is a mix of objects, return None and handle the multi-match</span>
<span class="sd"> error depending on the value of `quiet`.</span>
<span class="sd"> error will be generated, instead `stacked` number of matches will be returned as a</span>
<span class="sd"> list. If `stacked` is larger than number of matches, returns that number of matches.</span>
<span class="sd"> If the found stack is a mix of objects, return None and handle the multi-match error</span>
<span class="sd"> depending on the value of `quiet`.</span>
<span class="sd"> Returns:</span>
<span class="sd"> Object, None or list: Will return an `Object` or `None` if `quiet=False`. Will return</span>
@ -519,59 +726,40 @@
<span class="sd"> messaging is assumed to be handled by the caller.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">is_string</span> <span class="o">=</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span>
<span class="c1"># store input kwargs for sub-methods (this must be done first in this method)</span>
<span class="n">input_kwargs</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">key</span><span class="p">:</span> <span class="n">value</span> <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">locals</span><span class="p">()</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="k">if</span> <span class="n">key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;self&quot;</span><span class="p">,</span> <span class="s2">&quot;searchdata&quot;</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">if</span> <span class="n">is_string</span><span class="p">:</span>
<span class="c1"># searchdata is a string; wrap some common self-references</span>
<span class="k">if</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;here&quot;</span><span class="p">,):</span>
<span class="k">return</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">location</span><span class="p">]</span> <span class="k">if</span> <span class="n">quiet</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">location</span>
<span class="k">if</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;me&quot;</span><span class="p">,</span> <span class="s2">&quot;self&quot;</span><span class="p">):</span>
<span class="k">return</span> <span class="p">[</span><span class="bp">self</span><span class="p">]</span> <span class="k">if</span> <span class="n">quiet</span> <span class="k">else</span> <span class="bp">self</span>
<span class="c1"># replace incoming searchdata string with a potentially modified version</span>
<span class="n">searchdata</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_search_query_replacement</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="o">**</span><span class="n">input_kwargs</span><span class="p">)</span>
<span class="k">if</span> <span class="n">use_dbref</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">use_dbref</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">locks</span><span class="o">.</span><span class="n">check_lockstring</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;_dummy:perm(Builder)&quot;</span><span class="p">)</span>
<span class="c1"># handle special input strings, like &quot;me&quot; or &quot;here&quot;.</span>
<span class="n">should_return</span><span class="p">,</span> <span class="n">searchdata</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_search_direct_match</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="o">**</span><span class="n">input_kwargs</span><span class="p">)</span>
<span class="k">if</span> <span class="n">should_return</span><span class="p">:</span>
<span class="c1"># we got an actual result, return it immediately</span>
<span class="k">return</span> <span class="p">[</span><span class="n">searchdata</span><span class="p">]</span> <span class="k">if</span> <span class="n">quiet</span> <span class="k">else</span> <span class="n">searchdata</span>
<span class="k">if</span> <span class="n">use_nicks</span><span class="p">:</span>
<span class="c1"># do nick-replacement on search</span>
<span class="n">searchdata</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">nicks</span><span class="o">.</span><span class="n">nickreplace</span><span class="p">(</span>
<span class="n">searchdata</span><span class="p">,</span> <span class="n">categories</span><span class="o">=</span><span class="p">(</span><span class="s2">&quot;object&quot;</span><span class="p">,</span> <span class="s2">&quot;account&quot;</span><span class="p">),</span> <span class="n">include_account</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span>
<span class="c1"># if use_dbref is None, we use a lock to determine if dbref search is allowed</span>
<span class="n">use_dbref</span> <span class="o">=</span> <span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">locks</span><span class="o">.</span><span class="n">check_lockstring</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;_dummy:perm(Builder)&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">use_dbref</span> <span class="ow">is</span> <span class="kc">None</span>
<span class="k">else</span> <span class="n">use_dbref</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">global_search</span> <span class="ow">or</span> <span class="p">(</span>
<span class="n">is_string</span>
<span class="ow">and</span> <span class="n">searchdata</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;#&quot;</span><span class="p">)</span>
<span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">searchdata</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span>
<span class="ow">and</span> <span class="n">searchdata</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span><span class="o">.</span><span class="n">isdigit</span><span class="p">()</span>
<span class="p">):</span>
<span class="c1"># only allow exact matching if searching the entire database</span>
<span class="c1"># or unique #dbrefs</span>
<span class="n">exact</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># convert tags into tag tuples suitable for query</span>
<span class="n">tags</span> <span class="o">=</span> <span class="p">[</span>
<span class="p">(</span><span class="n">tagkey</span><span class="p">,</span> <span class="n">tagcat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">if</span> <span class="n">tagcat</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span> <span class="k">for</span> <span class="n">tagkey</span><span class="p">,</span> <span class="o">*</span><span class="n">tagcat</span> <span class="ow">in</span> <span class="n">make_iter</span><span class="p">(</span><span class="n">tags</span> <span class="ow">or</span> <span class="p">[])</span>
<span class="p">]</span>
<span class="k">elif</span> <span class="n">candidates</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># no custom candidates given - get them automatically</span>
<span class="k">if</span> <span class="n">location</span><span class="p">:</span>
<span class="c1"># location(s) were given</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">make_iter</span><span class="p">(</span><span class="n">location</span><span class="p">):</span>
<span class="n">candidates</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">obj</span><span class="o">.</span><span class="n">contents</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># local search. Candidates are taken from</span>
<span class="c1"># self.contents, self.location and</span>
<span class="c1"># self.location.contents</span>
<span class="n">location</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">location</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">contents</span>
<span class="k">if</span> <span class="n">location</span><span class="p">:</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="n">candidates</span> <span class="o">+</span> <span class="p">[</span><span class="n">location</span><span class="p">]</span> <span class="o">+</span> <span class="n">location</span><span class="o">.</span><span class="n">contents</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># normally we don&#39;t need this since we are</span>
<span class="c1"># included in location.contents</span>
<span class="n">candidates</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="c1"># always use exact match for dbref/global searches</span>
<span class="n">exact</span> <span class="o">=</span> <span class="kc">True</span> <span class="k">if</span> <span class="n">global_search</span> <span class="ow">or</span> <span class="n">dbref</span><span class="p">(</span><span class="n">searchdata</span><span class="p">)</span> <span class="k">else</span> <span class="n">exact</span>
<span class="k">if</span> <span class="n">tags</span><span class="p">:</span>
<span class="n">tags</span> <span class="o">=</span> <span class="p">[(</span><span class="n">tagkey</span><span class="p">,</span> <span class="n">tagcat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">if</span> <span class="n">tagcat</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span> <span class="k">for</span> <span class="n">tagkey</span><span class="p">,</span> <span class="o">*</span><span class="n">tagcat</span> <span class="ow">in</span> <span class="n">make_iter</span><span class="p">(</span><span class="n">tags</span><span class="p">)]</span>
<span class="c1"># get candidates</span>
<span class="n">candidates</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_search_candidates</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="o">**</span><span class="n">input_kwargs</span><span class="p">)</span>
<span class="n">results</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">search_object</span><span class="p">(</span>
<span class="c1"># do the actual search</span>
<span class="n">results</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_search_result</span><span class="p">(</span>
<span class="n">searchdata</span><span class="p">,</span>
<span class="n">attribute_name</span><span class="o">=</span><span class="n">attribute_name</span><span class="p">,</span>
<span class="n">typeclass</span><span class="o">=</span><span class="n">typeclass</span><span class="p">,</span>
@ -581,41 +769,18 @@
<span class="n">tags</span><span class="o">=</span><span class="n">tags</span><span class="p">,</span>
<span class="p">)</span>
<span class="c1"># filter out objects we are not allowed to search</span>
<span class="k">if</span> <span class="n">use_locks</span><span class="p">:</span>
<span class="n">results</span> <span class="o">=</span> <span class="p">[</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">)</span> <span class="k">if</span> <span class="n">x</span><span class="o">.</span><span class="n">access</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">&quot;search&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">True</span><span class="p">)]</span>
<span class="n">nresults</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">results</span><span class="p">)</span>
<span class="k">if</span> <span class="n">stacked</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">nresults</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
<span class="c1"># handle stacks, disable multimatch errors</span>
<span class="n">nstack</span> <span class="o">=</span> <span class="n">nresults</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">exact</span><span class="p">:</span>
<span class="c1"># we re-run exact match against one of the matches to</span>
<span class="c1"># make sure we were not catching partial matches not belonging</span>
<span class="c1"># to the stack</span>
<span class="n">nstack</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span>
<span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">get_objs_with_key_or_alias</span><span class="p">(</span>
<span class="n">results</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">key</span><span class="p">,</span>
<span class="n">exact</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">candidates</span><span class="o">=</span><span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">),</span>
<span class="n">typeclasses</span><span class="o">=</span><span class="p">[</span><span class="n">typeclass</span><span class="p">]</span> <span class="k">if</span> <span class="n">typeclass</span> <span class="k">else</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">)</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">nstack</span> <span class="o">==</span> <span class="n">nresults</span><span class="p">:</span>
<span class="c1"># a valid stack, return multiple results</span>
<span class="k">return</span> <span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">)[:</span><span class="n">stacked</span><span class="p">]</span>
<span class="c1"># handle stacked objects</span>
<span class="n">is_stacked</span><span class="p">,</span> <span class="n">results</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_stacked_results</span><span class="p">(</span><span class="n">results</span><span class="p">,</span> <span class="o">**</span><span class="n">input_kwargs</span><span class="p">)</span>
<span class="k">if</span> <span class="n">is_stacked</span><span class="p">:</span>
<span class="c1"># we have a stacked result, return it immediately (a list)</span>
<span class="k">return</span> <span class="n">results</span>
<span class="k">if</span> <span class="n">quiet</span><span class="p">:</span>
<span class="c1"># don&#39;t auto-handle error messaging</span>
<span class="k">return</span> <span class="nb">list</span><span class="p">(</span><span class="n">results</span><span class="p">)</span>
<span class="c1"># handle error messages</span>
<span class="k">return</span> <span class="n">_AT_SEARCH_RESULT</span><span class="p">(</span>
<span class="n">results</span><span class="p">,</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">query</span><span class="o">=</span><span class="n">searchdata</span><span class="p">,</span>
<span class="n">nofound_string</span><span class="o">=</span><span class="n">nofound_string</span><span class="p">,</span>
<span class="n">multimatch_string</span><span class="o">=</span><span class="n">multimatch_string</span><span class="p">,</span>
<span class="p">)</span></div>
<span class="c1"># handle the end (unstacked) results, returning a single object, a list or None</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">handle_search_results</span><span class="p">(</span><span class="n">searchdata</span><span class="p">,</span> <span class="n">results</span><span class="p">,</span> <span class="o">**</span><span class="n">input_kwargs</span><span class="p">)</span></div>
<div class="viewcode-block" id="DefaultObject.search_account"><a class="viewcode-back" href="../../../api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.search_account">[docs]</a> <span class="k">def</span> <span class="nf">search_account</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">searchdata</span><span class="p">,</span> <span class="n">quiet</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>

View file

@ -129,55 +129,6 @@
<span class="n">_</span><span class="p">(</span><span class="s2">&quot;Sorry, that username is already taken.&quot;</span><span class="p">),</span> <span class="n">code</span><span class="o">=</span><span class="s2">&quot;evennia_username_taken&quot;</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="EvenniaPasswordValidator"><a class="viewcode-back" href="../../../api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator">[docs]</a><span class="k">class</span> <span class="nc">EvenniaPasswordValidator</span><span class="p">:</span>
<div class="viewcode-block" id="EvenniaPasswordValidator.__init__"><a class="viewcode-back" href="../../../api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator.__init__">[docs]</a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">regex</span><span class="o">=</span><span class="sa">r</span><span class="s2">&quot;^[\w. @+\-&#39;,]+$&quot;</span><span class="p">,</span>
<span class="n">policy</span><span class="o">=</span><span class="s2">&quot;Password should contain a mix of letters, spaces, digits and @/./+/-/_/&#39;/, only.&quot;</span><span class="p">,</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Constructs a standard Django password validator.</span>
<span class="sd"> Args:</span>
<span class="sd"> regex (str): Regex pattern of valid characters to allow.</span>
<span class="sd"> policy (str): Brief explanation of what the defined regex permits.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">regex</span> <span class="o">=</span> <span class="n">regex</span>
<span class="bp">self</span><span class="o">.</span><span class="n">policy</span> <span class="o">=</span> <span class="n">policy</span></div>
<div class="viewcode-block" id="EvenniaPasswordValidator.validate"><a class="viewcode-back" href="../../../api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator.validate">[docs]</a> <span class="k">def</span> <span class="nf">validate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">password</span><span class="p">,</span> <span class="n">user</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Validates a password string to make sure it meets predefined Evennia</span>
<span class="sd"> acceptable character policy.</span>
<span class="sd"> Args:</span>
<span class="sd"> password (str): Password to validate</span>
<span class="sd"> user (None): Unused argument but required by Django</span>
<span class="sd"> Returns:</span>
<span class="sd"> None (None): None if password successfully validated,</span>
<span class="sd"> raises ValidationError otherwise.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Check complexity</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">regex</span><span class="p">,</span> <span class="n">password</span><span class="p">):</span>
<span class="k">raise</span> <span class="n">ValidationError</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">policy</span><span class="p">),</span> <span class="n">code</span><span class="o">=</span><span class="s2">&quot;evennia_password_policy&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="EvenniaPasswordValidator.get_help_text"><a class="viewcode-back" href="../../../api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator.get_help_text">[docs]</a> <span class="k">def</span> <span class="nf">get_help_text</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns a user-facing explanation of the password policy defined</span>
<span class="sd"> by this validator.</span>
<span class="sd"> Returns:</span>
<span class="sd"> text (str): Explanation of password policy.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">_</span><span class="p">(</span>
<span class="s2">&quot;</span><span class="si">{policy}</span><span class="s2"> From a terminal client, you can also use a phrase of multiple words if &quot;</span>
<span class="s2">&quot;you enclose the password in double quotes.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">policy</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">policy</span><span class="p">)</span>
<span class="p">)</span></div></div>
</pre></div>
</div>

View file

@ -2,28 +2,38 @@
## main branch
- [Feature] Add `evennia.ON_DEMAND_HANDLER` for making it easier to implement
timed element with the on-demand approach (Griatch)
- [Fix] Remove `AMP_ENABLED` setting since it services no real purpose and
erroring out on setting it would make it even less useful (Griatch).
- [Fix] `services` command with no args would traceback (regression) (Griatch)
- Feature: Add [`evennia.ON_DEMAND_HANDLER`][new-ondemandhandler] for making it
easier to implement changes that are calculated on-demand (Griatch)
- [Feature][pull3412]: Make it possible to add custom webclient css in
`webclient/css/custom.css`, same as for website (InspectorCaracal)
- [Feature][pull3367]: [Component contrib][pull3367extra] got better
inheritance, slot names to choose attr storage, speedups and fixes (ChrisLR)
- Feature: Break up `DefaultObject.search` method into several helpers to make
it easier to override (Griatch)
- Fix: Resolve multimatch error with rpsystem contrib (Griatch)
- Fix: Remove `AMP_ENABLED` setting since it services no real purpose and
erroring out on setting it would make it even less useful (Griatch).
- Feature: Remove too-strict password restrictions for Evennia logins, using
django defaults instead for passwords with more varied characters.
- Fix `services` command with no args would traceback (regression) (Griatch)
- [Fix][pull3423]: Fix wilderness contrib error moving to an already existing
wilderness room (InspectorCaracal)
- [Fix][pull3425]: Don't always include example the crafting recipe when
using the crafting contrib (InspectorCaracal)
- [pull3426]: Traceback banning a channel using with only one nick
- [Fix][pull3426]: Traceback banning a channel using with only one nick
(InspectorCaracal)
- [pull3434]: Adjust lunr search weights to void clashing of cmd-aliases over
- [Fix][pull3434]: Adjust lunr search weights to void clashing of cmd-aliases over
keys which caused some help entries to shadow others (InspectorCaracal)
- Doc fixes (InspectorCaracal, Griatch)
[new-ondemandhandler][https://www.evennia.com/docs/latest/Components/OnDemandHandler.html]
[pull3412]: https://github.com/evennia/evennia/pull/3412
[pull3423]: https://github.com/evennia/evennia/pull/3423
[pull3425]: https://github.com/evennia/evennia/pull/3425
[pull3426]: https://github.com/evennia/evennia/pull/3426
[pull3434]: https://github.com/evennia/evennia/pull/3434
[pull3367]: https://github.com/evennia/evennia/pull/3367
[pull3367extra]: https://www.evennia.com/docs/latest/Contribs/Contrib-Components.html
## Evennia 3.1.1

View file

@ -1115,7 +1115,6 @@ AUTH_PASSWORD_VALIDATORS = [
},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
{"NAME": "evennia.server.validators.EvenniaPasswordValidator"},
]
# Username validation plugins

View file

@ -329,7 +329,7 @@ to accounts respectively.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.admin.CmdEmit.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['remit', 'pemit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['pemit', 'remit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -360,7 +360,7 @@ to accounts respectively.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.admin.CmdEmit.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'no_prefix': ' remit pemit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [&lt;obj&gt;, &lt;obj&gt;, ... =] &lt;message&gt;\n remit [&lt;obj&gt;, &lt;obj&gt;, ... =] &lt;message&gt;\n pemit [&lt;obj&gt;, &lt;obj&gt;, ... =] &lt;message&gt;\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pemit remit', 'category': 'admin', 'key': 'emit', 'no_prefix': ' pemit remit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [&lt;obj&gt;, &lt;obj&gt;, ... =] &lt;message&gt;\n remit [&lt;obj&gt;, &lt;obj&gt;, ... =] &lt;message&gt;\n pemit [&lt;obj&gt;, &lt;obj&gt;, ... =] &lt;message&gt;\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -150,7 +150,7 @@ skipping, reloading etc.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcmd', 'batchcommand']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcommand', 'batchcmd']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -181,7 +181,7 @@ skipping, reloading etc.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcmd batchcommand', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] &lt;python.path.to.file&gt;\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcommand batchcmd', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcommand batchcmd', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] &lt;python.path.to.file&gt;\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -641,7 +641,7 @@ You can specify the /force switch to bypass this confirmation.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.building.CmdDestroy.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;del', '&#64;delete']</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;delete', '&#64;del']</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -682,7 +682,7 @@ You can specify the /force switch to bypass this confirmation.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.building.CmdDestroy.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;del &#64;delete', 'category': 'building', 'key': '&#64;destroy', 'no_prefix': 'destroy del delete', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;delete &#64;del', 'category': 'building', 'key': '&#64;destroy', 'no_prefix': 'destroy delete del', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -1409,7 +1409,7 @@ server settings.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.building.CmdTypeclass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;type', '&#64;swap', '&#64;typeclasses', '&#64;parent', '&#64;update']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;parent', '&#64;type', '&#64;swap', '&#64;typeclasses', '&#64;update']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -1440,7 +1440,7 @@ server settings.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.building.CmdTypeclass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;type &#64;swap &#64;typeclasses &#64;parent &#64;update', 'category': 'building', 'key': '&#64;typeclass', 'no_prefix': 'typeclass type swap typeclasses parent update', 'tags': '', 'text': &quot;\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] &lt;object&gt; [= typeclass.path]\n typeclass/prototype &lt;object&gt; = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n &quot;}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;parent &#64;type &#64;swap &#64;typeclasses &#64;update', 'category': 'building', 'key': '&#64;typeclass', 'no_prefix': 'typeclass parent type swap typeclasses update', 'tags': '', 'text': &quot;\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] &lt;object&gt; [= typeclass.path]\n typeclass/prototype &lt;object&gt; = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n &quot;}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -280,7 +280,7 @@ for everyone to use, you need build privileges and the alias command.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdNick.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['nicks', 'nickname']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['nickname', 'nicks']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -312,7 +312,7 @@ for everyone to use, you need build privileges and the alias command.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdNick.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nicks nickname', 'category': 'general', 'key': 'nick', 'no_prefix': ' nicks nickname', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] &lt;string&gt; [= [replacement_string]]\n nick[/switches] &lt;template&gt; = &lt;replacement_template&gt;\n nick/delete &lt;string&gt; or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also &quot;nicks&quot; works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side &lt;string&gt;:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your &lt;string&gt;\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nickname nicks', 'category': 'general', 'key': 'nick', 'no_prefix': ' nickname nicks', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] &lt;string&gt; [= [replacement_string]]\n nick[/switches] &lt;template&gt; = &lt;replacement_template&gt;\n nick/delete &lt;string&gt; or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also &quot;nicks&quot; works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side &lt;string&gt;:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your &lt;string&gt;\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -335,7 +335,7 @@ inv</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdInventory.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inv']</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i']</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -366,7 +366,7 @@ inv</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdInventory.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -721,7 +721,7 @@ automatically begin with your name.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdPose.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = [':', 'emote']</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['emote', ':']</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -762,7 +762,7 @@ space.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdPose.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ': emote', 'category': 'general', 'key': 'pose', 'no_prefix': ' : emote', 'tags': '', 'text': &quot;\n strike a pose\n\n Usage:\n pose &lt;pose text&gt;\n pose's &lt;pose text&gt;\n\n Example:\n pose is standing by the wall, smiling.\n -&gt; others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n &quot;}</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'emote :', 'category': 'general', 'key': 'pose', 'no_prefix': ' emote :', 'tags': '', 'text': &quot;\n strike a pose\n\n Usage:\n pose &lt;pose text&gt;\n pose's &lt;pose text&gt;\n\n Example:\n pose is standing by the wall, smiling.\n -&gt; others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n &quot;}</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -785,7 +785,7 @@ which permission groups you are a member of.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdAccess.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['hierarchy', 'groups']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['groups', 'hierarchy']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -816,7 +816,7 @@ which permission groups you are a member of.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.general.CmdAccess.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'no_prefix': ' hierarchy groups', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'no_prefix': ' groups hierarchy', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -695,7 +695,7 @@ See <a href="#id11"><span class="problematic" id="id12">|</span></a>luhttps://ww
<dl class="py attribute">
<dt id="evennia.commands.default.system.CmdTasks.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;task', '&#64;delays']</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;delays', '&#64;task']</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -741,7 +741,7 @@ to all the variables defined therein.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.system.CmdTasks.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;task &#64;delays', 'category': 'system', 'key': '&#64;tasks', 'no_prefix': 'tasks task delays', 'tags': '', 'text': &quot;\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n &quot;}</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;delays &#64;task', 'category': 'system', 'key': '&#64;tasks', 'no_prefix': 'tasks delays task', 'tags': '', 'text': &quot;\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n &quot;}</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -973,7 +973,7 @@ main test suite started with</p>
<p>Test the batch processor.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.tests.TestBatchProcess.red_button">
<code class="sig-name descname">red_button</code><em class="property"> = &lt;module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmppnsswh9b/0edcebea0fdd67c4ba5c58f3b0d589b02a6bea3e/evennia/contrib/tutorials/red_button/red_button.py'&gt;</em><a class="headerlink" href="#evennia.commands.default.tests.TestBatchProcess.red_button" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">red_button</code><em class="property"> = &lt;module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmpf2ikqp42/015698d06fe192d64f19176508e8cd7e59df9d4c/evennia/contrib/tutorials/red_button/red_button.py'&gt;</em><a class="headerlink" href="#evennia.commands.default.tests.TestBatchProcess.red_button" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">

View file

@ -134,7 +134,7 @@ connect “account name” “pass word”</p>
<dl class="py attribute">
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'conn', 'con']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -169,7 +169,7 @@ there is no object yet before the account has logged in)</p>
<dl class="py attribute">
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'no_prefix': ' co conn con', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect &quot;account name&quot; &quot;pass word&quot;\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect &quot;account name&quot; &quot;pass word&quot;\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -353,7 +353,7 @@ for simplicity. It shows a pane of info.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -379,7 +379,7 @@ for simplicity. It shows a pane of info.</p>
<dl class="py attribute">
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\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.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\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.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -151,7 +151,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'conn', 'con']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -181,7 +181,7 @@ there is no object yet before the account has logged in)</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.email_login.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', 'no_prefix': ' co conn con', '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.base_systems.email_login.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', '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.base_systems.email_login.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -347,7 +347,7 @@ for simplicity. It shows a pane of info.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -373,7 +373,7 @@ for simplicity. It shows a pane of info.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', '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.base_systems.email_login.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', '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.base_systems.email_login.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -128,7 +128,7 @@
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.ingame_python.commands.CmdCallback.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;callbacks', '&#64;calls', '&#64;callback']</em><a class="headerlink" href="#evennia.contrib.base_systems.ingame_python.commands.CmdCallback.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;callback', '&#64;callbacks', '&#64;calls']</em><a class="headerlink" href="#evennia.contrib.base_systems.ingame_python.commands.CmdCallback.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -209,7 +209,7 @@ on user permission.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.ingame_python.commands.CmdCallback.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;callbacks &#64;calls &#64;callback', 'category': 'building', 'key': '&#64;call', 'no_prefix': 'call callbacks calls callback', 'tags': '', 'text': '\n Command to edit callbacks.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.ingame_python.commands.CmdCallback.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;callback &#64;callbacks &#64;calls', 'category': 'building', 'key': '&#64;call', 'no_prefix': 'call callback callbacks calls', 'tags': '', 'text': '\n Command to edit callbacks.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.ingame_python.commands.CmdCallback.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -172,7 +172,7 @@ aliases to an already joined channel.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['aliaschan', 'chanalias']</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['chanalias', 'aliaschan']</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -203,7 +203,7 @@ aliases to an already joined channel.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' aliaschan chanalias', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] &lt;channel&gt;\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'chanalias aliaschan', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' chanalias aliaschan', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] &lt;channel&gt;\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -229,7 +229,7 @@ for that channel.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['delchanalias', 'delaliaschan']</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['delaliaschan', 'delchanalias']</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -260,7 +260,7 @@ for that channel.</p>
<dl class="py attribute">
<dt id="evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delchanalias delaliaschan', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delchanalias delaliaschan', 'tags': '', 'text': &quot;\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom &lt;alias or channel&gt;\n delcom/all &lt;channel&gt;\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delaliaschan delchanalias', 'tags': '', 'text': &quot;\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom &lt;alias or channel&gt;\n delcom/all &lt;channel&gt;\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n &quot;}</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdDelCom.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -223,7 +223,7 @@ the operation will be general or on the room.</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['chicken out', 'abort', 'quit', 'q']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['chicken out', 'abort', 'q', 'quit']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
@ -247,7 +247,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'chicken out abort quit q', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out abort quit q', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'chicken out abort q quit', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out abort q quit', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -383,7 +383,7 @@ shout</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['whisper', ';', 'shout']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = [';', 'whisper', 'shout']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -412,7 +412,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'whisper ; shout', 'category': 'general', 'key': 'say', 'no_prefix': ' whisper ; shout', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say &lt;text&gt;\n whisper\n shout\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '; whisper shout', 'category': 'general', 'key': 'say', 'no_prefix': ' ; whisper shout', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say &lt;text&gt;\n whisper\n shout\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -502,7 +502,7 @@ looks and what actions is available.</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['unfocus', 'examine', 'ex', 'e']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'examine', 'e', 'unfocus']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -531,7 +531,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unfocus examine ex e', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' unfocus examine ex e', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus &lt;obj&gt;\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ex examine e unfocus', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' ex examine e unfocus', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus &lt;obj&gt;\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -593,7 +593,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGet.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['give', 'i', 'inventory', 'inv']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i', 'give', 'inventory']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
@ -617,7 +617,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGet.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'give i inventory inv', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' give i inventory inv', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'inv i give inventory', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' inv i give inventory', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -634,7 +634,7 @@ inv</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.clothing.clothing.CmdInventory.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inv']</em><a class="headerlink" href="#evennia.contrib.game_systems.clothing.clothing.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i']</em><a class="headerlink" href="#evennia.contrib.game_systems.clothing.clothing.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -665,7 +665,7 @@ inv</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.clothing.clothing.CmdInventory.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', '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.game_systems.clothing.clothing.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', '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.game_systems.clothing.clothing.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -684,7 +684,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -710,7 +710,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -579,7 +579,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -599,7 +599,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -702,7 +702,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -722,7 +722,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -481,7 +481,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -501,7 +501,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -941,7 +941,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -961,7 +961,7 @@ if there are still any actions you can take.</p>
<dl class="py attribute">
<dt id="evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -338,7 +338,7 @@ everyone but the person rolling.</p>
<dl class="py attribute">
<dt id="evennia.contrib.rpg.dice.dice.CmdDice.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['roll', '&#64;dice']</em><a class="headerlink" href="#evennia.contrib.rpg.dice.dice.CmdDice.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['&#64;dice', 'roll']</em><a class="headerlink" href="#evennia.contrib.rpg.dice.dice.CmdDice.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -364,7 +364,7 @@ everyone but the person rolling.</p>
<dl class="py attribute">
<dt id="evennia.contrib.rpg.dice.dice.CmdDice.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'roll &#64;dice', 'category': 'general', 'key': 'dice', 'no_prefix': ' roll 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.rpg.dice.dice.CmdDice.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '&#64;dice roll', 'category': 'general', 'key': 'dice', 'no_prefix': ' dice roll', '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.rpg.dice.dice.CmdDice.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -1025,85 +1025,10 @@ rp-heavy game. It implements the base functionality for poses.</p>
</dd></dl>
<dl class="py method">
<dt id="evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.search">
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">global_search</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_nicks</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">location</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">quiet</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nofound_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">multimatch_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpg/rpsystem/rpsystem.html#ContribRPObject.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.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 <strong>location</strong> of <strong>self</strong> 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 <strong>object.key</strong> (with <strong>object.aliases</strong> second) unless
the keyword attribute_name specifies otherwise.
<strong>Special strings:</strong>
- <strong>#&lt;num&gt;</strong>: search by unique dbref. This is always</p>
<blockquote>
<div><p>a global search.</p>
</div></blockquote>
<ul>
<li><p><strong>me,self</strong>: self-reference to this object</p></li>
<li><dl class="simple">
<dt><strong>&lt;num&gt;-&lt;string&gt;</strong> - 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 <strong>location</strong> keyword.</p></li>
<li><p><strong>use_nicks</strong> (<em>bool</em>) Use nickname-replace (nicktype “object”) on <strong>searchdata</strong>.</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 <strong>Objects</strong> 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 <strong>candidates</strong> 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="#id1"><span class="problematic" id="id2">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 <strong>global_search</strong>
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><p><em>match (Object, None or list)</em> </p>
<dl class="simple">
<dt>will return an Object/None if <strong>quiet=False</strong>,</dt><dd><p>otherwise it will return a list of 0, 1 or more matches.</p>
</dd>
</dl>
</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>To find Accounts, use eg. <strong>evennia.account_search</strong>. If
<strong>quiet=False</strong>, error messages will be handled by
<strong>settings.SEARCH_AT_RESULT</strong> and echoed automatically (on
error, return will be <strong>None</strong>). If <strong>quiet=True</strong>, the error
messaging is assumed to be handled by the caller.</p>
<dt id="evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.get_search_result">
<code class="sig-name descname">get_search_result</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpg/rpsystem/rpsystem.html#ContribRPObject.get_search_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.get_search_result" title="Permalink to this definition"></a></dt>
<dd><p>Override of the parent method for producing search results that understands sdescs.
These are used in the main .search() method of the parent class.</p>
</dd></dl>
<dl class="py method">

View file

@ -242,6 +242,12 @@
<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/rpg/rpsystem/tests.html#TestRPSystemCommands.test_commands"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.tests.TestRPSystemCommands.test_commands" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="evennia.contrib.rpg.rpsystem.tests.TestRPSystemCommands.test_multi_match_search">
<code class="sig-name descname">test_multi_match_search</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/rpg/rpsystem/tests.html#TestRPSystemCommands.test_multi_match_search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.tests.TestRPSystemCommands.test_multi_match_search" title="Permalink to this definition"></a></dt>
<dd><p>Test that the multi-match search works as expected</p>
</dd></dl>
</dd></dl>
</section>

View file

@ -204,7 +204,7 @@ self.args).</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.evadventure.commands.CmdInventory.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inv']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdInventory.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
@ -228,7 +228,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.evadventure.commands.CmdInventory.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n View your inventory\n\n Usage:\n inventory\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n View your inventory\n\n Usage:\n inventory\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdInventory.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -305,7 +305,7 @@ unwear &lt;item&gt;</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.evadventure.commands.CmdRemove.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['unwear', 'unwield']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdRemove.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['unwield', 'unwear']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdRemove.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
@ -329,7 +329,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.evadventure.commands.CmdRemove.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unwear unwield', 'category': 'general', 'key': 'remove', 'no_prefix': ' unwear unwield', 'tags': '', 'text': '\n Remove a remove a weapon/shield, armor or helmet.\n\n Usage:\n remove &lt;item&gt;\n unwield &lt;item&gt;\n unwear &lt;item&gt;\n\n To remove an item from the backpack, use |wdrop|n instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdRemove.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unwield unwear', 'category': 'general', 'key': 'remove', 'no_prefix': ' unwield unwear', 'tags': '', 'text': '\n Remove a remove a weapon/shield, armor or helmet.\n\n Usage:\n remove &lt;item&gt;\n unwield &lt;item&gt;\n unwear &lt;item&gt;\n\n To remove an item from the backpack, use |wdrop|n instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.commands.CmdRemove.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -165,7 +165,7 @@ such as when closing the lid and un-blinding a character.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdPushLidClosed.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['press', 'push', 'press button']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidClosed.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['push', 'press button', 'press']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidClosed.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -194,7 +194,7 @@ check if the lid is open or closed.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdPushLidClosed.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press push press button', 'category': 'general', 'key': 'push button', 'no_prefix': ' press push press button', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidClosed.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push press button press', 'category': 'general', 'key': 'push button', 'no_prefix': ' push press button press', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidClosed.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -264,7 +264,7 @@ check if the lid is open or closed.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['break lid', 'smash lid', 'smash']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['break lid', 'smash', 'smash lid']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -291,7 +291,7 @@ break.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'break lid smash lid smash', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' break lid smash lid smash', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'break lid smash smash lid', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' break lid smash smash lid', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -391,7 +391,7 @@ be mutually exclusive.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdPushLidOpen.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['press', 'push', 'press button']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidOpen.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['push', 'press button', 'press']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidOpen.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -420,7 +420,7 @@ set in self.parse())</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdPushLidOpen.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press push press button', 'category': 'general', 'key': 'push button', 'no_prefix': ' press push press button', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidOpen.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push press button press', 'category': 'general', 'key': 'push button', 'no_prefix': ' push press button press', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdPushLidOpen.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -518,7 +518,7 @@ be mutually exclusive.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'l', 'get', 'examine', 'listen', 'feel']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'get', 'feel', 'examine', 'l', 'listen']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -544,7 +544,7 @@ be mutually exclusive.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ex l get examine listen feel', 'category': 'general', 'key': 'look', 'no_prefix': ' ex l get examine listen feel', 'tags': '', 'text': &quot;\n Looking around in darkness\n\n Usage:\n look &lt;obj&gt;\n\n ... not that there's much to see in the dark.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'ex get feel examine l listen', 'category': 'general', 'key': 'look', 'no_prefix': ' ex get feel examine l listen', 'tags': '', 'text': &quot;\n Looking around in darkness\n\n Usage:\n look &lt;obj&gt;\n\n ... not that there's much to see in the dark.\n\n &quot;}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -568,7 +568,7 @@ shift green root up/down</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['pull', 'push', 'move', 'shiftroot']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['pull', 'push', 'shiftroot', 'move']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -604,7 +604,7 @@ yellow/green - horizontal roots</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pull push move shiftroot', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' pull push move shiftroot', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pull push shiftroot move', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' pull push shiftroot move', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -621,7 +621,7 @@ yellow/green - horizontal roots</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['button', 'push button', 'press button']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['push button', 'press button', 'button']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -647,7 +647,7 @@ yellow/green - horizontal roots</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'button push button press button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' button push button press button', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push button press button button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' push button press button button', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -791,7 +791,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['pierce', 'slash', 'fight', 'parry', 'defend', 'kill', 'chop', 'stab', 'thrust', 'bash', 'hit']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['bash', 'defend', 'fight', 'pierce', 'parry', 'hit', 'slash', 'stab', 'kill', 'chop', 'thrust']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -817,7 +817,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pierce slash fight parry defend kill chop stab thrust bash hit', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' pierce slash fight parry defend kill chop stab thrust bash hit', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab &lt;enemy&gt;\n slash &lt;enemy&gt;\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'bash defend fight pierce parry hit slash stab kill chop thrust', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' bash defend fight pierce parry hit slash stab kill chop thrust', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab &lt;enemy&gt;\n slash &lt;enemy&gt;\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -828,7 +828,7 @@ if they fall off the bridge.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -854,7 +854,7 @@ if they fall off the bridge.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
@ -980,7 +980,7 @@ to find something.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['feel around', 'search', 'l', 'fiddle', 'feel']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['fiddle', 'search', 'feel', 'l', 'feel around']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -1008,7 +1008,7 @@ random chance of eventually finding a light source.</p>
<dl class="py attribute">
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'feel around search l fiddle feel', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' feel around search l fiddle feel', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'fiddle search feel l feel around', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' fiddle search feel l feel around', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -220,7 +220,7 @@ git evennia pull - Pull the latest evennia code.</p>
<dl class="py attribute">
<dt id="evennia.contrib.utils.git_integration.git_integration.CmdGitEvennia.directory">
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmppnsswh9b/0edcebea0fdd67c4ba5c58f3b0d589b02a6bea3e/evennia'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGitEvennia.directory" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmpf2ikqp42/015698d06fe192d64f19176508e8cd7e59df9d4c/evennia'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGitEvennia.directory" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -281,7 +281,7 @@ git pull - Pull the latest code from your current branch.</p>
<dl class="py attribute">
<dt id="evennia.contrib.utils.git_integration.git_integration.CmdGit.directory">
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmppnsswh9b/0edcebea0fdd67c4ba5c58f3b0d589b02a6bea3e/evennia/game_template'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGit.directory" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmpf2ikqp42/015698d06fe192d64f19176508e8cd7e59df9d4c/evennia/game_template'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGit.directory" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">

View file

@ -360,6 +360,135 @@ and filtering.</p>
location having the property destination != <strong>None</strong>.</p>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.get_search_query_replacement">
<code class="sig-name descname">get_search_query_replacement</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.get_search_query_replacement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.get_search_query_replacement" title="Permalink to this definition"></a></dt>
<dd><p>This method is called by the search method to allow for direct
replacements of the search string before it is used in the search.</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>) The search string to replace.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) These are the same as passed to the <strong>search</strong> method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>str</em> The (potentially modified) search string.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.get_search_direct_match">
<code class="sig-name descname">get_search_direct_match</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.get_search_direct_match"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.get_search_direct_match" title="Permalink to this definition"></a></dt>
<dd><p>This method is called by the search method to allow for direct
replacements, such as me always being an alias for this object.</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>) The search string to replace.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) These are the same as passed to the <strong>search</strong> method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>tuple</em> <strong>(should_return, str or Obj)</strong>, where <strong>should_return</strong> is a boolean indicating
the <strong>.search</strong> method should return the result immediately without further
processing. If <strong>should_return</strong> is <strong>True</strong>, the second element of the tuple is the result
that is returned.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.get_search_candidates">
<code class="sig-name descname">get_search_candidates</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.get_search_candidates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.get_search_candidates" title="Permalink to this definition"></a></dt>
<dd><p>Get the candidates for a search. Also the <strong>candidates</strong> provided to the
search function is included, and could be modified in-place here.</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>) The search criterion (could be modified by <strong>get_search_query_replacement</strong>).</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) These are the same as passed to the <strong>search</strong> method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>list</em> A list of objects to search between.</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>If <strong>searchdata</strong> is a #dbref, this method should always return <strong>None</strong>. This is because
the search should always be global in this case. If <strong>candidates</strong> were already given,
they should be used as is. If <strong>location</strong> was given, the candidates should be based on
that.</p>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.get_search_result">
<code class="sig-name descname">get_search_result</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.get_search_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.get_search_result" title="Permalink to this definition"></a></dt>
<dd><p>This is a wrapper for actually searching for objects, used by the <strong>search</strong> method.
This is broken out into a separate method to allow for easier overriding in child classes.</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>) The search criterion.</p></li>
<li><p><strong>attribute_name</strong> (<em>str</em>) The attribute to search on (default is <a href="#id1"><span class="problematic" id="id2">**</span></a>.</p></li>
<li><p><strong>typeclass</strong> (<em>Typeclass</em><em> or </em><em>list</em>) The typeclass to search for.</p></li>
<li><p><strong>candidates</strong> (<em>list</em>) A list of objects to search between.</p></li>
<li><p><strong>exact</strong> (<em>bool</em>) Require exact match.</p></li>
<li><p><strong>use_dbref</strong> (<em>bool</em>) Allow dbref search.</p></li>
<li><p><strong>tags</strong> (<em>list</em>) Tags to search for.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.get_stacked_results">
<code class="sig-name descname">get_stacked_results</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">results</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.get_stacked_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.get_stacked_results" title="Permalink to this definition"></a></dt>
<dd><p>This method is called by the search method to allow for handling of multi-match
results that should be stacked.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>results</strong> (<em>list</em>) The list of results from the search.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p><em>tuple</em> </p>
<dl class="simple">
<dt><strong>(stacked, results)</strong>, where <strong>stacked</strong> is a boolean indicating if the</dt><dd><p>result is stacked and <strong>results</strong> is the list of results to return. If <strong>stacked</strong>
is True, the “.search” method will return <strong>results</strong> immediately without further
processing (it will not result in a multimatch-error).</p>
</dd>
</dl>
</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The <strong>stacked</strong> keyword argument is an integer that controls the max size of each stack
(if &gt;0). Its important to make sure to only stack _identical_ objects, otherwise we
risk losing track of objects.</p>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.handle_search_results">
<code class="sig-name descname">handle_search_results</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">results</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.handle_search_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.handle_search_results" title="Permalink to this definition"></a></dt>
<dd><p>This method is called by the search method to allow for handling of the final search result.</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>) The original search criterion (potentially modified by
<strong>get_search_query_replacement</strong>).</p></li>
<li><p><strong>results</strong> (<em>list</em>) The list of results from the search.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em>) These are the same as passed to the <strong>search</strong> method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>Object, None or list</em> Normally this is a single object, but if <strong>quiet=True</strong> it should be
a list. If quiet=False and we have to handle a no/multi-match error (directly messaging
the user), this should return <strong>None</strong>.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.objects.objects.DefaultObject.search">
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">global_search</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_nicks</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">location</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">quiet</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_locks</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">nofound_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">multimatch_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">stacked</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.search" title="Permalink to this definition"></a></dt>
@ -430,10 +559,10 @@ otherwise.</p></li>
more tag definitions on the form <strong>tagname</strong> or <strong>(tagname, tagcategory)</strong>.</p></li>
<li><p><strong>stacked</strong> (<em>int</em><em>, </em><em>optional</em>) If &gt; 0, multimatches will be analyzed to determine if they
only contains identical objects; these are then assumed stacked and no multi-match
error will be generated, instead <strong>stacked</strong> number of matches will be returned. If
<strong>stacked</strong> is larger than number of matches, returns that number of matches. If
the found stack is a mix of objects, return None and handle the multi-match
error depending on the value of <strong>quiet</strong>.</p></li>
error will be generated, instead <strong>stacked</strong> number of matches will be returned as a
list. If <strong>stacked</strong> is larger than number of matches, returns that number of matches.
If the found stack is a mix of objects, return None and handle the multi-match error
depending on the value of <strong>quiet</strong>.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>

View file

@ -120,61 +120,6 @@
<p>Checks to make sure a given username is not taken or otherwise reserved.</p>
</dd></dl>
<dl class="py class">
<dt id="evennia.server.validators.EvenniaPasswordValidator">
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.validators.</code><code class="sig-name descname">EvenniaPasswordValidator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">regex</span><span class="o">=</span><span class="default_value">&quot;^[\\w. &#64;+\\-',]+$&quot;</span></em>, <em class="sig-param"><span class="n">policy</span><span class="o">=</span><span class="default_value">&quot;Password should contain a mix of letters, spaces, digits and &#64;/./+/-/_/'/, only.&quot;</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/validators.html#EvenniaPasswordValidator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.validators.EvenniaPasswordValidator" 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="py method">
<dt id="evennia.server.validators.EvenniaPasswordValidator.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">regex</span><span class="o">=</span><span class="default_value">&quot;^[\\w. &#64;+\\-',]+$&quot;</span></em>, <em class="sig-param"><span class="n">policy</span><span class="o">=</span><span class="default_value">&quot;Password should contain a mix of letters, spaces, digits and &#64;/./+/-/_/'/, only.&quot;</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/validators.html#EvenniaPasswordValidator.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.validators.EvenniaPasswordValidator.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Constructs a standard Django password validator.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>regex</strong> (<em>str</em>) Regex pattern of valid characters to allow.</p></li>
<li><p><strong>policy</strong> (<em>str</em>) Brief explanation of what the defined regex permits.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.server.validators.EvenniaPasswordValidator.validate">
<code class="sig-name descname">validate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">password</span></em>, <em class="sig-param"><span class="n">user</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/validators.html#EvenniaPasswordValidator.validate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.validators.EvenniaPasswordValidator.validate" title="Permalink to this definition"></a></dt>
<dd><p>Validates a password string to make sure it meets predefined Evennia
acceptable character policy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>password</strong> (<em>str</em>) Password to validate</p></li>
<li><p><strong>user</strong> (<em>None</em>) Unused argument but required by Django</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p><em>None (None)</em> </p>
<dl class="simple">
<dt>None if password successfully validated,</dt><dd><p>raises ValidationError otherwise.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="evennia.server.validators.EvenniaPasswordValidator.get_help_text">
<code class="sig-name descname">get_help_text</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/validators.html#EvenniaPasswordValidator.get_help_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.validators.EvenniaPasswordValidator.get_help_text" title="Permalink to this definition"></a></dt>
<dd><p>Returns a user-facing explanation of the password policy defined
by this validator.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><em>text (str)</em> Explanation of password policy.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>

View file

@ -348,7 +348,7 @@ indentation.</p>
<dl class="py attribute">
<dt id="evennia.utils.eveditor.CmdEditorGroup.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = [':uu', ':&gt;', ':q!', ':y', ':p', ':!', ':', ':i', ':u', ':DD', ':&lt;', ':q', ':f', ':h', ':=', ':fi', ':w', ':s', ':x', ':j', ':S', ':dd', ':echo', ':r', '::', ':UU', ':A', ':I', ':::', ':dw', ':fd', ':wq']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = [':&lt;', ':i', ':!', ':I', ':fd', ':x', ':j', ':', ':dw', ':y', ':uu', ':w', ':h', ':u', ':A', ':s', ':fi', ':&gt;', ':S', ':=', ':UU', ':p', ':DD', '::', ':dd', ':q', ':echo', ':::', ':wq', ':f', ':q!', ':r']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -376,7 +376,7 @@ efficient presentation.</p>
<dl class="py attribute">
<dt id="evennia.utils.eveditor.CmdEditorGroup.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':uu :&gt; :q! :y :p :! : :i :u :DD :&lt; :q :f :h := :fi :w :s :x :j :S :dd :echo :r :: :UU :A :I ::: :dw :fd :wq', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :uu :&gt; :q! :y :p :! : :i :u :DD :&lt; :q :f :h := :fi :w :s :x :j :S :dd :echo :r :: :UU :A :I ::: :dw :fd :wq', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':&lt; :i :! :I :fd :x :j : :dw :y :uu :w :h :u :A :s :fi :&gt; :S := :UU :p :DD :: :dd :q :echo ::: :wq :f :q! :r', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :&lt; :i :! :I :fd :x :j : :dw :y :uu :w :h :u :A :s :fi :&gt; :S := :UU :p :DD :: :dd :q :echo ::: :wq :f :q! :r', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -951,7 +951,7 @@ single question.</p>
<dl class="py attribute">
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['abort', 'no', '__nomatch_command', 'y', 'yes', 'a', 'n']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['y', 'no', 'yes', 'a', 'abort', 'n', '__nomatch_command']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -977,7 +977,7 @@ single question.</p>
<dl class="py attribute">
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'abort no __nomatch_command y yes a n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' abort no __nomatch_command y yes a n', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'y no yes a abort n __nomatch_command', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' y no yes a abort n __nomatch_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -149,7 +149,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
<dl class="py attribute">
<dt id="evennia.utils.evmore.CmdMore.aliases">
<code class="sig-name descname">aliases</code><em class="property"> = ['end', 'abort', 'quit', 'top', 't', 'q', 'e', 'p', 'next', 'previous', 'a', 'n']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">aliases</code><em class="property"> = ['next', 'p', 't', 'abort', 'top', 'a', 'end', 'q', 'previous', 'n', 'e', 'quit']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
@ -175,7 +175,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
<dl class="py attribute">
<dt id="evennia.utils.evmore.CmdMore.search_index_entry">
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'end abort quit top t q e p next previous a n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' end abort quit top t q e p next previous a n', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'next p t abort top a end q previous n e quit', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' next p t abort top a end q previous n e quit', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>

View file

@ -353,8 +353,6 @@
<li><a href="api/evennia.server.sessionhandler.html#evennia.server.sessionhandler.ServerSessionHandler.__init__">(evennia.server.sessionhandler.ServerSessionHandler method)</a>
</li>
<li><a href="api/evennia.server.throttle.html#evennia.server.throttle.Throttle.__init__">(evennia.server.throttle.Throttle method)</a>
</li>
<li><a href="api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator.__init__">(evennia.server.validators.EvenniaPasswordValidator method)</a>
</li>
<li><a href="api/evennia.server.webserver.html#evennia.server.webserver.DjangoWebRoot.__init__">(evennia.server.webserver.DjangoWebRoot method)</a>
</li>
@ -9147,8 +9145,6 @@
<li><a href="api/evennia.web.website.views.index.html#evennia.web.website.views.index.EvenniaIndexView">EvenniaIndexView (class in evennia.web.website.views.index)</a>
</li>
<li><a href="api/evennia.utils.logger.html#evennia.utils.logger.EvenniaLogFile">EvenniaLogFile (class in evennia.utils.logger)</a>
</li>
<li><a href="api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator">EvenniaPasswordValidator (class in evennia.server.validators)</a>
</li>
<li><a href="api/evennia.web.api.permissions.html#evennia.web.api.permissions.EvenniaPermission">EvenniaPermission (class in evennia.web.api.permissions)</a>
</li>
@ -10774,8 +10770,6 @@
</li>
<li><a href="api/evennia.contrib.grid.xyzgrid.xyzgrid.html#evennia.contrib.grid.xyzgrid.xyzgrid.XYZGrid.get_exit">get_exit() (evennia.contrib.grid.xyzgrid.xyzgrid.XYZGrid method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/evennia.contrib.grid.xyzgrid.xymap_legend.html#evennia.contrib.grid.xyzgrid.xymap_legend.MapNode.get_exit_spawn_name">get_exit_spawn_name() (evennia.contrib.grid.xyzgrid.xymap_legend.MapNode method)</a>
</li>
<li><a href="api/evennia.web.api.serializers.html#evennia.web.api.serializers.ObjectDBSerializer.get_exits">get_exits() (evennia.web.api.serializers.ObjectDBSerializer static method)</a>
@ -10788,6 +10782,8 @@
<li><a href="api/evennia.typeclasses.models.html#evennia.typeclasses.models.TypedObject.get_extra_info">(evennia.typeclasses.models.TypedObject method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/evennia.contrib.base_systems.components.component.html#evennia.contrib.base_systems.components.component.Component.get_fields">get_fields() (evennia.contrib.base_systems.components.component.Component class method)</a>
</li>
<li><a href="api/evennia.web.admin.objects.html#evennia.web.admin.objects.ObjectAdmin.get_fieldsets">get_fieldsets() (evennia.web.admin.objects.ObjectAdmin method)</a>
@ -10837,8 +10833,6 @@
</li>
</ul></li>
<li><a href="api/evennia.web.website.views.help.html#evennia.web.website.views.help.get_help_category">get_help_category() (in module evennia.web.website.views.help)</a>
</li>
<li><a href="api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator.get_help_text">get_help_text() (evennia.server.validators.EvenniaPasswordValidator method)</a>
</li>
<li><a href="api/evennia.web.website.views.help.html#evennia.web.website.views.help.get_help_topic">get_help_topic() (in module evennia.web.website.views.help)</a>
</li>
@ -11052,6 +11046,18 @@
</li>
<li><a href="api/evennia.contrib.rpg.rpsystem.rpsystem.html#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPCharacter.get_sdesc">get_sdesc() (evennia.contrib.rpg.rpsystem.rpsystem.ContribRPCharacter method)</a>
</li>
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_candidates">get_search_candidates() (evennia.objects.objects.DefaultObject method)</a>
</li>
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_direct_match">get_search_direct_match() (evennia.objects.objects.DefaultObject method)</a>
</li>
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_query_replacement">get_search_query_replacement() (evennia.objects.objects.DefaultObject method)</a>
</li>
<li><a href="api/evennia.contrib.rpg.rpsystem.rpsystem.html#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.get_search_result">get_search_result() (evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject method)</a>
<ul>
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_search_result">(evennia.objects.objects.DefaultObject method)</a>
</li>
</ul></li>
<li><a href="api/evennia.contrib.grid.extended_room.extended_room.html#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.get_season">get_season() (evennia.contrib.grid.extended_room.extended_room.ExtendedRoom method)</a>
</li>
<li><a href="api/evennia.web.api.views.html#evennia.web.api.views.GeneralViewSetMixin.get_serializer_class">get_serializer_class() (evennia.web.api.views.GeneralViewSetMixin method)</a>
@ -11078,6 +11084,8 @@
<li><a href="api/evennia.contrib.grid.xyzgrid.xymap_legend.html#evennia.contrib.grid.xyzgrid.xymap_legend.TransitionMapNode.get_spawn_xyz">(evennia.contrib.grid.xyzgrid.xymap_legend.TransitionMapNode method)</a>
</li>
</ul></li>
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.get_stacked_results">get_stacked_results() (evennia.objects.objects.DefaultObject method)</a>
</li>
<li><a href="api/evennia.scripts.ondemandhandler.html#evennia.scripts.ondemandhandler.OnDemandHandler.get_stage">get_stage() (evennia.scripts.ondemandhandler.OnDemandHandler method)</a>
<ul>
@ -11263,6 +11271,8 @@
<li><a href="api/evennia.contrib.full_systems.evscaperoom.objects.html#evennia.contrib.full_systems.evscaperoom.objects.BasePositionable.handle_position">handle_position() (evennia.contrib.full_systems.evscaperoom.objects.BasePositionable method)</a>
</li>
<li><a href="api/evennia.server.portal.ssh.html#evennia.server.portal.ssh.SshProtocol.handle_QUIT">handle_QUIT() (evennia.server.portal.ssh.SshProtocol method)</a>
</li>
<li><a href="api/evennia.objects.objects.html#evennia.objects.objects.DefaultObject.handle_search_results">handle_search_results() (evennia.objects.objects.DefaultObject method)</a>
</li>
<li><a href="api/evennia.server.initial_setup.html#evennia.server.initial_setup.handle_setup">handle_setup() (in module evennia.server.initial_setup)</a>
</li>
@ -18875,8 +18885,6 @@
<ul>
<li><a href="api/evennia.contrib.game_systems.barter.barter.html#evennia.contrib.game_systems.barter.barter.TradeHandler.search">(evennia.contrib.game_systems.barter.barter.TradeHandler method)</a>
</li>
<li><a href="api/evennia.contrib.rpg.rpsystem.rpsystem.html#evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject.search">(evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject method)</a>
</li>
<li><a href="api/evennia.objects.manager.html#evennia.objects.manager.ObjectDBManager.search">(evennia.objects.manager.ObjectDBManager method)</a>
</li>
@ -22128,6 +22136,8 @@
<li><a href="api/evennia.contrib.rpg.traits.tests.html#evennia.contrib.rpg.traits.tests.TestNumericTraitOperators.test_mul_traits">test_mul_traits() (evennia.contrib.rpg.traits.tests.TestNumericTraitOperators method)</a>
</li>
<li><a href="api/evennia.contrib.base_systems.building_menu.tests.html#evennia.contrib.base_systems.building_menu.tests.TestBuildingMenu.test_multi_level">test_multi_level() (evennia.contrib.base_systems.building_menu.tests.TestBuildingMenu method)</a>
</li>
<li><a href="api/evennia.contrib.rpg.rpsystem.tests.html#evennia.contrib.rpg.rpsystem.tests.TestRPSystemCommands.test_multi_match_search">test_multi_match_search() (evennia.contrib.rpg.rpsystem.tests.TestRPSystemCommands method)</a>
</li>
<li><a href="api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestSystemCommands.test_multimatch">test_multimatch() (evennia.commands.default.tests.TestSystemCommands method)</a>
</li>
@ -22420,11 +22430,11 @@
<li><a href="api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestBuilding.test_set_home">test_set_home() (evennia.commands.default.tests.TestBuilding method)</a>
</li>
<li><a href="api/evennia.commands.default.tests.html#evennia.commands.default.tests.TestBuilding.test_set_obj_alias">test_set_obj_alias() (evennia.commands.default.tests.TestBuilding method)</a>
</li>
<li><a href="api/evennia.contrib.base_systems.building_menu.tests.html#evennia.contrib.base_systems.building_menu.tests.TestBuildingMenu.test_setattr">test_setattr() (evennia.contrib.base_systems.building_menu.tests.TestBuildingMenu method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/evennia.contrib.base_systems.building_menu.tests.html#evennia.contrib.base_systems.building_menu.tests.TestBuildingMenu.test_setattr">test_setattr() (evennia.contrib.base_systems.building_menu.tests.TestBuildingMenu method)</a>
</li>
<li><a href="api/evennia.contrib.game_systems.gendersub.tests.html#evennia.contrib.game_systems.gendersub.tests.TestGenderSub.test_setgender">test_setgender() (evennia.contrib.game_systems.gendersub.tests.TestGenderSub method)</a>
</li>
<li><a href="api/evennia.contrib.rpg.traits.tests.html#evennia.contrib.rpg.traits.tests.TraitHandlerTest.test_setting">test_setting() (evennia.contrib.rpg.traits.tests.TraitHandlerTest method)</a>
@ -24307,8 +24317,6 @@
<ul>
<li><a href="api/evennia.scripts.tickerhandler.html#evennia.scripts.tickerhandler.Ticker.validate">(evennia.scripts.tickerhandler.Ticker method)</a>
</li>
<li><a href="api/evennia.server.validators.html#evennia.server.validators.EvenniaPasswordValidator.validate">(evennia.server.validators.EvenniaPasswordValidator method)</a>
</li>
<li><a href="api/evennia.utils.optionclasses.html#evennia.utils.optionclasses.BaseOption.validate">(evennia.utils.optionclasses.BaseOption method)</a>
</li>

Binary file not shown.

File diff suppressed because one or more lines are too long