Updated HTML docs

This commit is contained in:
Griatch 2020-06-16 22:49:43 +02:00
parent f505351730
commit a551188691
1002 changed files with 30387 additions and 9820 deletions

View file

@ -7,11 +7,13 @@
<title>Adding Command Tutorial &#8212; Evennia 0.9.1 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -25,7 +27,10 @@
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-last"><a href="#">Adding Command Tutorial</a></li>
</ul>
</div>
@ -47,7 +52,7 @@ it just <code class="docutils literal notranslate"><span class="pre">mygame</spa
<code class="docutils literal notranslate"><span class="pre">CmdEcho</span></code> in this example.</p></li>
<li><p>Set the class variable <code class="docutils literal notranslate"><span class="pre">key</span></code> to a good command name, like <code class="docutils literal notranslate"><span class="pre">echo</span></code>.</p></li>
<li><p>Give your class a useful <em>docstring</em>. A docstring is the string at the very top of a class or function/method. The docstring at the top of the command class is read by Evennia to become the help entry for the Command (see
<a class="reference external" href="/Help-System.html#command-auto-help-system">Command Auto-help</a>).</p></li>
<a class="reference external" href="Help-System.html#command-auto-help-system">Command Auto-help</a>).</p></li>
<li><p>Define a class method <code class="docutils literal notranslate"><span class="pre">func(self)</span></code> that echoes your input back to you.</p></li>
</ol>
<p>Below is an example how this all could look for the echo command:</p>
@ -146,7 +151,7 @@ the game. Use <code class="docutils literal notranslate"><span class="pre">help<
your command definition).</p>
<blockquote>
<div><p>Note: Typing <code class="docutils literal notranslate"><span class="pre">echotest</span></code> will also work. It will be handled as the command <code class="docutils literal notranslate"><span class="pre">echo</span></code> directly followed by
its argument <code class="docutils literal notranslate"><span class="pre">test</span></code> (which will end up in <code class="docutils literal notranslate"><span class="pre">self.args).</span> <span class="pre">To</span> <span class="pre">change</span> <span class="pre">this</span> <span class="pre">behavior,</span> <span class="pre">you</span> <span class="pre">can</span> <span class="pre">add</span> <span class="pre">the</span> </code>arg_regex<code class="docutils literal notranslate"><span class="pre">property</span> <span class="pre">alongside</span></code>key<code class="docutils literal notranslate"><span class="pre">,</span> </code>help_category` etc. <a class="reference external" href="/Commands.html#on-arg_regex">See the arg_regex documentation</a> for more info.</p>
its argument <code class="docutils literal notranslate"><span class="pre">test</span></code> (which will end up in <code class="docutils literal notranslate"><span class="pre">self.args).</span> <span class="pre">To</span> <span class="pre">change</span> <span class="pre">this</span> <span class="pre">behavior,</span> <span class="pre">you</span> <span class="pre">can</span> <span class="pre">add</span> <span class="pre">the</span> </code>arg_regex<code class="docutils literal notranslate"><span class="pre">property</span> <span class="pre">alongside</span></code>key<code class="docutils literal notranslate"><span class="pre">,</span> </code>help_category` etc. <a class="reference external" href="Commands.html#on-arg_regex">See the arg_regex documentation</a> for more info.</p>
</div></blockquote>
<p>If you want to overload existing default commands (such as <code class="docutils literal notranslate"><span class="pre">look</span></code> or <code class="docutils literal notranslate"><span class="pre">get</span></code>), just add your new
command with the same key as the old one - it will then replace it. Just remember that you must use
@ -295,7 +300,10 @@ default character cmdset defaults to being defined as</p>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">Evennia 0.9.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-last"><a href="#">Adding Command Tutorial</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">