mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 07:16:31 +01:00
2738 lines
No EOL
199 KiB
HTML
2738 lines
No EOL
199 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>evennia.commands package — Evennia 1.0-dev documentation</title>
|
||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||
<script src="../_static/jquery.js"></script>
|
||
<script src="../_static/underscore.js"></script>
|
||
<script src="../_static/doctools.js"></script>
|
||
<script src="../_static/language_data.js"></script>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
|
||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
|
||
|
||
</head><body>
|
||
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
|
||
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="module-evennia.commands">
|
||
<span id="evennia-commands-package"></span><h1>evennia.commands package<a class="headerlink" href="#module-evennia.commands" title="Permalink to this headline">¶</a></h1>
|
||
<p>This sub-package contains Evennia’s command system. It handles
|
||
everything related to parsing input from the account, building cmdsets
|
||
and executing the code associated with a found command class.</p>
|
||
<p>commands.default contains all the default “mux-like” commands of
|
||
Evennia.</p>
|
||
<div class="section" id="subpackages">
|
||
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
|
||
<div class="toctree-wrapper compound">
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="evennia.commands.default.html">evennia.commands.default package</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#submodules">Submodules</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.account">evennia.commands.default.account module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.admin">evennia.commands.default.admin module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.batchprocess">evennia.commands.default.batchprocess module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.building">evennia.commands.default.building module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.cmdset_account">evennia.commands.default.cmdset_account module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.cmdset_character">evennia.commands.default.cmdset_character module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.cmdset_session">evennia.commands.default.cmdset_session module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.cmdset_unloggedin">evennia.commands.default.cmdset_unloggedin module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.comms">evennia.commands.default.comms module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.general">evennia.commands.default.general module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.help">evennia.commands.default.help module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.muxcommand">evennia.commands.default.muxcommand module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.syscommands">evennia.commands.default.syscommands module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.system">evennia.commands.default.system module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#evennia-commands-default-tests-module">evennia.commands.default.tests module</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="evennia.commands.default.html#module-evennia.commands.default.unloggedin">evennia.commands.default.unloggedin module</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="submodules">
|
||
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
|
||
</div>
|
||
<div class="section" id="module-evennia.commands.cmdhandler">
|
||
<span id="evennia-commands-cmdhandler-module"></span><h2>evennia.commands.cmdhandler module<a class="headerlink" href="#module-evennia.commands.cmdhandler" title="Permalink to this headline">¶</a></h2>
|
||
<p>Command handler</p>
|
||
<p>This module contains the infrastructure for accepting commands on the
|
||
command line. The processing of a command works as follows:</p>
|
||
<ol class="arabic">
|
||
<li><p>The calling object (caller) is analyzed based on its callertype.</p></li>
|
||
<li><p>Cmdsets are gathered from different sources:
|
||
- channels: all available channel names are auto-created into a cmdset, to allow</p>
|
||
<blockquote>
|
||
<div><p>for giving the channel name and have the following immediately
|
||
sent to the channel. The sending is performed by the CMD_CHANNEL
|
||
system command.</p>
|
||
</div></blockquote>
|
||
<ul class="simple">
|
||
<li><p>object cmdsets: all objects at caller’s location are scanned for non-empty
|
||
cmdsets. This includes cmdsets on exits.</p></li>
|
||
<li><p>caller: the caller is searched for its own currently active cmdset.</p></li>
|
||
<li><p>account: lastly the cmdsets defined on caller.account are added.</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p>The collected cmdsets are merged together to a combined, current cmdset.</p></li>
|
||
<li><p>If the input string is empty -> check for CMD_NOINPUT command in
|
||
current cmdset or fallback to error message. Exit.</p></li>
|
||
<li><p>The Command Parser is triggered, using the current cmdset to analyze the
|
||
input string for possible command matches.</p></li>
|
||
<li><p>If multiple matches are found -> check for CMD_MULTIMATCH in current
|
||
cmdset, or fallback to error message. Exit.</p></li>
|
||
<li><p>If no match was found -> check for CMD_NOMATCH in current cmdset or
|
||
fallback to error message. Exit.</p></li>
|
||
<li><p>A single match was found. If this is a channel-command (i.e. the
|
||
ommand name is that of a channel), –> check for CMD_CHANNEL in
|
||
current cmdset or use channelhandler default. Exit.</p></li>
|
||
<li><p>At this point we have found a normal command. We assign useful variables to it that
|
||
will be available to the command coder at run-time.</p></li>
|
||
</ol>
|
||
<ol class="arabic simple" start="12">
|
||
<li><p>We have a unique cmdobject, primed for use. Call all hooks:</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><p><cite>at_pre_cmd()</cite>, <cite>cmdobj.parse()</cite>, <cite>cmdobj.func()</cite> and finally <cite>at_post_cmd()</cite>.</p>
|
||
</div></blockquote>
|
||
<ol class="arabic simple" start="13">
|
||
<li><p>Return deferred that will fire with the return from <cite>cmdobj.func()</cite> (unused by default).</p></li>
|
||
</ol>
|
||
<dl class="function">
|
||
<dt id="evennia.commands.cmdhandler.cmdhandler">
|
||
<code class="sig-prename descclassname">evennia.commands.cmdhandler.</code><code class="sig-name descname">cmdhandler</code><span class="sig-paren">(</span><em class="sig-param">called_by</em>, <em class="sig-param">raw_string</em>, <em class="sig-param">_testing=False</em>, <em class="sig-param">callertype='session'</em>, <em class="sig-param">session=None</em>, <em class="sig-param">cmdobj=None</em>, <em class="sig-param">cmdobj_key=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdhandler.html#cmdhandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdhandler.cmdhandler" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This is the main mechanism that handles any string sent to the engine.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>called_by</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>Account</em><em> or </em><em>Object</em>) – Object from which this
|
||
command was called. which this was called from. What this is
|
||
depends on the game state.</p></li>
|
||
<li><p><strong>raw_string</strong> (<em>str</em>) – The command string as given on the command line.</p></li>
|
||
<li><p><strong>_testing</strong> (<em>bool</em><em>, </em><em>optional</em>) – Used for debug purposes and decides if we
|
||
should actually execute the command or not. If True, the
|
||
command instance will be returned.</p></li>
|
||
<li><p><strong>callertype</strong> (<em>str</em><em>, </em><em>optional</em>) – One of “session”, “account” or
|
||
“object”. These are treated in decending order, so when the
|
||
Session is the caller, it will merge its own cmdset into
|
||
cmdsets from both Account and eventual puppeted Object (and
|
||
cmdsets in its room etc). An Account will only include its own
|
||
cmdset and the Objects and so on. Merge order is the same
|
||
order, so that Object cmdsets are merged in last, giving them
|
||
precendence for same-name and same-prio commands.</p></li>
|
||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – Relevant if callertype is “account” - the session will help
|
||
retrieve the correct cmdsets from puppeted objects.</p></li>
|
||
<li><p><strong>cmdobj</strong> (<a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><em>Command</em></a><em>, </em><em>optional</em>) – If given a command instance, this will be executed using
|
||
<cite>called_by</cite> as the caller, <cite>raw_string</cite> representing its arguments and (optionally)
|
||
<cite>cmdobj_key</cite> as its input command name. No cmdset lookup will be performed but
|
||
all other options apply as normal. This allows for running a specific Command
|
||
within the command system mechanism.</p></li>
|
||
<li><p><strong>cmdobj_key</strong> (<em>string</em><em>, </em><em>optional</em>) – Used together with <cite>cmdobj</cite> keyword to specify
|
||
which cmdname should be assigned when calling the specified Command instance. This
|
||
is made available as <cite>self.cmdstring</cite> when the Command runs.
|
||
If not given, the command will be assumed to be called as <cite>cmdobj.key</cite>.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<dl class="simple">
|
||
<dt>Kwargs:</dt><dd><dl class="simple">
|
||
<dt>kwargs (any): other keyword arguments will be assigned as named variables on the</dt><dd><p>retrieved command object <em>before</em> it is executed. This is unused
|
||
in default Evennia but may be used by code to set custom flags or
|
||
special operating conditions for a command as it executes.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd>
|
||
</dl>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>This deferred is fired with the return
|
||
value of the command’s <cite>func</cite> method. This is not used in
|
||
default Evennia.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>deferred (Deferred)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="exception">
|
||
<dt id="evennia.commands.cmdhandler.InterruptCommand">
|
||
<em class="property">exception </em><code class="sig-prename descclassname">evennia.commands.cmdhandler.</code><code class="sig-name descname">InterruptCommand</code><a class="reference internal" href="../_modules/evennia/commands/command.html#InterruptCommand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdhandler.InterruptCommand" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
|
||
<p>Cleanly interrupt a command.</p>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-evennia.commands.cmdparser">
|
||
<span id="evennia-commands-cmdparser-module"></span><h2>evennia.commands.cmdparser module<a class="headerlink" href="#module-evennia.commands.cmdparser" title="Permalink to this headline">¶</a></h2>
|
||
<p>The default command parser. Use your own by assigning
|
||
<cite>settings.COMMAND_PARSER</cite> to a Python path to a module containing the
|
||
replacing cmdparser function. The replacement parser must accept the
|
||
same inputs as the default one.</p>
|
||
<dl class="function">
|
||
<dt id="evennia.commands.cmdparser.build_matches">
|
||
<code class="sig-prename descclassname">evennia.commands.cmdparser.</code><code class="sig-name descname">build_matches</code><span class="sig-paren">(</span><em class="sig-param">raw_string</em>, <em class="sig-param">cmdset</em>, <em class="sig-param">include_prefixes=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdparser.html#build_matches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdparser.build_matches" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Build match tuples by matching raw_string against available commands.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>raw_string</strong> (<em>str</em>) – Input string that can look in any way; the only assumption is
|
||
that the sought command’s name/alias must be <em>first</em> in the string.</p></li>
|
||
<li><p><strong>cmdset</strong> (<a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><em>CmdSet</em></a>) – The current cmdset to pick Commands from.</p></li>
|
||
<li><p><strong>include_prefixes</strong> (<em>bool</em>) – If set, include prefixes like @, ! etc (specified in settings)
|
||
in the match, otherwise strip them before matching.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>matches (list) A list of match tuples created by <cite>cmdparser.create_match</cite>.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="function">
|
||
<dt id="evennia.commands.cmdparser.cmdparser">
|
||
<code class="sig-prename descclassname">evennia.commands.cmdparser.</code><code class="sig-name descname">cmdparser</code><span class="sig-paren">(</span><em class="sig-param">raw_string</em>, <em class="sig-param">cmdset</em>, <em class="sig-param">caller</em>, <em class="sig-param">match_index=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdparser.html#cmdparser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdparser.cmdparser" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This function is called by the cmdhandler once it has
|
||
gathered and merged all valid cmdsets valid for this particular parsing.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>raw_string</strong> (<em>str</em>) – The unparsed text entered by the caller.</p></li>
|
||
<li><p><strong>cmdset</strong> (<a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><em>CmdSet</em></a>) – The merged, currently valid cmdset</p></li>
|
||
<li><p><strong>caller</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>Account</em><em> or </em><em>Object</em>) – The caller triggering this parsing.</p></li>
|
||
<li><p><strong>match_index</strong> (<em>int</em><em>, </em><em>optional</em>) – Index to pick a given match in a
|
||
list of same-named command matches. If this is given, it suggests
|
||
this is not the first time this function was called: normally
|
||
the first run resulted in a multimatch, and the index is given
|
||
to select between the results for the second run.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p><dl class="simple">
|
||
<dt>This is a list of match-tuples as returned by <cite>create_match</cite>.</dt><dd><p>If no matches were found, this is an empty list.</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>matches (list)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>The cmdparser understand the following command combinations (where
|
||
[] marks optional parts.</p>
|
||
<p><code class="docutils literal notranslate"><span class="pre">`</span>
|
||
<span class="pre">[cmdname[</span> <span class="pre">cmdname2</span> <span class="pre">cmdname3</span> <span class="pre">...]</span> <span class="pre">[the</span> <span class="pre">rest]</span>
|
||
<span class="pre">`</span></code></p>
|
||
<p>A command may consist of any number of space-separated words of any
|
||
length, and contain any character. It may also be empty.</p>
|
||
<p>The parser makes use of the cmdset to find command candidates. The
|
||
parser return a list of matches. Each match is a tuple with its
|
||
first three elements being the parsed cmdname (lower case),
|
||
the remaining arguments, and the matched cmdobject from the cmdset.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="function">
|
||
<dt id="evennia.commands.cmdparser.create_match">
|
||
<code class="sig-prename descclassname">evennia.commands.cmdparser.</code><code class="sig-name descname">create_match</code><span class="sig-paren">(</span><em class="sig-param">cmdname</em>, <em class="sig-param">string</em>, <em class="sig-param">cmdobj</em>, <em class="sig-param">raw_cmdname</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdparser.html#create_match"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdparser.create_match" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Builds a command match by splitting the incoming string and
|
||
evaluating the quality of the match.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdname</strong> (<em>str</em>) – Name of command to check for.</p></li>
|
||
<li><p><strong>string</strong> (<em>str</em>) – The string to match against.</p></li>
|
||
<li><p><strong>cmdobj</strong> (<em>str</em>) – The full Command instance.</p></li>
|
||
<li><p><strong>raw_cmdname</strong> (<em>str</em><em>, </em><em>optional</em>) – If CMD_IGNORE_PREFIX is set and the cmdname starts with
|
||
one of the prefixes to ignore, this contains the raw, unstripped cmdname,
|
||
otherwise it is None.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p><dl class="simple">
|
||
<dt>This is on the form (cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname),</dt><dd><p>where <cite>cmdname</cite> is the command’s name and <cite>args</cite> is the rest of the incoming
|
||
string, without said command name. <cite>cmdobj</cite> is
|
||
the Command instance, the cmdlen is the same as len(cmdname) and mratio
|
||
is a measure of how big a part of the full input string the cmdname
|
||
takes up - an exact match would be 1.0. Finally, the <cite>raw_cmdname</cite> is
|
||
the cmdname unmodified by eventual prefix-stripping.</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>match (tuple)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="function">
|
||
<dt id="evennia.commands.cmdparser.try_num_prefixes">
|
||
<code class="sig-prename descclassname">evennia.commands.cmdparser.</code><code class="sig-name descname">try_num_prefixes</code><span class="sig-paren">(</span><em class="sig-param">raw_string</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdparser.html#try_num_prefixes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdparser.try_num_prefixes" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Test if user tried to separate multi-matches with a number separator
|
||
(default 1-name, 2-name etc). This is usually called last, if no other
|
||
match was found.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>raw_string</strong> (<em>str</em>) – The user input to parse.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p><dl class="simple">
|
||
<dt>If a multimatch-separator was detected,</dt><dd><p>this is stripped out as an integer to separate between the matches. The
|
||
new_raw_string is the result of stripping out that identifier. If no
|
||
such form was found, returns (None, None).</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>mindex, new_raw_string (tuple)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Example</p>
|
||
<p>In the default configuration, entering 2-ball (e.g. in a room will more
|
||
than one ‘ball’ object), will lead to a multimatch and this function
|
||
will parse <cite>“2-ball”</cite> and return <cite>(2, “ball”)</cite>.</p>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-evennia.commands.cmdset">
|
||
<span id="evennia-commands-cmdset-module"></span><h2>evennia.commands.cmdset module<a class="headerlink" href="#module-evennia.commands.cmdset" title="Permalink to this headline">¶</a></h2>
|
||
<p>A Command Set (CmdSet) holds a set of commands. The Cmdsets can be
|
||
merged and combined to create new sets of commands in a
|
||
non-destructive way. This makes them very powerful for implementing
|
||
custom game states where different commands (or different variations
|
||
of commands) are available to the accounts depending on circumstance.</p>
|
||
<p>The available merge operations are partly borrowed from mathematical
|
||
Set theory.</p>
|
||
<ul class="simple">
|
||
<li><dl class="simple">
|
||
<dt>Union The two command sets are merged so that as many commands as</dt><dd><p>possible of each cmdset ends up in the merged cmdset. Same-name
|
||
commands are merged by priority. This is the most common default.
|
||
Ex: A1,A3 + B1,B2,B4,B5 = A1,B2,A3,B4,B5</p>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><dl class="simple">
|
||
<dt>Intersect - Only commands found in <em>both</em> cmdsets (i.e. which have</dt><dd><p>same names) end up in the merged cmdset, with the higher-priority
|
||
cmdset replacing the lower one. Ex: A1,A3 + B1,B2,B4,B5 = A1</p>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><dl class="simple">
|
||
<dt>Replace - The commands of this cmdset completely replaces the</dt><dd><p>lower-priority cmdset’s commands, regardless of if same-name commands
|
||
exist. Ex: A1,A3 + B1,B2,B4,B5 = A1,A3</p>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><dl class="simple">
|
||
<dt>Remove - This removes the relevant commands from the</dt><dd><p>lower-priority cmdset completely. They are not replaced with
|
||
anything, so this in effects uses the high-priority cmdset as a filter
|
||
to affect the low-priority cmdset. Ex: A1,A3 + B1,B2,B4,B5 = B2,B4,B5</p>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
</ul>
|
||
<dl class="class">
|
||
<dt id="evennia.commands.cmdset.CmdSet">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.cmdset.</code><code class="sig-name descname">CmdSet</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>This class describes a unique cmdset that understands priorities.
|
||
CmdSets can be merged and made to perform various set operations
|
||
on each other. CmdSets have priorities that affect which of their
|
||
ingoing commands gets used.</p>
|
||
<p>In the examples, cmdset A always have higher priority than cmdset B.</p>
|
||
<p>key - the name of the cmdset. This can be used on its own for game
|
||
operations</p>
|
||
<p>mergetype (partly from Set theory):</p>
|
||
<blockquote>
|
||
<div><dl>
|
||
<dt>Union - The two command sets are merged so that as many</dt><dd><p>commands as possible of each cmdset ends up in the
|
||
merged cmdset. Same-name commands are merged by
|
||
priority. This is the most common default.
|
||
Ex: A1,A3 + B1,B2,B4,B5 = A1,B2,A3,B4,B5</p>
|
||
</dd>
|
||
<dt>Intersect - Only commands found in <em>both</em> cmdsets</dt><dd><p>(i.e. which have same names) end up in the merged
|
||
cmdset, with the higher-priority cmdset replacing the
|
||
lower one. Ex: A1,A3 + B1,B2,B4,B5 = A1</p>
|
||
</dd>
|
||
<dt>Replace - The commands of this cmdset completely replaces</dt><dd><p>the lower-priority cmdset’s commands, regardless
|
||
of if same-name commands exist.
|
||
Ex: A1,A3 + B1,B2,B4,B5 = A1,A3</p>
|
||
</dd>
|
||
<dt>Remove - This removes the relevant commands from the</dt><dd><blockquote>
|
||
<div><p>lower-priority cmdset completely. They are not
|
||
replaced with anything, so this in effects uses the
|
||
high-priority cmdset as a filter to affect the
|
||
low-priority cmdset.
|
||
Ex: A1,A3 + B1,B2,B4,B5 = B2,B4,B5</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>Note: Commands longer than 2 characters and starting</dt><dd><p>with double underscrores, like ‘__noinput_command’
|
||
are considered ‘system commands’ and are
|
||
excempt from all merge operations - they are
|
||
ALWAYS included across mergers and only affected
|
||
if same-named system commands replace them.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd>
|
||
</dl>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>priority- All cmdsets are always merged in pairs of two so that</dt><dd><p>the higher set’s mergetype is applied to the
|
||
lower-priority cmdset. Default commands have priority 0,
|
||
high-priority ones like Exits and Channels have 10 and 9.
|
||
Priorities can be negative as well to give default
|
||
commands preference.</p>
|
||
</dd>
|
||
<dt>duplicates - determines what happens when two sets of equal</dt><dd><p>priority merge. Default has the first of them in the
|
||
merger (i.e. A above) automatically taking
|
||
precedence. But if allow_duplicates is true, the
|
||
result will be a merger with more than one of each
|
||
name match. This will usually lead to the account
|
||
receiving a multiple-match error higher up the road,
|
||
but can be good for things like cmdsets on non-account
|
||
objects in a room, to allow the system to warn that
|
||
more than one ‘ball’ in the room has the same ‘kick’
|
||
command defined on it, so it may offer a chance to
|
||
select which ball to kick … Allowing duplicates
|
||
only makes sense for Union and Intersect, the setting
|
||
is ignored for the other mergetypes.</p>
|
||
</dd>
|
||
<dt>key_mergetype (dict) - allows the cmdset to define a unique</dt><dd><p>mergetype for particular cmdsets. Format is
|
||
{CmdSetkeystring:mergetype}. Priorities still apply.
|
||
Example: {‘Myevilcmdset’,’Replace’} which would make
|
||
sure for this set to always use ‘Replace’ on
|
||
Myevilcmdset no matter what overall mergetype this set
|
||
has.</p>
|
||
</dd>
|
||
<dt>no_objs - don’t include any commands from nearby objects</dt><dd><p>when searching for suitable commands</p>
|
||
</dd>
|
||
<dt>no_exits - ignore the names of exits when matching against</dt><dd><p>commands</p>
|
||
</dd>
|
||
<dt>no_channels - ignore the name of channels when matching against</dt><dd><p>commands (WARNING- this is dangerous since the
|
||
account can then not even ask staff for help if
|
||
something goes wrong)</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Creates a new CmdSet instance.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdsetobj</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>Account</em><em>, </em><em>Object</em><em>, </em><em>optional</em>) – This is the database object
|
||
to which this particular instance of cmdset is related. It
|
||
is often a character but may also be a regular object, Account
|
||
or Session.</p></li>
|
||
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) – The idenfier for this cmdset. This
|
||
helps if wanting to selectively remov cmdsets.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet._duplicate">
|
||
<code class="sig-name descname">_duplicate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet._duplicate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet._duplicate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Returns a new cmdset with the same settings as this one (no
|
||
actual commands are copied over)</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>A copy of the current cmdset.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>cmdset (Cmdset)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet._instantiate">
|
||
<code class="sig-name descname">_instantiate</code><span class="sig-paren">(</span><em class="sig-param">cmd</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet._instantiate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet._instantiate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>checks so that object is an instantiated command and not, say
|
||
a cmdclass. If it is, instantiate it. Other types, like
|
||
strings, are passed through.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>cmd</strong> (<em>any</em>) – Entity to analyze.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>An instantiated Command or the input unmodified.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>result (any)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet._intersect">
|
||
<code class="sig-name descname">_intersect</code><span class="sig-paren">(</span><em class="sig-param">cmdset_a</em>, <em class="sig-param">cmdset_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet._intersect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet._intersect" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Merge two sets using intersection merger</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset_a</strong> (<em>Cmdset</em>) – Cmdset given higher priority in the case of a tie.</p></li>
|
||
<li><p><strong>cmdset_b</strong> (<em>Cmdset</em>) – Cmdset given lower priority in the case of a tie.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>The result of A (intersect) B operation.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmdset_c (Cmdset)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<dl class="simple">
|
||
<dt>Intersection, C = A (intersect) B, means that C only gets the</dt><dd><p>parts of A and B that are the same (that is, the commands
|
||
of each set having the same name. Only the one of these
|
||
having the higher prio ends up in C).</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet._remove">
|
||
<code class="sig-name descname">_remove</code><span class="sig-paren">(</span><em class="sig-param">cmdset_a</em>, <em class="sig-param">cmdset_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet._remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet._remove" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Filter a set by another.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset_a</strong> (<em>Cmdset</em>) – Cmdset acting as a removal filter.</p></li>
|
||
<li><p><strong>cmdset_b</strong> (<em>Cmdset</em>) – Cmdset to filter</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>B, with all matching commands from A removed.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmdset_c (Cmdset)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>C = B - A, where A is used to remove the commands of B.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet._replace">
|
||
<code class="sig-name descname">_replace</code><span class="sig-paren">(</span><em class="sig-param">cmdset_a</em>, <em class="sig-param">cmdset_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet._replace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet._replace" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Replace the contents of one set with another</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset_a</strong> (<em>Cmdset</em>) – Cmdset replacing</p></li>
|
||
<li><p><strong>cmdset_b</strong> (<em>Cmdset</em>) – Cmdset to replace</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>This is indentical to cmdset_a.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmdset_c (Cmdset)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>C = A, where B is ignored.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet._union">
|
||
<code class="sig-name descname">_union</code><span class="sig-paren">(</span><em class="sig-param">cmdset_a</em>, <em class="sig-param">cmdset_b</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet._union"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet._union" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Merge two sets using union merger</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset_a</strong> (<em>Cmdset</em>) – Cmdset given higher priority in the case of a tie.</p></li>
|
||
<li><p><strong>cmdset_b</strong> (<em>Cmdset</em>) – Cmdset given lower priority in the case of a tie.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>The result of A U B operation.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmdset_c (Cmdset)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>Union, C = A U B, means that C gets all elements from both A and B.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.add">
|
||
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">cmd</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.add" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Add a new command or commands to this CmdSetcommand, a list of
|
||
commands or a cmdset to this cmdset. Note that this is <em>not</em>
|
||
a merge operation (that is handled by the + operator).</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>cmd</strong> (<a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><em>Command</em></a><em>, </em><em>list</em><em>, </em><em>Cmdset</em>) – This allows for adding one or
|
||
more commands to this Cmdset in one go. If another Cmdset
|
||
is given, all its commands will be added.</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>If cmd already exists in set, it will replace the old one
|
||
(no priority checking etc happens here). This is very useful
|
||
when overloading default commands).</p>
|
||
<p>If cmd is another cmdset class or -instance, the commands of
|
||
that command set is added to this one, as if they were part of
|
||
the original cmdset definition. No merging or priority checks
|
||
are made, rather later added commands will simply replace
|
||
existing ones to make a unique set.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.at_cmdset_creation">
|
||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||
class, and should take care of populating the cmdset by use of
|
||
self.add().</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.count">
|
||
<code class="sig-name descname">count</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.count" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Number of commands in set.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>Number of commands in this Cmdset.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>N (int)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.duplicates">
|
||
<code class="sig-name descname">duplicates</code><em class="property"> = None</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.duplicates" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.errmessage">
|
||
<code class="sig-name descname">errmessage</code><em class="property"> = ''</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.errmessage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.get">
|
||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">cmd</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.get" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get a command from the cmdset. This is mostly useful to
|
||
check if the command is part of this cmdset or not.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>cmd</strong> (<a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><em>Command</em></a><em> or </em><em>str</em>) – Either the Command object or its key.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>The first matching Command in the set.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmd (<a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command">Command</a>)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.get_all_cmd_keys_and_aliases">
|
||
<code class="sig-name descname">get_all_cmd_keys_and_aliases</code><span class="sig-paren">(</span><em class="sig-param">caller=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.get_all_cmd_keys_and_aliases"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.get_all_cmd_keys_and_aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Collects keys/aliases from commands</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>caller</strong> (<em>Object</em><em>, </em><em>optional</em>) – If set, this is used to check access permissions
|
||
on each command. Only commands that pass are returned.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p><dl class="simple">
|
||
<dt>A list of all command keys and aliases in this cmdset. If <cite>caller</cite></dt><dd><p>was given, this list will only contain commands to which <cite>caller</cite> passed
|
||
the <cite>call</cite> locktype check.</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>names (list)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.get_system_cmds">
|
||
<code class="sig-name descname">get_system_cmds</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.get_system_cmds"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.get_system_cmds" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get system commands in cmdset</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>The system commands in the set.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>sys_cmds (list)</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>As far as the Cmdset is concerned, system commands are any
|
||
commands with a key starting with double underscore __.
|
||
These are excempt from merge operations.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'Unnamed CmdSet'</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.key_mergetypes">
|
||
<code class="sig-name descname">key_mergetypes</code><em class="property"> = {}</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.key_mergetypes" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.make_unique">
|
||
<code class="sig-name descname">make_unique</code><span class="sig-paren">(</span><em class="sig-param">caller</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.make_unique"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.make_unique" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Remove duplicate command-keys (unsafe)</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>caller</strong> (<em>object</em>) – Commands on this object will
|
||
get preference in the duplicate removal.</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>This is an unsafe command meant to clean out a cmdset of
|
||
doublet commands after it has been created. It is useful
|
||
for commands inheriting cmdsets from the cmdhandler where
|
||
obj-based cmdsets always are added double. Doublets will
|
||
be weeded out with preference to commands defined on
|
||
caller, otherwise just by first-come-first-served.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.mergetype">
|
||
<code class="sig-name descname">mergetype</code><em class="property"> = 'Union'</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.mergetype" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.no_channels">
|
||
<code class="sig-name descname">no_channels</code><em class="property"> = None</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.no_channels" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.no_exits">
|
||
<code class="sig-name descname">no_exits</code><em class="property"> = None</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.no_exits" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.no_objs">
|
||
<code class="sig-name descname">no_objs</code><em class="property"> = None</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.no_objs" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.commands.cmdset.CmdSet'</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.permanent">
|
||
<code class="sig-name descname">permanent</code><em class="property"> = False</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.permanent" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.priority">
|
||
<code class="sig-name descname">priority</code><em class="property"> = 0</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.priority" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdset.CmdSet.remove">
|
||
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param">cmd</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdset.html#CmdSet.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.remove" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Remove a command instance from the cmdset.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>cmd</strong> (<a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><em>Command</em></a><em> or </em><em>str</em>) – Either the Command object to remove
|
||
or the key of such a command.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.cmdset.CmdSet.to_duplicate">
|
||
<code class="sig-name descname">to_duplicate</code><em class="property"> = ('key', 'cmdsetobj', 'no_exits', 'no_objs', 'no_channels', 'permanent', 'mergetype', 'priority', 'duplicates', 'errmessage')</em><a class="headerlink" href="#evennia.commands.cmdset.CmdSet.to_duplicate" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-evennia.commands.cmdsethandler">
|
||
<span id="evennia-commands-cmdsethandler-module"></span><h2>evennia.commands.cmdsethandler module<a class="headerlink" href="#module-evennia.commands.cmdsethandler" title="Permalink to this headline">¶</a></h2>
|
||
<p>CmdSethandler</p>
|
||
<p>The Cmdsethandler tracks an object’s ‘Current CmdSet’, which is the
|
||
current merged sum of all CmdSets added to it.</p>
|
||
<p>A CmdSet constitues a set of commands. The CmdSet works as a special
|
||
intelligent container that, when added to other CmdSet make sure that
|
||
same-name commands are treated correctly (usually so there are no
|
||
doublets). This temporary but up-to-date merger of CmdSet is jointly
|
||
called the Current Cmset. It is this Current CmdSet that the
|
||
commandhandler looks through whenever an account enters a command (it
|
||
also adds CmdSets from objects in the room in real-time). All account
|
||
objects have a ‘default cmdset’ containing all the normal in-game mud
|
||
commands (look etc).</p>
|
||
<p>So what is all this cmdset complexity good for?</p>
|
||
<p>In its simplest form, a CmdSet has no commands, only a key name. In
|
||
this case the cmdset’s use is up to each individual game - it can be
|
||
used by an AI module for example (mobs in cmdset ‘roam’ move from room
|
||
to room, in cmdset ‘attack’ they enter combat with accounts).</p>
|
||
<p>Defining commands in cmdsets offer some further powerful game-design
|
||
consequences however. Here are some examples:</p>
|
||
<p>As mentioned above, all accounts always have at least the Default
|
||
CmdSet. This contains the set of all normal-use commands in-game,
|
||
stuff like look and @desc etc. Now assume our players end up in a dark
|
||
room. You don’t want the player to be able to do much in that dark
|
||
room unless they light a candle. You could handle this by changing all
|
||
your normal commands to check if the player is in a dark room. This
|
||
rapidly goes unwieldly and error prone. Instead you just define a
|
||
cmdset with only those commands you want to be available in the ‘dark’
|
||
cmdset - maybe a modified look command and a ‘light candle’ command -
|
||
and have this completely replace the default cmdset.</p>
|
||
<p>Another example: Say you want your players to be able to go
|
||
fishing. You could implement this as a ‘fish’ command that fails
|
||
whenever the account has no fishing rod. Easy enough. But what if you
|
||
want to make fishing more complex - maybe you want four-five different
|
||
commands for throwing your line, reeling in, etc? Most players won’t
|
||
(we assume) have fishing gear, and having all those detailed commands
|
||
is cluttering up the command list. And what if you want to use the
|
||
‘throw’ command also for throwing rocks etc instead of ‘using it up’
|
||
for a minor thing like fishing?</p>
|
||
<p>So instead you put all those detailed fishing commands into their own
|
||
CommandSet called ‘Fishing’. Whenever the player gives the command
|
||
‘fish’ (presumably the code checks there is also water nearby), only
|
||
THEN this CommandSet is added to the Cmdhandler of the account. The
|
||
‘throw’ command (which normally throws rocks) is replaced by the
|
||
custom ‘fishing variant’ of throw. What has happened is that the
|
||
Fishing CommandSet was merged on top of the Default ones, and due to
|
||
how we defined it, its command overrules the default ones.</p>
|
||
<p>When we are tired of fishing, we give the ‘go home’ command (or
|
||
whatever) and the Cmdhandler simply removes the fishing CommandSet
|
||
so that we are back at defaults (and can throw rocks again).</p>
|
||
<p>Since any number of CommandSets can be piled on top of each other, you
|
||
can then implement separate sets for different situations. For
|
||
example, you can have a ‘On a boat’ set, onto which you then tack on
|
||
the ‘Fishing’ set. Fishing from a boat? No problem!</p>
|
||
<dl class="function">
|
||
<dt id="evennia.commands.cmdsethandler.import_cmdset">
|
||
<code class="sig-prename descclassname">evennia.commands.cmdsethandler.</code><code class="sig-name descname">import_cmdset</code><span class="sig-paren">(</span><em class="sig-param">path</em>, <em class="sig-param">cmdsetobj</em>, <em class="sig-param">emit_to_obj=None</em>, <em class="sig-param">no_logging=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#import_cmdset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.import_cmdset" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This helper function is used by the cmdsethandler to load a cmdset
|
||
instance from a python module, given a python_path. It’s usually accessed
|
||
through the cmdsethandler’s add() and add_default() methods.
|
||
path - This is the full path to the cmdset object on python dot-form</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>path</strong> (<em>str</em>) – The path to the command set to load.</p></li>
|
||
<li><p><strong>cmdsetobj</strong> (<a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><em>CmdSet</em></a>) – The database object/typeclass on which this cmdset is to be
|
||
assigned (this can be also channels and exits, as well as accounts
|
||
but there will always be such an object)</p></li>
|
||
<li><p><strong>emit_to_obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – If given, error is emitted to
|
||
this object (in addition to logging)</p></li>
|
||
<li><p><strong>no_logging</strong> (<em>bool</em><em>, </em><em>optional</em>) – Don’t log/send error messages.
|
||
This can be useful if import_cmdset is just used to check if
|
||
this is a valid python path or not.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p><dl class="simple">
|
||
<dt>The imported command set. If an error was</dt><dd><p>encountered, <cite>commands.cmdsethandler._ErrorCmdSet</cite> is returned
|
||
for the benefit of the handler.</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmdset (<a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet">CmdSet</a>)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.cmdsethandler.</code><code class="sig-name descname">CmdSetHandler</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">init_true=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>The CmdSetHandler is always stored on an object, this object is supplied
|
||
as an argument.</p>
|
||
<p>The ‘current’ cmdset is the merged set currently active for this object.
|
||
This is the set the game engine will retrieve when determining which
|
||
commands are available to the object. The cmdset_stack holds a history of
|
||
all CmdSets to allow the handler to remove/add cmdsets at will. Doing so
|
||
will re-calculate the ‘current’ cmdset.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">init_true=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This method is called whenever an object is recreated.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>obj</strong> (<em>Object</em>) – An reference to the game object this handler
|
||
belongs to.</p></li>
|
||
<li><p><strong>init_true</strong> (<em>bool</em><em>, </em><em>optional</em>) – Set when the handler is initializing
|
||
and loads the current cmdset.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler._import_cmdset">
|
||
<code class="sig-name descname">_import_cmdset</code><span class="sig-paren">(</span><em class="sig-param">cmdset_path</em>, <em class="sig-param">emit_to_obj=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler._import_cmdset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler._import_cmdset" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Method wrapper for import_cmdset; Loads a cmdset from a
|
||
module.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset_path</strong> (<em>str</em>) – The python path to an cmdset object.</p></li>
|
||
<li><p><strong>emit_to_obj</strong> (<em>Object</em>) – The object to send error messages to</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>The imported cmdset.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>cmdset (Cmdset)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.add">
|
||
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">emit_to_obj=None</em>, <em class="sig-param">permanent=False</em>, <em class="sig-param">default_cmdset=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.add" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Add a cmdset to the handler, on top of the old ones, unless it
|
||
is set as the default one (it will then end up at the bottom of the stack)</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset</strong> (<a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><em>CmdSet</em></a><em> or </em><em>str</em>) – Can be a cmdset object or the python path
|
||
to such an object.</p></li>
|
||
<li><p><strong>emit_to_obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – An object to receive error messages.</p></li>
|
||
<li><p><strong>permanent</strong> (<em>bool</em><em>, </em><em>optional</em>) – This cmdset will remain across a server reboot.</p></li>
|
||
<li><p><strong>default_cmdset</strong> (<em>Cmdset</em><em>, </em><em>optional</em>) – Insert this to replace the
|
||
default cmdset position (there is only one such position,
|
||
always at the bottom of the stack).</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>An interesting feature of this method is if you were to send
|
||
it an <em>already instantiated cmdset</em> (i.e. not a class), the
|
||
current cmdsethandler’s obj attribute will then <em>not</em> be
|
||
transferred over to this already instantiated set (this is
|
||
because it might be used elsewhere and can cause strange
|
||
effects). This means you could in principle have the
|
||
handler launch command sets tied to a <em>different</em> object
|
||
than the handler. Not sure when this would be useful, but
|
||
it’s a ‘quirk’ that has to be documented.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.add_default">
|
||
<code class="sig-name descname">add_default</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">emit_to_obj=None</em>, <em class="sig-param">permanent=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.add_default"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.add_default" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Shortcut for adding a default cmdset.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset</strong> (<em>Cmdset</em>) – The Cmdset to add.</p></li>
|
||
<li><p><strong>emit_to_obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – Gets error messages</p></li>
|
||
<li><p><strong>permanent</strong> (<em>bool</em><em>, </em><em>optional</em>) – The new Cmdset should survive a server reboot.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.all">
|
||
<code class="sig-name descname">all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.all" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get all cmdsets.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>All the command sets currently in the handler.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>cmdsets (list)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.clear">
|
||
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.clear" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Removes all Command Sets from the handler except the default one
|
||
(use <cite>self.remove_default</cite> to remove that).</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.delete">
|
||
<code class="sig-name descname">delete</code><span class="sig-paren">(</span><em class="sig-param">cmdset=None</em>, <em class="sig-param">default_cmdset=False</em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.delete" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Remove a cmdset from the handler.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset</strong> (<em>CommandSet</em><em> or </em><em>str</em><em>, </em><em>optional</em>) – This can can be supplied either as a cmdset-key,
|
||
an instance of the CmdSet or a python path to the cmdset.
|
||
If no key is given, the last cmdset in the stack is
|
||
removed. Whenever the cmdset_stack changes, the cmdset is
|
||
updated. If default_cmdset is set, this argument is ignored.</p></li>
|
||
<li><p><strong>default_cmdset</strong> (<em>bool</em><em>, </em><em>optional</em>) – If set, this will remove the
|
||
default cmdset (at the bottom of the stack).</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.delete_default">
|
||
<code class="sig-name descname">delete_default</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.delete_default" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This explicitly deletes only the default cmdset.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.get">
|
||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.get" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get all cmdsets.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>All the command sets currently in the handler.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>cmdsets (list)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.has">
|
||
<code class="sig-name descname">has</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">must_be_default=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.has"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.has" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>checks so the cmdsethandler contains a given cmdset</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset</strong> (<em>str</em><em> or </em><em>Cmdset</em>) – Cmdset key, pythonpath or
|
||
Cmdset to check the existence for.</p></li>
|
||
<li><p><strong>must_be_default</strong> (<em>bool</em><em>, </em><em>optional</em>) – Only return True if
|
||
the checked cmdset is the default one.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>Whether or not the cmdset is in the handler.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>has_cmdset (bool)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.has_cmdset">
|
||
<code class="sig-name descname">has_cmdset</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">must_be_default=False</em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.has_cmdset" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>checks so the cmdsethandler contains a given cmdset</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset</strong> (<em>str</em><em> or </em><em>Cmdset</em>) – Cmdset key, pythonpath or
|
||
Cmdset to check the existence for.</p></li>
|
||
<li><p><strong>must_be_default</strong> (<em>bool</em><em>, </em><em>optional</em>) – Only return True if
|
||
the checked cmdset is the default one.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>Whether or not the cmdset is in the handler.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>has_cmdset (bool)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.remove">
|
||
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param">cmdset=None</em>, <em class="sig-param">default_cmdset=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.remove" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Remove a cmdset from the handler.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>cmdset</strong> (<em>CommandSet</em><em> or </em><em>str</em><em>, </em><em>optional</em>) – This can can be supplied either as a cmdset-key,
|
||
an instance of the CmdSet or a python path to the cmdset.
|
||
If no key is given, the last cmdset in the stack is
|
||
removed. Whenever the cmdset_stack changes, the cmdset is
|
||
updated. If default_cmdset is set, this argument is ignored.</p></li>
|
||
<li><p><strong>default_cmdset</strong> (<em>bool</em><em>, </em><em>optional</em>) – If set, this will remove the
|
||
default cmdset (at the bottom of the stack).</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.remove_default">
|
||
<code class="sig-name descname">remove_default</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.remove_default"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.remove_default" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This explicitly deletes only the default cmdset.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.reset">
|
||
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.reset" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Force reload of all cmdsets in handler. This should be called
|
||
after _CACHED_CMDSETS have been cleared (normally this is
|
||
handled automatically by @reload).</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.cmdsethandler.CmdSetHandler.update">
|
||
<code class="sig-name descname">update</code><span class="sig-paren">(</span><em class="sig-param">init_mode=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/cmdsethandler.html#CmdSetHandler.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.cmdsethandler.CmdSetHandler.update" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Re-adds all sets in the handler to have an updated current
|
||
set.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>init_mode</strong> (<em>bool</em><em>, </em><em>optional</em>) – Used automatically right after
|
||
this handler was created; it imports all permanent cmdsets
|
||
from the database.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-evennia.commands.command">
|
||
<span id="evennia-commands-command-module"></span><h2>evennia.commands.command module<a class="headerlink" href="#module-evennia.commands.command" title="Permalink to this headline">¶</a></h2>
|
||
<p>The base Command class.</p>
|
||
<p>All commands in Evennia inherit from the ‘Command’ class in this module.</p>
|
||
<dl class="class">
|
||
<dt id="evennia.commands.command.Command">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.command.</code><code class="sig-name descname">Command</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The lockhandler works the same as for objects.
|
||
optional kwargs will be set as properties on the Command at runtime,
|
||
overloading evential same-named class properties.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('command',)</em><a class="headerlink" href="#evennia.commands.command.Command._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'command'}</em><a class="headerlink" href="#evennia.commands.command.Command._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command._optimize">
|
||
<code class="sig-name descname">_optimize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command._optimize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command._optimize" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Optimize the key and aliases for lookups.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command._render_decoration">
|
||
<code class="sig-name descname">_render_decoration</code><span class="sig-paren">(</span><em class="sig-param">header_text=None</em>, <em class="sig-param">fill_character=None</em>, <em class="sig-param">edge_character=None</em>, <em class="sig-param">mode='header'</em>, <em class="sig-param">color_header=True</em>, <em class="sig-param">width=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command._render_decoration"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command._render_decoration" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Helper for formatting a string into a pretty display, for a header, separator or footer.</p>
|
||
<dl>
|
||
<dt>Kwargs:</dt><dd><p>header_text (str): Text to include in header.
|
||
fill_character (str): This single character will be used to fill the width of the</p>
|
||
<blockquote>
|
||
<div><p>display.</p>
|
||
</div></blockquote>
|
||
<p>edge_character (str): This character caps the edges of the display.
|
||
mode(str): One of ‘header’, ‘separator’ or ‘footer’.
|
||
color_header (bool): If the header should be colorized based on user options.
|
||
width (int): If not given, the client’s width will be used if available.</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>The decorated and formatted text.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>string (str)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.access">
|
||
<code class="sig-name descname">access</code><span class="sig-paren">(</span><em class="sig-param">srcobj</em>, <em class="sig-param">access_type='cmd'</em>, <em class="sig-param">default=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.access"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.access" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This hook is called by the cmdhandler to determine if srcobj
|
||
is allowed to execute this command. It should return a boolean
|
||
value and is not normally something that need to be changed since
|
||
it’s using the Evennia permission system directly.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>srcobj</strong> (<em>Object</em>) – Object trying to gain permission</p></li>
|
||
<li><p><strong>access_type</strong> (<em>str</em><em>, </em><em>optional</em>) – The lock type to check.</p></li>
|
||
<li><p><strong>default</strong> (<em>bool</em><em>, </em><em>optional</em>) – The fallback result if no lock
|
||
of matching <cite>access_type</cite> is found on this Command.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.command.Command.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.arg_regex">
|
||
<code class="sig-name descname">arg_regex</code><em class="property"> = None</em><a class="headerlink" href="#evennia.commands.command.Command.arg_regex" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.at_post_cmd">
|
||
<code class="sig-name descname">at_post_cmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.at_post_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.at_post_cmd" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This hook is called after the command has finished executing
|
||
(after self.func()).</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.at_pre_cmd">
|
||
<code class="sig-name descname">at_pre_cmd</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.at_pre_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.at_pre_cmd" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This hook is called before self.parse() on all commands. If
|
||
this hook returns anything but False/None, the command
|
||
sequence is aborted.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.auto_help">
|
||
<code class="sig-name descname">auto_help</code><em class="property"> = True</em><a class="headerlink" href="#evennia.commands.command.Command.auto_help" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.client_width">
|
||
<code class="sig-name descname">client_width</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.client_width"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.client_width" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Get the client screenwidth for the session using this command.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>The width (in characters) of the client window.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>client width (int)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.execute_cmd">
|
||
<code class="sig-name descname">execute_cmd</code><span class="sig-paren">(</span><em class="sig-param">raw_string</em>, <em class="sig-param">session=None</em>, <em class="sig-param">obj=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.execute_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.execute_cmd" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A shortcut of execute_cmd on the caller. It appends the
|
||
session automatically.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>raw_string</strong> (<em>str</em>) – Execute this string as a command input.</p></li>
|
||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – If not given, the current command’s Session will be used.</p></li>
|
||
<li><p><strong>obj</strong> (<em>Object</em><em> or </em><em>Account</em><em>, </em><em>optional</em>) – Object or Account on which to call the execute_cmd.
|
||
If not given, self.caller will be used.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<dl class="simple">
|
||
<dt>Kwargs:</dt><dd><p>Other keyword arguments will be added to the found command
|
||
object instace as variables before it executes. This is
|
||
unused by default Evennia but may be used to set flags and
|
||
change operating paramaters for commands at run-time.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.func">
|
||
<code class="sig-name descname">func</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.func"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.func" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This is the actual executing part of the command. It is
|
||
called directly after self.parse(). See the docstring of this
|
||
module for which object properties are available (beyond those
|
||
set in self.parse())</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.get_command_info">
|
||
<code class="sig-name descname">get_command_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.get_command_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.get_command_info" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This is the default output of func() if no func() overload is done.
|
||
Provided here as a separate method so that it can be called for debugging
|
||
purposes when making commands.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.get_extra_info">
|
||
<code class="sig-name descname">get_extra_info</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.get_extra_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.get_extra_info" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Display some extra information that may help distinguish this
|
||
command from others, for instance, in a disambiguity prompt.</p>
|
||
<p>If this command is a potential match in an ambiguous
|
||
situation, one distinguishing feature may be its attachment to
|
||
a nearby object, so we include this if available.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>caller</strong> (<a class="reference internal" href="evennia.typeclasses.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><em>TypedObject</em></a>) – The caller who typed an ambiguous</p></li>
|
||
<li><p><strong>handed to the search function.</strong> (<em>term</em>) – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>A string with identifying information to disambiguate the
|
||
object, conventionally with a preceding space.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.get_help">
|
||
<code class="sig-name descname">get_help</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">cmdset</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.get_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.get_help" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return the help message for this command and this caller.</p>
|
||
<p>By default, return self.__doc__ (the docstring just under
|
||
the class definition). You can override this behavior,
|
||
though, and even customize it depending on the caller, or other
|
||
commands the caller can use.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>caller</strong> (<em>Object</em><em> or </em><em>Account</em>) – the caller asking for help on the command.</p></li>
|
||
<li><p><strong>cmdset</strong> (<a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><em>CmdSet</em></a>) – the command set (if you need additional commands).</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>the help text to provide the caller for this command.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>docstring (str)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.command.Command.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.is_exit">
|
||
<code class="sig-name descname">is_exit</code><em class="property"> = False</em><a class="headerlink" href="#evennia.commands.command.Command.is_exit" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'command'</em><a class="headerlink" href="#evennia.commands.command.Command.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.command.Command.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.lockhandler">
|
||
<code class="sig-name descname">lockhandler</code><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.lockhandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.lockhandler" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.locks">
|
||
<code class="sig-name descname">locks</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.command.Command.locks" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.match">
|
||
<code class="sig-name descname">match</code><span class="sig-paren">(</span><em class="sig-param">cmdname</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.match"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.match" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This is called by the system when searching the available commands,
|
||
in order to determine if this is the one we wanted. cmdname was
|
||
previously extracted from the raw string by the system.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>cmdname</strong> (<em>str</em>) – Always lowercase when reaching this point.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>Match result.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type</dt>
|
||
<dd class="field-odd"><p>result (bool)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.msg">
|
||
<code class="sig-name descname">msg</code><span class="sig-paren">(</span><em class="sig-param">text=None</em>, <em class="sig-param">to_obj=None</em>, <em class="sig-param">from_obj=None</em>, <em class="sig-param">session=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.msg" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This is a shortcut instead of calling msg() directly on an
|
||
object - it will detect if caller is an Object or an Account and
|
||
also appends self.session automatically if self.msg_all_sessions is False.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>text</strong> (<em>str</em><em>, </em><em>optional</em>) – Text string of message to send.</p></li>
|
||
<li><p><strong>to_obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – Target object of message. Defaults to self.caller.</p></li>
|
||
<li><p><strong>from_obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – Source of message. Defaults to to_obj.</p></li>
|
||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – Supply data only to a unique
|
||
session (ignores the value of <cite>self.msg_all_sessions</cite>).</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<dl>
|
||
<dt>Kwargs:</dt><dd><p>options (dict): Options to the protocol.
|
||
any (any): All other keywords are interpreted as th</p>
|
||
<blockquote>
|
||
<div><p>name of send-instructions.</p>
|
||
</div></blockquote>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.msg_all_sessions">
|
||
<code class="sig-name descname">msg_all_sessions</code><em class="property"> = False</em><a class="headerlink" href="#evennia.commands.command.Command.msg_all_sessions" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.parse">
|
||
<code class="sig-name descname">parse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.parse" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Once the cmdhandler has identified this as the command we
|
||
want, this function is run. If many of your commands have a
|
||
similar syntax (for example ‘cmd arg1 = arg2’) you should
|
||
simply define this once and just let other commands of the
|
||
same form inherit from this. See the docstring of this module
|
||
for which object properties are available to use (notably
|
||
self.args).</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.save_for_next">
|
||
<code class="sig-name descname">save_for_next</code><em class="property"> = False</em><a class="headerlink" href="#evennia.commands.command.Command.save_for_next" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.command.Command.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.command.Command.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.set_aliases">
|
||
<code class="sig-name descname">set_aliases</code><span class="sig-paren">(</span><em class="sig-param">new_aliases</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.set_aliases"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.set_aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Replace aliases with new ones.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>new_aliases</strong> (<em>str</em><em> or </em><em>list</em>) – Either a ;-separated string
|
||
or a list of aliases. These aliases will replace the
|
||
existing ones, if any.</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>This is necessary to use to make sure the optimization
|
||
caches are properly updated as well.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.set_key">
|
||
<code class="sig-name descname">set_key</code><span class="sig-paren">(</span><em class="sig-param">new_key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.set_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.set_key" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Update key.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>new_key</strong> (<em>str</em>) – The new key.</p>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>This is necessary to use to make sure the optimization
|
||
caches are properly updated as well.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.styled_footer">
|
||
<code class="sig-name descname">styled_footer</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.styled_footer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.styled_footer" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a pretty footer.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.styled_header">
|
||
<code class="sig-name descname">styled_header</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.styled_header"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.styled_header" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a pretty header.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.styled_separator">
|
||
<code class="sig-name descname">styled_separator</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.styled_separator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.styled_separator" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a separator.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.Command.styled_table">
|
||
<code class="sig-name descname">styled_table</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.styled_table"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.styled_table" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create an EvTable styled by on user preferences.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>*args</strong> (<em>str</em>) – Column headers. If not colored explicitly, these will get colors
|
||
from user options.</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="simple">
|
||
<dt>Kwargs:</dt><dd><dl class="simple">
|
||
<dt>any (str, int or dict): EvTable options, including, optionally a <cite>table</cite> dict</dt><dd><p>detailing the contents of the table.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd>
|
||
</dl>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p><dl class="simple">
|
||
<dt>An initialized evtable entity, either complete (if using <cite>table</cite> kwarg)</dt><dd><p>or incomplete and ready for use with <cite>.add_row</cite> or <cite>.add_collumn</cite>.</p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
</dd>
|
||
<dt class="field-even">Return type</dt>
|
||
<dd class="field-even"><p>table (<a class="reference internal" href="evennia.utils.html#evennia.utils.evtable.EvTable" title="evennia.utils.evtable.EvTable">EvTable</a>)</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.command.CommandMeta">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.command.</code><code class="sig-name descname">CommandMeta</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#CommandMeta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.CommandMeta" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code></p>
|
||
<p>The metaclass cleans up all properties on the class</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.command.CommandMeta.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#CommandMeta.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.CommandMeta.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="exception">
|
||
<dt id="evennia.commands.command.InterruptCommand">
|
||
<em class="property">exception </em><code class="sig-prename descclassname">evennia.commands.command.</code><code class="sig-name descname">InterruptCommand</code><a class="reference internal" href="../_modules/evennia/commands/command.html#InterruptCommand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.InterruptCommand" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
|
||
<p>Cleanly interrupt a command.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="function">
|
||
<dt id="evennia.commands.command._init_command">
|
||
<code class="sig-prename descclassname">evennia.commands.command.</code><code class="sig-name descname">_init_command</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#_init_command"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command._init_command" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Helper command.
|
||
Makes sure all data are stored as lowercase and
|
||
do checking on all properties that should be in list form.
|
||
Sets up locks to be more forgiving. This is used both by the metaclass
|
||
and (optionally) at instantiation time.</p>
|
||
<p>If kwargs are given, these are set as instance-specific properties
|
||
on the command - but note that the Command instance is <em>re-used</em> on a given
|
||
host object, so a kwarg value set on the instance will <em>remain</em> on the instance
|
||
for subsequent uses of that Command on that particular object.</p>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-evennia.commands.tests">
|
||
<span id="evennia-commands-tests-module"></span><h2>evennia.commands.tests module<a class="headerlink" href="#module-evennia.commands.tests" title="Permalink to this headline">¶</a></h2>
|
||
<p>Unit testing for the Command system itself.</p>
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests.AccessableCommand">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">AccessableCommand</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#AccessableCommand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.AccessableCommand" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('command',)</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'command'}</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.AccessableCommand.access">
|
||
<code class="sig-name descname">access</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#AccessableCommand.access"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.AccessableCommand.access" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This hook is called by the cmdhandler to determine if srcobj
|
||
is allowed to execute this command. It should return a boolean
|
||
value and is not normally something that need to be changed since
|
||
it’s using the Evennia permission system directly.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>srcobj</strong> (<em>Object</em>) – Object trying to gain permission</p></li>
|
||
<li><p><strong>access_type</strong> (<em>str</em><em>, </em><em>optional</em>) – The lock type to check.</p></li>
|
||
<li><p><strong>default</strong> (<em>bool</em><em>, </em><em>optional</em>) – The fallback result if no lock
|
||
of matching <cite>access_type</cite> is found on this Command.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'command'</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests.AccessableCommand.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests.AccessableCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests.TestCmdParser">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">TestCmdParser</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdParser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdParser" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdParser.test_build_matches">
|
||
<code class="sig-name descname">test_build_matches</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdParser.test_build_matches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdParser.test_build_matches" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdParser.test_cmdparser">
|
||
<code class="sig-name descname">test_cmdparser</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdParser.test_cmdparser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdParser.test_cmdparser" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdParser.test_create_match">
|
||
<code class="sig-name descname">test_create_match</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdParser.test_create_match"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdParser.test_create_match" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdParser.test_num_prefixes">
|
||
<code class="sig-name descname">test_num_prefixes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdParser.test_num_prefixes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdParser.test_num_prefixes" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">TestCmdSetMergers</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
|
||
<p>Test merging of cmdsets</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.setUp">
|
||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.setUp" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_intersect">
|
||
<code class="sig-name descname">test_intersect</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_intersect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_intersect" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_option_transfer">
|
||
<code class="sig-name descname">test_option_transfer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_option_transfer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_option_transfer" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Test transfer of cmdset options</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_order">
|
||
<code class="sig-name descname">test_order</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_order"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_order" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Merge in reverse- and forward orders, same priorities</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_priority_order">
|
||
<code class="sig-name descname">test_priority_order</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_priority_order"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_priority_order" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Merge in reverse- and forward order with well-defined prioritities</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_remove">
|
||
<code class="sig-name descname">test_remove</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_remove" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_replace">
|
||
<code class="sig-name descname">test_replace</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_replace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_replace" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestCmdSetMergers.test_union">
|
||
<code class="sig-name descname">test_union</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestCmdSetMergers.test_union"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestCmdSetMergers.test_union" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">TestGetAndMergeCmdSets</code><span class="sig-paren">(</span><em class="sig-param">methodName='runTest'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.trial._asynctest.TestCase</span></code>, <a class="reference internal" href="evennia.utils.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
|
||
<p>Test the cmdhandler.get_and_merge_cmdsets function.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.setUp">
|
||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.setUp" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.set_cmdsets">
|
||
<code class="sig-name descname">set_cmdsets</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">*args</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.set_cmdsets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.set_cmdsets" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Set cmdets on obj in the order given in <a href="#id1"><span class="problematic" id="id2">*</span></a>args</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.test_autocmdsets">
|
||
<code class="sig-name descname">test_autocmdsets</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.test_autocmdsets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.test_autocmdsets" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.test_duplicates">
|
||
<code class="sig-name descname">test_duplicates</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.test_duplicates"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.test_duplicates" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.test_from_account">
|
||
<code class="sig-name descname">test_from_account</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.test_from_account"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.test_from_account" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.test_from_object">
|
||
<code class="sig-name descname">test_from_object</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.test_from_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.test_from_object" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.test_from_session">
|
||
<code class="sig-name descname">test_from_session</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.test_from_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.test_from_session" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests.TestGetAndMergeCmdSets.test_multimerge">
|
||
<code class="sig-name descname">test_multimerge</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#TestGetAndMergeCmdSets.test_multimerge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests.TestGetAndMergeCmdSets.test_multimerge" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdA">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdA</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdA"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdA" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdA.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdA.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdA.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The lockhandler works the same as for objects.
|
||
optional kwargs will be set as properties on the Command at runtime,
|
||
overloading evential same-named class properties.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('a',)</em><a class="headerlink" href="#evennia.commands.tests._CmdA._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'a'}</em><a class="headerlink" href="#evennia.commands.tests._CmdA._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdA.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdA.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'a'</em><a class="headerlink" href="#evennia.commands.tests._CmdA.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdA.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdA.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'a', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdA.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdB">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdB</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdB" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdB.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdB.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdB.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The lockhandler works the same as for objects.
|
||
optional kwargs will be set as properties on the Command at runtime,
|
||
overloading evential same-named class properties.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('b',)</em><a class="headerlink" href="#evennia.commands.tests._CmdB._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'b'}</em><a class="headerlink" href="#evennia.commands.tests._CmdB._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdB.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdB.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'b'</em><a class="headerlink" href="#evennia.commands.tests._CmdB.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdB.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdB.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'b', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdB.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdC">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdC</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdC" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdC.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdC.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdC.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The lockhandler works the same as for objects.
|
||
optional kwargs will be set as properties on the Command at runtime,
|
||
overloading evential same-named class properties.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('c',)</em><a class="headerlink" href="#evennia.commands.tests._CmdC._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'c'}</em><a class="headerlink" href="#evennia.commands.tests._CmdC._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdC.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdC.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'c'</em><a class="headerlink" href="#evennia.commands.tests._CmdC.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdC.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdC.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'c', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdC.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdD">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdD</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdD"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdD" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.command.Command" title="evennia.commands.command.Command"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.command.Command</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdD.__init__">
|
||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">cmdset</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdD.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdD.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The lockhandler works the same as for objects.
|
||
optional kwargs will be set as properties on the Command at runtime,
|
||
overloading evential same-named class properties.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('d',)</em><a class="headerlink" href="#evennia.commands.tests._CmdD._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'d'}</em><a class="headerlink" href="#evennia.commands.tests._CmdD._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdD.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdD.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'd'</em><a class="headerlink" href="#evennia.commands.tests._CmdD.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdD.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdD.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'd', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdD.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdSetA">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdSetA</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetA"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetA" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdSetA.at_cmdset_creation">
|
||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetA.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetA.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||
class, and should take care of populating the cmdset by use of
|
||
self.add().</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetA.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'A'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetA.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetA.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.commands.tests._CmdSetA'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetA.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdSetB">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdSetB</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetB" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdSetB.at_cmdset_creation">
|
||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetB.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetB.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||
class, and should take care of populating the cmdset by use of
|
||
self.add().</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetB.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'B'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetB.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetB.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.commands.tests._CmdSetB'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetB.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdSetC">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdSetC</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetC" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdSetC.at_cmdset_creation">
|
||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetC.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetC.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||
class, and should take care of populating the cmdset by use of
|
||
self.add().</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetC.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'C'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetC.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetC.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.commands.tests._CmdSetC'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetC.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdSetD">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdSetD</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetD"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetD" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdSetD.at_cmdset_creation">
|
||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetD.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetD.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||
class, and should take care of populating the cmdset by use of
|
||
self.add().</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetD.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'D'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetD.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetD.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.commands.tests._CmdSetD'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetD.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdSetTest">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdSetTest</code><span class="sig-paren">(</span><em class="sig-param">cmdsetobj=None</em>, <em class="sig-param">key=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetTest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetTest" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.cmdset.CmdSet" title="evennia.commands.cmdset.CmdSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.cmdset.CmdSet</span></code></a></p>
|
||
<dl class="method">
|
||
<dt id="evennia.commands.tests._CmdSetTest.at_cmdset_creation">
|
||
<code class="sig-name descname">at_cmdset_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdSetTest.at_cmdset_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdSetTest.at_cmdset_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Hook method - this should be overloaded in the inheriting
|
||
class, and should take care of populating the cmdset by use of
|
||
self.add().</p>
|
||
</dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetTest.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'test_cmdset'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetTest.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdSetTest.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.commands.tests._CmdSetTest'</em><a class="headerlink" href="#evennia.commands.tests._CmdSetTest.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdTest1">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdTest1</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdTest1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdTest1" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.tests.AccessableCommand" title="evennia.commands.tests.AccessableCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.tests.AccessableCommand</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('test1',)</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'test1'}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'test1'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest1.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'test1', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest1.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdTest2">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdTest2</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdTest2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdTest2" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.tests.AccessableCommand" title="evennia.commands.tests.AccessableCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.tests.AccessableCommand</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('another command',)</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'another command'}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'another command'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest2.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'another command', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest2.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdTest3">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdTest3</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdTest3"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdTest3" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.tests.AccessableCommand" title="evennia.commands.tests.AccessableCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.tests.AccessableCommand</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('&the third command',)</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'&the third command'}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = '&the third command'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest3.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '&the third command', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest3.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="class">
|
||
<dt id="evennia.commands.tests._CmdTest4">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_CmdTest4</code><span class="sig-paren">(</span><em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_CmdTest4"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._CmdTest4" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.tests.AccessableCommand" title="evennia.commands.tests.AccessableCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.tests.AccessableCommand</span></code></a></p>
|
||
<p>Base command</p>
|
||
<dl class="simple">
|
||
<dt>Usage:</dt><dd><p>command [args]</p>
|
||
</dd>
|
||
</dl>
|
||
<p>This is the base command class. Inherit from this
|
||
to create new commands.</p>
|
||
<p>The cmdhandler makes the following variables available to the
|
||
command methods (so you can always assume them to be there):
|
||
self.caller - the game object calling the command
|
||
self.cmdstring - the command name used to trigger this command (allows</p>
|
||
<blockquote>
|
||
<div><p>you to know which alias was used, for example)</p>
|
||
</div></blockquote>
|
||
<dl class="simple">
|
||
<dt>cmd.args - everything supplied to the command following the cmdstring</dt><dd><p>(this is usually what is parsed in self.parse())</p>
|
||
</dd>
|
||
<dt>cmd.cmdset - the cmdset from which this command was matched (useful only</dt><dd><p>seldomly, notably for help-type commands, to create dynamic
|
||
help entries and lists)</p>
|
||
</dd>
|
||
<dt>cmd.obj - the object on which this command is defined. If a default command,</dt><dd><p>this is usually the same as caller.</p>
|
||
</dd>
|
||
</dl>
|
||
<p>cmd.rawstring - the full raw string input, including any args and no parsing.</p>
|
||
<p>The following class properties can/should be defined on your child class:</p>
|
||
<p>key - identifier for command (e.g. “look”)
|
||
aliases - (optional) list of aliases (e.g. [“l”, “loo”])
|
||
locks - lock string (default is “cmd:all()”)
|
||
help_category - how to organize this help entry in help system</p>
|
||
<blockquote>
|
||
<div><p>(default is “General”)</p>
|
||
</div></blockquote>
|
||
<p>auto_help - defaults to True. Allows for turning off auto-help generation
|
||
arg_regex - (optional) raw string regex defining how the argument part of</p>
|
||
<blockquote>
|
||
<div><p>the command should look in order to match for this command
|
||
(e.g. must it be a space between cmdname and arg?)</p>
|
||
</div></blockquote>
|
||
<p>(Note that if auto_help is on, this initial string is also used by the
|
||
system to create the help entry for the command, so it’s a good idea to
|
||
format it similar to this one). This behavior can be changed by
|
||
overriding the method ‘get_help’ of a command: by default, this
|
||
method returns cmd.__doc__ (that is, this very docstring, or
|
||
the docstring of your command). You can, however, extend or
|
||
replace this without disabling auto_help.</p>
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4._keyaliases">
|
||
<code class="sig-name descname">_keyaliases</code><em class="property"> = ('test2',)</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4._keyaliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4._matchset">
|
||
<code class="sig-name descname">_matchset</code><em class="property"> = {'test2'}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4._matchset" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4.aliases">
|
||
<code class="sig-name descname">aliases</code><em class="property"> = []</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4.aliases" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4.help_category">
|
||
<code class="sig-name descname">help_category</code><em class="property"> = 'general'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4.help_category" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4.key">
|
||
<code class="sig-name descname">key</code><em class="property"> = 'test2'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4.lock_storage">
|
||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="attribute">
|
||
<dt id="evennia.commands.tests._CmdTest4.search_index_entry">
|
||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'test2', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}</em><a class="headerlink" href="#evennia.commands.tests._CmdTest4.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="function">
|
||
<dt id="evennia.commands.tests._mockdelay">
|
||
<code class="sig-prename descclassname">evennia.commands.tests.</code><code class="sig-name descname">_mockdelay</code><span class="sig-paren">(</span><em class="sig-param">time</em>, <em class="sig-param">func</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/tests.html#_mockdelay"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.tests._mockdelay" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<p><h3><a href="../index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">evennia.commands package</a><ul>
|
||
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
|
||
<li><a class="reference internal" href="#submodules">Submodules</a></li>
|
||
<li><a class="reference internal" href="#module-evennia.commands.cmdhandler">evennia.commands.cmdhandler module</a></li>
|
||
<li><a class="reference internal" href="#module-evennia.commands.cmdparser">evennia.commands.cmdparser module</a></li>
|
||
<li><a class="reference internal" href="#module-evennia.commands.cmdset">evennia.commands.cmdset module</a></li>
|
||
<li><a class="reference internal" href="#module-evennia.commands.cmdsethandler">evennia.commands.cmdsethandler module</a></li>
|
||
<li><a class="reference internal" href="#module-evennia.commands.command">evennia.commands.command module</a></li>
|
||
<li><a class="reference internal" href="#module-evennia.commands.tests">evennia.commands.tests module</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<div class="relations">
|
||
<h3>Related Topics</h3>
|
||
<ul>
|
||
<li><a href="../index.html">Documentation overview</a><ul>
|
||
</ul></li>
|
||
</ul>
|
||
</div>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../_sources/api/evennia.commands.rst.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="evennia.commands.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="../../../versions/0.9.1/api/evennia.commands.html">0.9.1 (master branch)</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="footer">
|
||
©2020, The Evennia developer community.
|
||
|
||
|
|
||
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
|
||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||
|
||
|
|
||
<a href="../_sources/api/evennia.commands.rst.txt"
|
||
rel="nofollow">Page source</a>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html> |