mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 12:07:17 +02:00
Updated HTML docs
This commit is contained in:
parent
88483fc3fa
commit
8936980973
297 changed files with 5517 additions and 23708 deletions
|
|
@ -110,23 +110,7 @@
|
|||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.slow_exit.html">evennia.contrib.slow_exit</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.talking_npc.html">evennia.contrib.talking_npc</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.test_traits.html">evennia.contrib.test_traits</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html">evennia.contrib.traits</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#adding-traits-to-a-typeclass">Adding Traits to a typeclass</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#using-traits">Using traits</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#trait-types">Trait types</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#static-trait">Static trait</a><ul>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.contrib.traits.html#counter">Counter</a><ul>
|
||||
<li class="toctree-l6"><a class="reference internal" href="evennia.contrib.traits.html#rate">.rate</a></li>
|
||||
<li class="toctree-l6"><a class="reference internal" href="evennia.contrib.traits.html#percentage">.percentage()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.contrib.traits.html#gauge">Gauge</a></li>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.contrib.traits.html#trait">Trait</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#expanding-with-your-own-traits">Expanding with your own Traits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html">evennia.contrib.traits</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.tree_select.html">evennia.contrib.tree_select</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.unixcommand.html">evennia.contrib.unixcommand</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.wilderness.html">evennia.contrib.wilderness</a></li>
|
||||
|
|
@ -290,14 +274,8 @@
|
|||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.html">evennia.utils</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.ansi.html">evennia.utils.ansi</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html">evennia.utils.batchprocessors</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-command-processor-file-syntax">Batch-command processor file syntax</a><ul>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.utils.batchprocessors.html#example-of-batch-ev-file">Example of batch.ev file:</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-code-processor-file-syntax">Batch-code processor file syntax</a><ul>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.utils.batchprocessors.html#example-batch-py-file">Example batch.py file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-command-processor-file-syntax">Batch-Command processor file syntax</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-code-processor-file-syntax">Batch-Code processor file syntax</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.containers.html">evennia.utils.containers</a></li>
|
||||
|
|
|
|||
|
|
@ -939,94 +939,6 @@ overriding the call (unused by default).</p></li>
|
|||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.accounts.accounts.</code><code class="sig-name descname">DefaultGuest</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/accounts/accounts.html#DefaultGuest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.accounts.accounts.DefaultAccount" title="evennia.accounts.accounts.DefaultAccount"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.accounts.accounts.DefaultAccount</span></code></a></p>
|
||||
<p>This class is used for guest logins. Unlike Accounts, Guests and
|
||||
their characters are deleted after disconnection.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.create">
|
||||
<em class="property">classmethod </em><code class="sig-name descname">create</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/accounts/accounts.html#DefaultGuest.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.create" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Forwards request to cls.authenticate(); returns a DefaultGuest object
|
||||
if one is available for use.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.authenticate">
|
||||
<em class="property">classmethod </em><code class="sig-name descname">authenticate</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/accounts/accounts.html#DefaultGuest.authenticate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.authenticate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Gets or creates a Guest account object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><p><strong>ip</strong> (<em>str</em><em>, </em><em>optional</em>) – IP address of requestor; used for ban checking,
|
||||
throttling and logging</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>account (Object)</em> – Guest account object, if available
|
||||
errors (list): List of error messages accrued during this request.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.at_post_login">
|
||||
<code class="sig-name descname">at_post_login</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/accounts/accounts.html#DefaultGuest.at_post_login"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.at_post_login" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>In theory, guests only have one character regardless of which
|
||||
MULTISESSION_MODE we’re in. They don’t get a choice.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – Session connecting.</p></li>
|
||||
<li><p><strong>**kwargs</strong> (<em>dict</em>) – Arbitrary, optional arguments for users
|
||||
overriding the call (unused by default).</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.at_server_shutdown">
|
||||
<code class="sig-name descname">at_server_shutdown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/accounts/accounts.html#DefaultGuest.at_server_shutdown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.at_server_shutdown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>We repeat the functionality of <strong>at_disconnect()</strong> here just to
|
||||
be on the safe side.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.at_post_disconnect">
|
||||
<code class="sig-name descname">at_post_disconnect</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/accounts/accounts.html#DefaultGuest.at_post_disconnect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.at_post_disconnect" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Once having disconnected, destroy the guest’s characters and</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>**kwargs</strong> (<em>dict</em>) – Arbitrary, optional arguments for users
|
||||
overriding the call (unused by default).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.accounts.accounts.DefaultAccount.DoesNotExist" title="evennia.accounts.accounts.DefaultAccount.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.accounts.accounts.DefaultAccount.DoesNotExist</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.MultipleObjectsReturned">
|
||||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.accounts.accounts.DefaultAccount.MultipleObjectsReturned" title="evennia.accounts.accounts.DefaultAccount.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.accounts.accounts.DefaultAccount.MultipleObjectsReturned</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.accounts.accounts.DefaultGuest'</em><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.accounts.accounts.DefaultGuest.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'DefaultGuest'</em><a class="headerlink" href="#evennia.accounts.accounts.DefaultGuest.typename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -374,6 +374,17 @@ commands the caller can use.</p>
|
|||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.commands.command.Command.client_height">
|
||||
<code class="sig-name descname">client_height</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/command.html#Command.client_height"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.command.Command.client_height" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the client screenheight for the session using this command.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>client height (int)</em> – The height (in characters) of the client window.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py 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"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/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>
|
||||
|
|
@ -426,11 +437,6 @@ detailing the contents of the table.</p>
|
|||
<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="py 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 auto_help_display_key - (optional) if given, this replaces the string shown\n in the auto-help listing. This is particularly useful for system-commands\n whose actual key is not really meaningful.\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>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ method. Otherwise all text will be returned to all connected sessions.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOCLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -98,11 +98,6 @@ method. Otherwise all text will be returned to all connected sessions.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOCLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -157,11 +152,6 @@ as you the account have access right to puppet it.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdIC.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdIC.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'puppet', 'category': 'general', 'key': 'ic', 'tags': '', 'text': '\n control an object you have permission to puppet\n\n Usage:\n ic <character>\n\n Go in-character (IC) as a given Character.\n\n This will attempt to "become" a different object assuming you have\n the right to do so. Note that it\'s the ACCOUNT character that puppets\n characters/objects and which needs to have the correct permission!\n\n You cannot become an object that is already controlled by another\n account. In principle <character> can be any in-game object as long\n as you the account have access right to puppet it.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdIC.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -211,11 +201,6 @@ as you the account have access right to puppet it.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOC.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOOC.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unpuppet', 'category': 'general', 'key': 'ooc', 'tags': '', 'text': '\n stop puppeting and go ooc\n\n Usage:\n ooc\n\n Go out-of-character (OOC).\n\n This will leave your current character and put you in a incorporeal OOC state.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOOC.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -264,11 +249,6 @@ as you the account have access right to puppet it.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.account.CmdPassword.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdPassword.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'password', 'tags': '', 'text': '\n change your password\n\n Usage:\n password <old password> = <new password>\n\n Changes your password. Make sure to pick a safe one.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdPassword.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -325,11 +305,6 @@ game. Use the /all switch to disconnect from all sessions.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdQuit.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdQuit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n quit the game\n\n Usage:\n quit\n\n Switch:\n all - disconnect all connected sessions\n\n Gracefully disconnect your current session from the\n game. Use the /all switch to disconnect from all sessions.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -381,11 +356,6 @@ if you want.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.account.CmdCharCreate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdCharCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'charcreate', 'tags': '', 'text': '\n create a new character\n\n Usage:\n charcreate <charname> [= desc]\n\n Create a new character, optionally giving it a description. You\n may use upper-case letters in the name - you will nevertheless\n always be able to access your character using lower-case letters\n if you want.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdCharCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -444,11 +414,6 @@ later connecting with a client with different capabilities.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdOption.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdOption.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'options', 'category': 'general', 'key': 'option', 'tags': '', 'text': '\n Set an account option\n\n Usage:\n option[/save] [name = value]\n\n Switches:\n save - Save the current option settings for future logins.\n clear - Clear the saved options.\n\n This command allows for viewing and setting client interface\n settings. Note that saved options may not be able to be used if\n later connecting with a client with different capabilities.\n\n\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdOption.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -497,11 +462,6 @@ later connecting with a client with different capabilities.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdSessions.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdSessions.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'sessions', 'tags': '', 'text': '\n check your connected session(s)\n\n Usage:\n sessions\n\n Lists the sessions currently connected to your account.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdSessions.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -552,11 +512,6 @@ also for those with all permissions.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdWho.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdWho.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'doing', 'category': 'general', 'key': 'who', 'tags': '', 'text': '\n list who is currently online\n\n Usage:\n who\n doing\n\n Shows who is currently online. Doing is an alias that limits info\n also for those with all permissions.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdWho.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -636,11 +591,6 @@ Takes a table of columns [[val,val,…],[val,val,…],…]</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.account.CmdColorTest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdColorTest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'color', 'tags': '', 'text': '\n testing which colors your client support\n\n Usage:\n color ansi||xterm256\n\n Prints a color map along with in-mud color codes to use to produce\n them. It also tests what is supported in your client. Choices are\n 16-color ansi (supported in most muds) or the 256-color xterm256\n standard. No checking is done to determine your client supports\n color - if not you will see rubbish appear.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdColorTest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -696,11 +646,6 @@ Use the unquell command to revert back to normal operation.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.account.CmdQuell.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdQuell.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unquell', 'category': 'general', 'key': 'quell', 'tags': '', 'text': "\n use character's permissions instead of account's\n\n Usage:\n quell\n unquell\n\n Normally the permission level of the Account is used when puppeting a\n Character/Object to determine access. This command will switch the lock\n system to make use of the puppeted Object's permissions instead. This is\n useful mainly for testing.\n Hierarchical permission quelling only work downwards, thus an Account cannot\n use a higher-permission Character to escalate their permission level.\n Use the unquell command to revert back to normal operation.\n "}</em><a class="headerlink" href="#evennia.commands.default.account.CmdQuell.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -744,11 +689,6 @@ Use the unquell command to revert back to normal operation.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.account.CmdCharDelete.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdCharDelete.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'chardelete', 'tags': '', 'text': '\n delete a character - this cannot be undone!\n\n Usage:\n chardelete <charname>\n\n Permanently deletes one of your characters.\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdCharDelete.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -806,11 +746,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.default.account.CmdStyle.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.account.CmdStyle.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'style', 'tags': '', 'text': '\n In-game style options\n\n Usage:\n style\n style <option> = <value>\n\n Configure stylings for in-game display elements like table borders, help\n entriest etc. Use without arguments to see all available options.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.account.CmdStyle.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -89,11 +89,6 @@ supplied it will be echoed to the user unless /quiet is set.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(boot) or perm(Admin)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdBoot.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdBoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'admin', 'key': 'boot', 'tags': '', 'text': '\n kick an account from the server.\n\n Usage\n boot[/switches] <account obj> [: reason]\n\n Switches:\n quiet - Silently boot without informing account\n sid - boot by session id instead of name or dbref\n\n Boot an account object from the server. If a reason is\n supplied it will be echoed to the user unless /quiet is set.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdBoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -168,11 +163,6 @@ values in each tuple is set to the empty string.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(ban) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdBan.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdBan.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'bans', 'category': 'admin', 'key': 'ban', 'tags': '', 'text': "\n ban an account from the server\n\n Usage:\n ban [<name or ip> [: reason]]\n\n Without any arguments, shows numbered list of active bans.\n\n This command bans a user from accessing the game. Supply an optional\n reason to be able to later remember why the ban was put in place.\n\n It is often preferable to ban an account from the server than to\n delete an account with accounts/delete. If banned by name, that account\n account can no longer be logged into.\n\n IP (Internet Protocol) address banning allows blocking all access\n from a specific address or subnet. Use an asterisk (*) as a\n wildcard.\n\n Examples:\n ban thomas - ban account 'thomas'\n ban/ip 134.233.2.111 - ban specific ip address\n ban/ip 134.233.2.* - ban all in a subnet\n ban/ip 134.233.*.* - even wider ban\n\n A single IP filter can be easy to circumvent by changing computers\n or requesting a new IP address. Setting a wide IP block filter with\n wildcards might be tempting, but remember that it may also\n accidentally block innocent users connecting from the same country\n or region.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdBan.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -219,11 +209,6 @@ unban.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(unban) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdUnban.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdUnban.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'admin', 'key': 'unban', 'tags': '', 'text': '\n remove a ban from an account\n\n Usage:\n unban <banid>\n\n This will clear an account name/ip ban previously set with the ban\n command. Use this command without an argument to view a numbered\n list of bans. Use the numbers in this list to select which one to\n unban.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdUnban.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -253,7 +238,7 @@ to accounts respectively.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdEmit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['remit', 'pemit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['pemit', 'remit']</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -282,11 +267,6 @@ to accounts respectively.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(emit) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdEmit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdEmit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -330,11 +310,6 @@ to accounts respectively.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(newpassword) or perm(Admin)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdNewPassword.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdNewPassword.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'admin', 'key': 'userpassword', 'tags': '', 'text': "\n change the password of an account\n\n Usage:\n userpassword <user obj> = <new password>\n\n Set an account's password.\n "}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdNewPassword.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -388,11 +363,6 @@ or account. If no permission is given, list all permissions on <object>.</
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(perm) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdPerm.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdPerm.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'setperm', 'category': 'admin', 'key': 'perm', 'tags': '', 'text': '\n set the permissions of an account/object\n\n Usage:\n perm[/switch] <object> [= <permission>[,<permission>,...]]\n perm[/switch] *<account> [= <permission>[,<permission>,...]]\n\n Switches:\n del - delete the given permission from <object> or <account>.\n account - set permission on an account (same as adding * to name)\n\n This command sets/clears individual permission strings on an object\n or account. If no permission is given, list all permissions on <object>.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdPerm.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -437,11 +407,6 @@ including all currently unlogged in.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(wall) or perm(Admin)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdWall.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdWall.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'admin', 'key': 'wall', 'tags': '', 'text': '\n make an announcement to all\n\n Usage:\n wall <message>\n\n Announces a message to all connected sessions\n including all currently unlogged in.\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdWall.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -491,11 +456,6 @@ including all currently unlogged in.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(spawn) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.admin.CmdForce.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.admin.CmdForce.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'force', 'tags': '', 'text': '\n forces an object to execute a command\n\n Usage:\n force <object>=<command string>\n\n Example:\n force bob=get stick\n '}</em><a class="headerlink" href="#evennia.commands.default.admin.CmdForce.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ skipping, reloading etc.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcmd', 'batchcommand']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcommand', 'batchcmd']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -103,11 +103,6 @@ skipping, reloading etc.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(batchcommands) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -166,11 +161,6 @@ object copies behind when testing out the script.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCode.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcodes', 'category': 'building', 'key': 'batchcode', 'tags': '', 'text': '\n build from batch-code file\n\n Usage:\n batchcode[/interactive] <python path to file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n debug - auto-delete all objects that has been marked as\n deletable in the script file (see example files for\n syntax). This is useful so as to to not leave multiple\n object copies behind when testing out the script.\n\n Runs batches of commands from a batch-code text file (*.py).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCode.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -85,11 +85,6 @@ the cases, see the module doc.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.default.building.ObjManipCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.ObjManipCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': "\n This is a parent class for some of the defining objmanip commands\n since they tend to have some more variables to define new objects.\n\n Each object definition can have several components. First is\n always a name, followed by an optional alias list and finally an\n some optional data, such as a typeclass or a location. A comma ','\n separates different objects. Like this:\n\n name1;alias;alias;alias:option, name2;alias;alias ...\n\n Spaces between all components are stripped.\n\n A second situation is attribute manipulation. Such commands\n are simpler and offer combinations\n\n objname/attr/attr/attr, objname/attr, ...\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.ObjManipCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -151,11 +146,6 @@ by everyone.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(setobjalias) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdSetObjAlias.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdSetObjAlias.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'setobjalias', 'category': 'building', 'key': 'alias', 'tags': '', 'text': "\n adding permanent aliases for object\n\n Usage:\n alias <obj> [= [alias[,alias,alias,...]]]\n alias <obj> =\n alias/category <obj> = [alias[,alias,...]:<category>\n\n Switches:\n category - requires ending input with :category, to store the\n given aliases with the given category.\n\n Assigns aliases to an object so it can be referenced by more\n than one name. Assign empty to remove all aliases from object. If\n assigning a category, all aliases given will be using this category.\n\n Observe that this is not the same thing as personal aliases\n created with the 'nick' command! Aliases set with alias are\n changing the object in question, making those aliases usable\n by everyone.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdSetObjAlias.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -201,11 +191,6 @@ one exact copy of the original object will be created with the name <a href="#id
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(copy) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdCopy.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdCopy.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'copy', 'tags': '', 'text': "\n copy an object and its properties\n\n Usage:\n copy <original obj> [= <new_name>][;alias;alias..]\n [:<new_location>] [,<new_name2> ...]\n\n Create one or more copies of an object. If you don't supply any targets,\n one exact copy of the original object will be created with the name *_copy.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdCopy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -298,11 +283,6 @@ required and get the attribute from the object.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(cpattr) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdCpAttr.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdCpAttr.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'cpattr', 'tags': '', 'text': "\n copy attributes between objects\n\n Usage:\n cpattr[/switch] <obj>/<attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n cpattr[/switch] <obj>/<attr> = <obj1> [,<obj2>,<obj3>,...]\n cpattr[/switch] <attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n cpattr[/switch] <attr> = <obj1>[,<obj2>,<obj3>,...]\n\n Switches:\n move - delete the attribute from the source object after copying.\n\n Example:\n cpattr coolness = Anna/chillout, Anna/nicety, Tom/nicety\n ->\n copies the coolness attribute (defined on yourself), to attributes\n on Anna and Tom.\n\n Copy the attribute one object to one or more attributes on another object.\n If you don't supply a source object, yourself is used.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdCpAttr.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -357,11 +337,6 @@ object. If you don’t supply a source object, yourself is used.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(mvattr) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdMvAttr.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdMvAttr.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'mvattr', 'tags': '', 'text': "\n move attributes between objects\n\n Usage:\n mvattr[/switch] <obj>/<attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n mvattr[/switch] <obj>/<attr> = <obj1> [,<obj2>,<obj3>,...]\n mvattr[/switch] <attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n mvattr[/switch] <attr> = <obj1>[,<obj2>,<obj3>,...]\n\n Switches:\n copy - Don't delete the original after moving.\n\n Move an attribute from one object to one or more attributes on another\n object. If you don't supply a source object, yourself is used.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdMvAttr.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -430,11 +405,6 @@ object of this type like this:</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(create) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdCreate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'create', 'tags': '', 'text': "\n create new objects\n\n Usage:\n create[/drop] <objname>[;alias;alias...][:typeclass], <objname>...\n\n switch:\n drop - automatically drop the new object into your current\n location (this is not echoed). This also sets the new\n object's home to the current location rather than to you.\n\n Creates one or more new objects. If typeclass is given, the object\n is created as a child of this typeclass. The typeclass script is\n assumed to be located under types/ and any further\n directory structure is given in Python notation. So if you have a\n correct typeclass 'RedButton' defined in\n types/examples/red_button.py, you could create a new\n object of this type like this:\n\n create/drop button;red : examples.red_button.RedButton\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -491,11 +461,6 @@ describe the current room.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(desc) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdDesc.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDesc.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'describe', 'category': 'building', 'key': 'desc', 'tags': '', 'text': '\n describe an object or the current room.\n\n Usage:\n desc [<obj> =] <description>\n\n Switches:\n edit - Open up a line editor for more advanced editing.\n\n Sets the "desc" attribute on an object. If an object is not given,\n describe the current room.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDesc.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -567,11 +532,6 @@ You can specify the /force switch to bypass this confirmation.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(destroy) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDestroy.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delete del', 'category': 'building', 'key': 'destroy', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -641,11 +601,6 @@ would be ‘north;no;n’.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(dig) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdDig.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDig.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'dig', 'tags': '', 'text': "\n build new rooms and connect them to the current location\n\n Usage:\n dig[/switches] <roomname>[;alias;alias...][:typeclass]\n [= <exit_to_there>[;alias][:typeclass]]\n [, <exit_to_here>[;alias][:typeclass]]\n\n Switches:\n tel or teleport - move yourself to the new room\n\n Examples:\n dig kitchen = north;n, south;s\n dig house:myrooms.MyHouseTypeclass\n dig sheer cliff;cliff;sheer = climb up, climb down\n\n This command is a convenient way to build rooms quickly; it creates the\n new room and you can optionally set up exits back and forth between your\n current room and the new one. You can add as many aliases as you\n like to the name of the room and the exits in question; an example\n would be 'north;no;n'.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDig.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -716,11 +671,6 @@ For more flexibility and power in creating rooms, use dig.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: perm(tunnel) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdTunnel.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTunnel.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'tun', 'category': 'building', 'key': 'tunnel', 'tags': '', 'text': '\n create new rooms in cardinal directions only\n\n Usage:\n tunnel[/switch] <direction>[:typeclass] [= <roomname>[;alias;alias;...][:typeclass]]\n\n Switches:\n oneway - do not create an exit back to the current location\n tel - teleport to the newly created room\n\n Example:\n tunnel n\n tunnel n = house;mike\'s place;green building\n\n This is a simple way to build using pre-defined directions:\n |wn,ne,e,se,s,sw,w,nw|n (north, northeast etc)\n |wu,d|n (up and down)\n |wi,o|n (in and out)\n The full names (north, in, southwest, etc) will always be put as\n main name for the exit, using the abbreviation as an alias (so an\n exit will always be able to be used with both "north" as well as\n "n" for example). Opposite directions will automatically be\n created back from the new room unless the /oneway switch is given.\n For more flexibility and power in creating rooms, use dig.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTunnel.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -776,11 +726,6 @@ currently set destination.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(link) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdLink.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdLink.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'link', 'tags': '', 'text': '\n link existing rooms together with exits\n\n Usage:\n link[/switches] <object> = <target>\n link[/switches] <object> =\n link[/switches] <object>\n\n Switch:\n twoway - connect two exits. For this to work, BOTH <object>\n and <target> must be exit objects.\n\n If <object> is an exit, set its destination to <target>. Two-way operation\n instead sets the destination to the *locations* of the respective given\n arguments.\n The second form (a lone =) sets the destination to None (same as\n the unlink command) and the third form (without =) just shows the\n currently set destination.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdLink.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -831,11 +776,6 @@ and call func in CmdLink</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(unlink) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdUnLink.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdUnLink.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'unlink', 'tags': '', 'text': '\n remove exit-connections between rooms\n\n Usage:\n unlink <Object>\n\n Unlinks an object, for example an exit, disconnecting\n it from whatever it was connected to.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdUnLink.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -884,11 +824,6 @@ It is also a convenient target of the “home” command.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(sethome) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdSetHome.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdSetHome.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'sethome', 'tags': '', 'text': '\n set an object\'s home location\n\n Usage:\n sethome <obj> [= <home_location>]\n sethom <obj>\n\n The "home" location is a "safety" location for objects; they\n will be moved there if their current location ceases to exist. All\n objects should always have a home location for this reason.\n It is also a convenient target of the "home" command.\n\n If no location is given, just view the object\'s home location.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdSetHome.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -933,11 +868,6 @@ to a user. Defaults to yourself.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(listcmdsets) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdListCmdSets.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdListCmdSets.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'listcmsets', 'category': 'building', 'key': 'cmdsets', 'tags': '', 'text': '\n list command sets defined on an object\n\n Usage:\n cmdsets <obj>\n\n This displays all cmdsets assigned\n to a user. Defaults to yourself.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdListCmdSets.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -982,11 +912,6 @@ rename an account.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(rename) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdName.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdName.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'rename', 'category': 'building', 'key': 'name', 'tags': '', 'text': '\n change the name and/or aliases of an object\n\n Usage:\n name <obj> = <newname>;alias1;alias2\n\n Rename an object to something new. Use *obj to\n rename an account.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdName.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1048,11 +973,6 @@ as well as the self.create_exit() method.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(open) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdOpen.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdOpen.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'open', 'tags': '', 'text': '\n open a new exit from the current room\n\n Usage:\n open <new exit>[;alias;alias..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = <destination>\n\n Handles the creation of exits. If a destination is given, the exit\n will point there. The <return exit> argument sets up an exit at the\n destination leading back to the current room. Destination name\n can be given both as a #dbref and a name, if that name is globally\n unique.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdOpen.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1208,11 +1128,6 @@ with older attrs that might have been named with <strong>[]</strong>’s.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(set) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdSetAttribute.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdSetAttribute.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'set', 'tags': '', 'text': '\n set attribute on an object or account\n\n Usage:\n set <obj>/<attr> = <value>\n set <obj>/<attr> =\n set <obj>/<attr>\n set *<account>/<attr> = <value>\n\n Switch:\n edit: Open the line editor (string values only)\n script: If we\'re trying to set an attribute on a script\n channel: If we\'re trying to set an attribute on a channel\n account: If we\'re trying to set an attribute on an account\n room: Setting an attribute on a room (global search)\n exit: Setting an attribute on an exit (global search)\n char: Setting an attribute on a character (global search)\n character: Alias for char, as above.\n\n Sets attributes on objects. The second example form above clears a\n previously set attribute while the third form inspects the current value of\n the attribute (if any). The last one (with the star) is a shortcut for\n operating on a player Account rather than an Object.\n\n The most common data to save with this command are strings and\n numbers. You can however also set Python primitives such as lists,\n dictionaries and tuples on objects (this might be important for\n the functionality of certain custom objects). This is indicated\n by you starting your value with one of |c\'|n, |c"|n, |c(|n, |c[|n\n or |c{ |n.\n\n Once you have stored a Python primitive as noted above, you can include\n |c[<key>]|n in <attr> to reference nested values in e.g. a list or dict.\n\n Remember that if you use Python primitives like this, you must\n write proper Python syntax too - notably you must include quotes\n around your strings or you will get an error.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdSetAttribute.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1267,7 +1182,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['type', 'update', 'parent', 'swap']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['swap', 'update', 'parent', 'type']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1296,11 +1211,6 @@ server settings.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(typeclass) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'type update parent swap', 'category': 'building', 'key': 'typeclass', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object.\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1348,11 +1258,6 @@ matching the given attribute-wildcard search string.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(wipe) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdWipe.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdWipe.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'wipe', 'tags': '', 'text': "\n clear all attributes from an object\n\n Usage:\n wipe <object>[/<attr>[/<attr>...]]\n\n Example:\n wipe box\n wipe box/colour\n\n Wipes all of an object's attributes, or optionally only those\n matching the given attribute-wildcard search string.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdWipe.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1420,11 +1325,6 @@ them by ‘;’, i.e:</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: perm(locks) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdLock.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdLock.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'locks', 'category': 'building', 'key': 'lock', 'tags': '', 'text': "\n assign a lock definition to an object\n\n Usage:\n lock <object or *account>[ = <lockstring>]\n or\n lock[/switch] <object or *account>/<access_type>\n\n Switch:\n del - delete given access type\n view - view lock associated with given access type (default)\n\n If no lockstring is given, shows all locks on\n object.\n\n Lockstring is of the form\n access_type:[NOT] func1(args)[ AND|OR][ NOT] func2(args) ...]\n Where func1, func2 ... valid lockfuncs with or without arguments.\n Separator expressions need not be capitalized.\n\n For example:\n 'get: id(25) or perm(Admin)'\n The 'get' lock access_type is checked e.g. by the 'get' command.\n An object locked with this example lock will only be possible to pick up\n by Admins or by an object with id=25.\n\n You can add several access_types after one another by separating\n them by ';', i.e:\n 'get:id(25); delete:perm(Builder)'\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdLock.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1451,7 +1351,7 @@ If object is not specified, the current location is examined.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdExamine.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['exam', 'ex']</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ex', 'exam']</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1546,11 +1446,6 @@ non-persistent data stored on object</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(examine) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdExamine.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'exam ex', 'category': 'building', 'key': 'examine', 'tags': '', 'text': '\n get detailed information about an object\n\n Usage:\n examine [<object>[/attrname]]\n examine [*<account>[/attrname]]\n\n Switch:\n account - examine an Account (same as adding *)\n object - examine an Object (useful when OOC)\n\n The examine command shows detailed game info about an\n object and optionally a specific attribute on it.\n If object is not specified, the current location is examined.\n\n Append a * before the search string to examine an account.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdExamine.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1582,7 +1477,7 @@ one is given.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdFind.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['locate', 'search']</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['search', 'locate']</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1611,11 +1506,6 @@ one is given.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(find) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdFind.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'locate search', 'category': 'building', 'key': 'find', 'tags': '', 'text': '\n search the database for objects\n\n Usage:\n find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]]\n locate - this is a shorthand for using the /loc switch.\n\n Switches:\n room - only look for rooms (location=None)\n exit - only look for exits (destination!=None)\n char - only look for characters (BASE_CHARACTER_TYPECLASS)\n exact - only exact matches are returned.\n loc - display object location if exists and match has one result\n startswith - search for names starting with the string, rather than containing\n\n Searches the database for an object of a particular name or exact #dbref.\n Use *accountname to search for an account. The switches allows for\n limiting object matches to certain game entities. Dbrefmin and dbrefmax\n limits matches to within the given dbrefs range, or above/below if only\n one is given.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1689,11 +1579,6 @@ teleported to the target location.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(teleport) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdTeleport.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTeleport.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'teleport', 'category': 'building', 'key': 'tel', 'tags': '', 'text': "\n teleport object to another location\n\n Usage:\n tel/switch [<object> to||=] <target location>\n\n Examples:\n tel Limbo\n tel/quiet box = Limbo\n tel/tonone box\n\n Switches:\n quiet - don't echo leave/arrive messages to the source/target\n locations for the move.\n intoexit - if target is an exit, teleport INTO\n the exit object instead of to its destination\n tonone - if set, teleport the object to a None-location. If this\n switch is set, <target location> is ignored.\n Note that the only way to retrieve\n an object from a None location is by direct #dbref\n reference. A puppeted object cannot be moved to None.\n loc - teleport object to the target's location instead of its contents\n\n Teleports an object somewhere. If no object is given, you yourself are\n teleported to the target location.\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTeleport.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1751,11 +1636,6 @@ the object.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(script) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdScript.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdScript.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'addscript', 'category': 'building', 'key': 'script', 'tags': '', 'text': '\n attach a script to an object\n\n Usage:\n script[/switch] <obj> [= script_path or <scriptkey>]\n\n Switches:\n start - start all non-running scripts on object, or a given script only\n stop - stop all scripts on objects, or a given script only\n\n If no script path/key is given, lists all scripts active on the given\n object.\n Script path can be given from the base location for scripts as given in\n settings. If adding a new script, it will be started automatically\n (no /start switch is needed). Using the /start or /stop switches on an\n object without specifying a script key/path will start/stop ALL scripts on\n the object.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdScript.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1822,11 +1702,6 @@ enough to for most grouping schemes.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(tag) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdTag.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTag.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'tags', 'category': 'building', 'key': 'tag', 'tags': '', 'text': '\n handles the tags of an object\n\n Usage:\n tag[/del] <obj> [= <tag>[:<category>]]\n tag/search <tag>[:<category]\n\n Switches:\n search - return all objects with a given Tag\n del - remove the given tag. If no tag is specified,\n clear all tags on object.\n\n Manipulates and lists tags on objects. Tags allow for quick\n grouping of and searching for objects. If only <obj> is given,\n list all tags on the object. If /search is used, list objects\n with the given tag.\n The category can be used for grouping tags themselves, but it\n should be used with restrain - tags on their own are usually\n enough to for most grouping schemes.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTag.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1933,11 +1808,6 @@ displays a list of available prototypes.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(spawn) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.building.CmdSpawn.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdSpawn.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'olc', 'category': 'building', 'key': 'spawn', 'tags': '', 'text': '\n spawn objects from prototype\n\n Usage:\n spawn[/noloc] <prototype_key>\n spawn[/noloc] <prototype_dict>\n\n spawn/search [prototype_keykey][;tag[,tag]]\n spawn/list [tag, tag, ...]\n spawn/list modules - list only module-based prototypes\n spawn/show [<prototype_key>]\n spawn/update <prototype_key>\n\n spawn/save <prototype_dict>\n spawn/edit [<prototype_key>]\n olc - equivalent to spawn/edit\n\n Switches:\n noloc - allow location to be None if not specified explicitly. Otherwise,\n location will default to caller\'s current location.\n search - search prototype by name or tags.\n list - list available prototypes, optionally limit by tags.\n show, examine - inspect prototype by key. If not given, acts like list.\n raw - show the raw dict of the prototype as a one-line string for manual editing.\n save - save a prototype to the database. It will be listable by /list.\n delete - remove a prototype from database, if allowed to.\n update - find existing objects with the same prototype_key and update\n them with latest version of given prototype. If given with /save,\n will auto-update all objects with the old version of the prototype\n without asking first.\n edit, menu, olc - create/manipulate prototype in a menu interface.\n\n Example:\n spawn GOBLIN\n spawn {"key":"goblin", "typeclass":"monster.Monster", "location":"#2"}\n spawn/save {"key": "grunt", prototype: "goblin"};;mobs;edit:all()\n \x0c\n Dictionary keys:\n |wprototype_parent |n - name of parent prototype to use. Required if typeclass is\n not set. Can be a path or a list for multiple inheritance (inherits\n left to right). If set one of the parents must have a typeclass.\n |wtypeclass |n - string. Required if prototype_parent is not set.\n |wkey |n - string, the main object identifier\n |wlocation |n - this should be a valid object or #dbref\n |whome |n - valid object or #dbref\n |wdestination|n - only valid for exits (object or dbref)\n |wpermissions|n - string or list of permission strings\n |wlocks |n - a lock-string\n |waliases |n - string or list of strings.\n |wndb_|n<name> - value of a nattribute (ndb_ is stripped)\n\n |wprototype_key|n - name of this prototype. Unique. Used to store/retrieve from db\n and update existing prototyped objects if desired.\n |wprototype_desc|n - desc of this prototype. Used in listings\n |wprototype_locks|n - locks of this prototype. Limits who may use prototype\n |wprototype_tags|n - tags of this prototype. Used to find prototype\n\n any other keywords are interpreted as Attributes and their values.\n\n The available prototypes are defined globally in modules set in\n settings.PROTOTYPE_MODULES. If spawn is used without arguments it\n displays a list of available prototypes.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdSpawn.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ aliases to an already joined channel.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdAddCom.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['aliaschan', 'chanalias']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdAddCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['chanalias', 'aliaschan']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdAddCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -92,11 +92,6 @@ aliases to an already joined channel.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdAddCom.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdAddCom.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'tags': '', 'text': '\n add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdAddCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -120,7 +115,7 @@ for that channel.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdDelCom.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['delaliaschan', 'delchanalias']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['delchanalias', 'delaliaschan']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -149,11 +144,6 @@ for that channel.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:not perm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdDelCom.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdDelCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -205,11 +195,6 @@ channels that you control.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdAllCom.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdAllCom.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'allcom', 'tags': '', 'text': "\n perform admin operations on all channels\n\n Usage:\n allcom [on | off | who | destroy]\n\n Allows the user to universally turn off or on all channels they are on, as\n well as perform a 'who' for all channels they are on. Destroy deletes all\n channels that you control.\n\n Without argument, works like comlist.\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdAllCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -233,7 +218,7 @@ Use addcom/delcom to join and leave channels</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdChannels.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['clist', 'channellist', 'all channels', 'comlist', 'chanlist']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdChannels.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['chanlist', 'clist', 'channellist', 'comlist', 'all channels']</em><a class="headerlink" href="#evennia.commands.default.comms.CmdChannels.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -262,11 +247,6 @@ Use addcom/delcom to join and leave channels</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdChannels.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdChannels.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'clist channellist all channels comlist chanlist', 'category': 'comms', 'key': 'channels', 'tags': '', 'text': "\n list all channels available to you\n\n Usage:\n channels\n clist\n comlist\n\n Lists all channels available to you, whether you listen to them or not.\n Use 'comlist' to only view your current channel subscriptions.\n Use addcom/delcom to join and leave channels\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdChannels.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -315,11 +295,6 @@ Use addcom/delcom to join and leave channels</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCdestroy.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdCdestroy.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'cdestroy', 'tags': '', 'text': '\n destroy a channel you created\n\n Usage:\n cdestroy <channel>\n\n Destroys a channel that you control.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCdestroy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -375,11 +350,6 @@ Use addcom/delcom to join and leave channels</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCBoot.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdCBoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'cboot', 'tags': '', 'text': "\n kick an account from a channel you control\n\n Usage:\n cboot[/quiet] <channel> = <account> [:reason]\n\n Switch:\n quiet - don't notify the channel\n\n Kicks an account or object from a channel you control.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCBoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -438,11 +408,6 @@ provide the /sendername switch.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: not pperm(channel_banned) and pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCemit.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdCemit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cmsg', 'category': 'comms', 'key': 'cemit', 'tags': '', 'text': "\n send an admin message to a channel you control\n\n Usage:\n cemit[/switches] <channel> = <message>\n\n Switches:\n sendername - attach the sender's name before the message\n quiet - don't echo the message back to sender\n\n Allows the user to broadcast a message over a channel as long as\n they control it. It does not show the user's name unless they\n provide the /sendername switch.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCemit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -491,11 +456,6 @@ provide the /sendername switch.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd: not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCWho.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdCWho.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'cwho', 'tags': '', 'text': '\n show who is listening to a channel\n\n Usage:\n cwho <channel>\n\n List who is connected to a given channel you have access to.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCWho.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -544,11 +504,6 @@ provide the /sendername switch.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:not pperm(channel_banned) and pperm(Player)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdChannelCreate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdChannelCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'channelcreate', 'category': 'comms', 'key': 'ccreate', 'tags': '', 'text': '\n create a new channel\n\n Usage:\n ccreate <new channel>[;alias;alias...] = description\n\n Creates a new channel owned by you.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdChannelCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -598,11 +553,6 @@ lockstring was given, view the current lock definitions.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdClock.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdClock.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'clock', 'tags': '', 'text': '\n change channel locks of a channel you control\n\n Usage:\n clock <channel> [= <lockstring>]\n\n Changes the lock access restrictions of a channel. If no\n lockstring was given, view the current lock definitions.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdClock.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -652,11 +602,6 @@ channel lists.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:not pperm(channel_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCdesc.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdCdesc.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'cdesc', 'tags': '', 'text': '\n describe a channel you control\n\n Usage:\n cdesc <channel> = <description>\n\n Changes the description of the channel as shown in\n channel lists.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdCdesc.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -716,11 +661,6 @@ argument is given, you will get a list of your latest messages.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:not pperm(page_banned)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdPage.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdPage.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'tell', 'category': 'comms', 'key': 'page', 'tags': '', 'text': "\n send a private message to another account\n\n Usage:\n page[/switches] [<account>,<account>,... = <message>]\n tell ''\n page <number>\n\n Switch:\n last - shows who you last messaged\n list - show your last <number> of tells/pages (default)\n\n Send a message to target user (if online). If no\n argument is given, you will get a list of your latest messages.\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdPage.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -798,11 +738,6 @@ Provide an optional bot class path to use a custom bot.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:serversetting(IRC_ENABLED) and pperm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdIRC2Chan.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdIRC2Chan.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'irc2chan', 'tags': '', 'text': '\n Link an evennia channel to an external IRC channel\n\n Usage:\n irc2chan[/switches] <evennia_channel> = <ircnetwork> <port> <#irchannel> <botname>[:typeclass]\n irc2chan/delete botname|#dbid\n\n Switches:\n /delete - this will delete the bot and remove the irc connection\n to the channel. Requires the botname or #dbid as input.\n /remove - alias to /delete\n /disconnect - alias to /delete\n /list - show all irc<->evennia mappings\n /ssl - use an SSL-encrypted connection\n\n Example:\n irc2chan myircchan = irc.dalnet.net 6667 #mychannel evennia-bot\n irc2chan public = irc.freenode.net 6667 #evgaming #evbot:accounts.mybot.MyBot\n\n This creates an IRC bot that connects to a given IRC network and\n channel. If a custom typeclass path is given, this will be used\n instead of the default bot class.\n The bot will relay everything said in the evennia channel to the\n IRC channel and vice versa. The bot will automatically connect at\n server start, so this command need only be given once. The\n /disconnect switch will permanently delete the bot. To only\n temporarily deactivate it, use the |wservices|n command instead.\n Provide an optional bot class path to use a custom bot.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdIRC2Chan.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -854,11 +789,6 @@ messages sent to either channel will be lost.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:serversetting(IRC_ENABLED) and perm(ircstatus) or perm(Builder))'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdIRCStatus.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdIRCStatus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'ircstatus', 'tags': '', 'text': "\n Check and reboot IRC bot.\n\n Usage:\n ircstatus [#dbref ping||nicklist||reconnect]\n\n If not given arguments, will return a list of all bots (like\n irc2chan/list). The 'ping' argument will ping the IRC network to\n see if the connection is still responsive. The 'nicklist' argument\n (aliases are 'who' and 'users') will return a list of users on the\n remote IRC channel. Finally, 'reconnect' will force the client to\n disconnect and reconnect again. This may be a last resort if the\n client has silently lost connection (this may happen if the remote\n network experience network issues). During the reconnection\n messages sent to either channel will be lost.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdIRCStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -931,11 +861,6 @@ to identify the connection uniquely.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:serversetting(RSS_ENABLED) and pperm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdRSS2Chan.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdRSS2Chan.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'rss2chan', 'tags': '', 'text': '\n link an evennia channel to an external RSS feed\n\n Usage:\n rss2chan[/switches] <evennia_channel> = <rss_url>\n\n Switches:\n /disconnect - this will stop the feed and remove the connection to the\n channel.\n /remove - "\n /list - show all rss->evennia mappings\n\n Example:\n rss2chan rsschan = http://code.google.com/feeds/p/evennia/updates/basic\n\n This creates an RSS reader that connects to a given RSS feed url. Updates\n will be echoed as a title and news link to the given channel. The rate of\n updating is set with the RSS_UPDATE_INTERVAL variable in settings (default\n is every 10 minutes).\n\n When disconnecting you need to supply both the channel and url again so as\n to identify the connection uniquely.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdRSS2Chan.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1009,11 +934,6 @@ must be added to game settings.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:serversetting(GRAPEVINE_ENABLED) and pperm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.comms.CmdGrapevine2Chan.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.comms.CmdGrapevine2Chan.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'comms', 'key': 'grapevine2chan', 'tags': '', 'text': '\n Link an Evennia channel to an exteral Grapevine channel\n\n Usage:\n grapevine2chan[/switches] <evennia_channel> = <grapevine_channel>\n grapevine2chan/disconnect <connection #id>\n\n Switches:\n /list - (or no switch): show existing grapevine <-> Evennia\n mappings and available grapevine chans\n /remove - alias to disconnect\n /delete - alias to disconnect\n\n Example:\n grapevine2chan mygrapevine = gossip\n\n This creates a link between an in-game Evennia channel and an external\n Grapevine channel. The game must be registered with the Grapevine network\n (register at https://grapevine.haus) and the GRAPEVINE_* auth information\n must be added to game settings.\n '}</em><a class="headerlink" href="#evennia.commands.default.comms.CmdGrapevine2Chan.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -85,11 +85,6 @@
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(home) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.general.CmdHome.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdHome.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'home', 'tags': '', 'text': "\n move to your character's home location\n\n Usage:\n home\n\n Teleports you to your home location.\n "}</em><a class="headerlink" href="#evennia.commands.default.general.CmdHome.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -111,7 +106,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -140,11 +135,6 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -204,7 +194,7 @@ for everyone to use, you need build privileges and the alias command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdNick.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['nicks', 'nickname']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['nickname', 'nicks']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -234,11 +224,6 @@ for everyone to use, you need build privileges and the alias command.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdNick.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nicks nickname', 'category': 'general', 'key': 'nick', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -259,7 +244,7 @@ inv</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdInventory.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inv']</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i']</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -288,11 +273,6 @@ inv</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdInventory.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdInventory.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -343,11 +323,6 @@ look at you.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdSetDesc.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdSetDesc.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'setdesc', 'tags': '', 'text': '\n describe yourself\n\n Usage:\n setdesc <description>\n\n Add a description to yourself. This\n will be visible to people when they\n look at you.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdSetDesc.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -397,11 +372,6 @@ your inventory.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdGet.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdGet.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'grab', 'category': 'general', 'key': 'get', 'tags': '', 'text': '\n pick up something\n\n Usage:\n get <obj>\n\n Picks up an object from your location and puts it in\n your inventory.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdGet.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -451,11 +421,6 @@ location you are currently in.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdDrop.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdDrop.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'drop', 'tags': '', 'text': '\n drop something\n\n Usage:\n drop <obj>\n\n Lets you drop an object from your inventory into the\n location you are currently in.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdDrop.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -510,11 +475,6 @@ placing it in their inventory.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdGive.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdGive.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'give', 'tags': '', 'text': '\n give away something to someone\n\n Usage:\n give <inventory obj> <to||=> <target>\n\n Gives an items from your inventory to another character,\n placing it in their inventory.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdGive.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -534,7 +494,7 @@ placing it in their inventory.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdSay.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['"', "'"]</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ["'", '"']</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -558,11 +518,6 @@ placing it in their inventory.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdSay.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdSay.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -608,11 +563,6 @@ others in the room being informed.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdWhisper.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdWhisper.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'whisper', 'tags': '', 'text': '\n Speak privately as your character to another\n\n Usage:\n whisper <character> = <message>\n whisper <char1>, <char2> = <message>\n\n Talk privately to one or more characters in your current location, without\n others in the room being informed.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdWhisper.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -640,7 +590,7 @@ automatically begin with your name.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdPose.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['emote', ':']</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':', 'emote']</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -674,11 +624,6 @@ space.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdPose.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'emote :', 'category': 'general', 'key': 'pose', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}</em><a class="headerlink" href="#evennia.commands.default.general.CmdPose.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -699,7 +644,7 @@ which permission groups you are a member of.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdAccess.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hierarchy', 'groups']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['groups', 'hierarchy']</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -728,11 +673,6 @@ which permission groups you are a member of.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdAccess.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdAccess.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ entry is displayed.</p>
|
|||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.commands.default.help.CmdHelp.format_help_list">
|
||||
<code class="sig-name descname">format_help_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">hdict_cmds</span></em>, <em class="sig-param"><span class="n">hdict_db</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/help.html#CmdHelp.format_help_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.help.CmdHelp.format_help_list" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property">static </em><code class="sig-name descname">format_help_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">hdict_cmds</span></em>, <em class="sig-param"><span class="n">hdict_db</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/help.html#CmdHelp.format_help_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.help.CmdHelp.format_help_list" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Output a category-ordered list. The input are the
|
||||
pre-loaded help files for commands and database-helpfiles
|
||||
respectively. You can override this method to return a
|
||||
|
|
@ -199,11 +199,6 @@ False: the command shouldn’t appear in the table.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.help.CmdHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.help.CmdHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}</em><a class="headerlink" href="#evennia.commands.default.help.CmdHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -266,11 +261,6 @@ is to let everyone read the help file.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(Helper)'</em><a class="headerlink" href="#evennia.commands.default.help.CmdSetHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.help.CmdSetHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'sethelp', 'tags': '', 'text': '\n Edit the help database.\n\n Usage:\n help[/switches] <topic>[[;alias;alias][,category[,locks]] [= <text>]\n\n Switches:\n edit - open a line editor to edit the topic\'s help text.\n replace - overwrite existing help topic.\n append - add text to the end of existing topic with a newline between.\n extend - as append, but don\'t add a newline.\n delete - remove help topic.\n\n Examples:\n sethelp throw = This throws something at ...\n sethelp/append pickpocketing,Thievery = This steals ...\n sethelp/replace pickpocketing, ,attr(is_thief) = This steals ...\n sethelp/edit thievery\n\n This command manipulates the help database. A help entry can be created,\n appended/merged to and deleted. If you don\'t assign a category, the\n "General" category will be used. If no lockstring is specified, default\n is to let everyone read the help file.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.help.CmdSetHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -183,11 +183,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.default.muxcommand.MuxCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.muxcommand.MuxCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': "\n This sets up the basis for a MUX command. The idea\n is that most other Mux-related commands should just\n inherit from this and don't have to implement much\n parsing of their own unless they do something particularly\n advanced.\n\n Note that the class's __doc__ string (this text) is\n used by Evennia to create the automatic help entry for\n the command, so make sure to document consistently here.\n "}</em><a class="headerlink" href="#evennia.commands.default.muxcommand.MuxCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -228,11 +223,6 @@ character is actually attached to this Account and Session.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.default.muxcommand.MuxAccountCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.muxcommand.MuxAccountCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n This is an on-Account version of the MuxCommand. Since these commands sit\n on Accounts rather than on Characters/Objects, we need to check\n this in the parser.\n\n Account commands are available also when puppeting a Character, it\'s\n just that they are applied with a lower priority and are always\n available, also when disconnected from a character (i.e. "ooc").\n\n This class makes sure that caller is always an Account object, while\n creating a new property "character" that is set only if a\n character is actually attached to this Account and Session.\n '}</em><a class="headerlink" href="#evennia.commands.default.muxcommand.MuxAccountCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -88,11 +88,6 @@ the line is just added to the editor buffer).</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemNoInput.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.syscommands.SystemNoInput.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n This is called when there is no input given\n '}</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemNoInput.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -131,11 +126,6 @@ the line is just added to the editor buffer).</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemNoMatch.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.syscommands.SystemNoMatch.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': '\n No command was found matching the given input.\n '}</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemNoMatch.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -184,11 +174,6 @@ the <strong>raw_cmdname</strong> is the cmdname unmodified by eventual prefix-st
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemMultimatch.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.syscommands.SystemMultimatch.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__multimatch_command', 'tags': '', 'text': "\n Multiple command matches.\n\n The cmdhandler adds a special attribute 'matches' to this\n system command.\n\n matches = [(cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname) , (cmdname, ...), ...]\n\n Here, `cmdname` is the command's name and `args` the rest of the incoming string,\n without said command name. `cmdobj` is the Command instance, the cmdlen is\n the same as len(cmdname) and mratio is a measure of how big a part of the\n full input string the cmdname takes up - an exact match would be 1.0. Finally,\n the `raw_cmdname` is the cmdname unmodified by eventual prefix-stripping.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemMultimatch.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -303,11 +288,6 @@ the already formatted input.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemSendToChannel.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.syscommands.SystemSendToChannel.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__send_to_channel_command', 'tags': '', 'text': '\n This is a special command that the cmdhandler calls\n when it detects that the command given matches\n an existing Channel object key (or alias).\n '}</em><a class="headerlink" href="#evennia.commands.default.syscommands.SystemSendToChannel.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,11 +82,6 @@ reset to purge) and at_reload() hooks will be called.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(reload) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdReload.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdReload.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'restart', 'category': 'system', 'key': 'reload', 'tags': '', 'text': '\n reload the server\n\n Usage:\n reload [reason]\n\n This restarts the server. The Portal is not\n affected. Non-persistent scripts will survive a reload (use\n reset to purge) and at_reload() hooks will be called.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdReload.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -139,11 +134,6 @@ cmdsets etc will be wiped.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(reload) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdReset.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdReset.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'reboot', 'category': 'system', 'key': 'reset', 'tags': '', 'text': '\n reset and reboot the server\n\n Usage:\n reset\n\n Notes:\n For normal updating you are recommended to use reload rather\n than this command. Use shutdown for a complete stop of\n everything.\n\n This emulates a cold reboot of the Server component of Evennia.\n The difference to shutdown is that the Server will auto-reboot\n and that it does not affect the Portal, so no users will be\n disconnected. Contrary to reload however, all shutdown hooks will\n be called and any non-database saved scripts, ndb-attributes,\n cmdsets etc will be wiped.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdReset.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -187,11 +177,6 @@ cmdsets etc will be wiped.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(shutdown) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdShutdown.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdShutdown.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'system', 'key': 'shutdown', 'tags': '', 'text': '\n stop the server completely\n\n Usage:\n shutdown [announcement]\n\n Gracefully shut down both Server and Portal.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdShutdown.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -279,11 +264,6 @@ should only be accessible by trusted server admins/superusers.|n</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(py) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdPy.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdPy.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '!', 'category': 'system', 'key': 'py', 'tags': '', 'text': "\n execute a snippet of python code\n\n Usage:\n py [cmd]\n py/edit\n py/time <cmd>\n py/clientraw <cmd>\n py/noecho\n\n Switches:\n time - output an approximate execution time for <cmd>\n edit - open a code editor for multi-line code experimentation\n clientraw - turn off all client-specific escaping. Note that this may\n lead to different output depending on prototocol (such as angular brackets\n being parsed as HTML in the webclient but not in telnet clients)\n noecho - in Python console mode, turn off the input echo (e.g. if your client\n does this for you already)\n\n Without argument, open a Python console in-game. This is a full console,\n accepting multi-line Python code for testing and debugging. Type `exit()` to\n return to the game. If Evennia is reloaded, the console will be closed.\n\n Enter a line of instruction after the 'py' command to execute it\n immediately. Separate multiple commands by ';' or open the code editor\n using the /edit switch (all lines added in editor will be executed\n immediately when closing or using the execute command in the editor).\n\n A few variables are made available for convenience in order to offer access\n to the system (you can import more at execution time).\n\n Available variables in py environment:\n self, me : caller\n here : caller.location\n evennia : the evennia API\n inherits_from(obj, parent) : check object inheritance\n\n You can explore The evennia API from inside the game by calling\n the `__doc__` property on entities:\n py evennia.__doc__\n py evennia.managers.__doc__\n\n |rNote: In the wrong hands this command is a severe security risk. It\n should only be accessible by trusted server admins/superusers.|n\n\n "}</em><a class="headerlink" href="#evennia.commands.default.system.CmdPy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -347,11 +327,6 @@ required since whole classes of scripts often have the same name.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(listscripts) or perm(Admin)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdScripts.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdScripts.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'globalscript listscripts', 'category': 'system', 'key': 'scripts', 'tags': '', 'text': '\n list and manage all running scripts\n\n Usage:\n scripts[/switches] [#dbref, key, script.path or <obj>]\n\n Switches:\n start - start a script (must supply a script path)\n stop - stops an existing script\n kill - kills a script - without running its cleanup hooks\n validate - run a validation on the script(s)\n\n If no switches are given, this command just views all active\n scripts. The argument can be either an object, at which point it\n will be searched for all scripts defined on it, or a script name\n or #dbref. For using the /stop switch, a unique script #dbref is\n required since whole classes of scripts often have the same name.\n\n Use script for managing commands on objects.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdScripts.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -373,7 +348,7 @@ given, <nr> defaults to 10.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdObjects.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['listobjects', 'db', 'stats', 'listobjs']</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['listobjects', 'stats', 'db', 'listobjs']</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -397,11 +372,6 @@ given, <nr> defaults to 10.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(listobjects) or perm(Builder)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdObjects.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'listobjects db stats listobjs', 'category': 'system', 'key': 'objects', 'tags': '', 'text': '\n statistics on objects in the database\n\n Usage:\n objects [<nr>]\n\n Gives statictics on objects in database as well as\n a list of <nr> latest objects in database. If not\n given, <nr> defaults to 10.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdObjects.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -459,11 +429,6 @@ in the list.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(service) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdService.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdService.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'services', 'category': 'system', 'key': 'service', 'tags': '', 'text': '\n manage system services\n\n Usage:\n service[/switch] <service>\n\n Switches:\n list - shows all available services (default)\n start - activates or reactivate a service\n stop - stops/inactivate a service (can often be restarted)\n delete - tries to permanently remove a service\n\n Service management system. Allows for the listing,\n starting, and stopping of services. If no switches\n are given, services will be listed. Note that to operate on the\n service you have to supply the full (green or red) name as given\n in the list.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdService.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -507,11 +472,6 @@ in the list.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.system.CmdAbout.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdAbout.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'version', 'category': 'system', 'key': 'about', 'tags': '', 'text': '\n show Evennia info\n\n Usage:\n about\n\n Display info about the game engine.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdAbout.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -556,11 +516,6 @@ and the current time stamp.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(time) or perm(Player)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdTime.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdTime.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'uptime', 'category': 'system', 'key': 'time', 'tags': '', 'text': '\n show server time statistics\n\n Usage:\n time\n\n List Server time statistics such as uptime\n and the current time stamp.\n '}</em><a class="headerlink" href="#evennia.commands.default.system.CmdTime.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -629,11 +584,6 @@ the released memory will instead be re-used by the program.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(list) or perm(Developer)'</em><a class="headerlink" href="#evennia.commands.default.system.CmdServerLoad.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdServerLoad.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'serverload serverprocess', 'category': 'system', 'key': 'server', 'tags': '', 'text': "\n show server load and memory statistics\n\n Usage:\n server[/mem]\n\n Switches:\n mem - return only a string of the current memory usage\n flushmem - flush the idmapper cache\n\n This command shows server load statistics and dynamic memory\n usage. It also allows to flush the cache of accessed database\n objects.\n\n Some Important statistics in the table:\n\n |wServer load|n is an average of processor usage. It's usually\n between 0 (no usage) and 1 (100% usage), but may also be\n temporarily higher if your computer has multiple CPU cores.\n\n The |wResident/Virtual memory|n displays the total memory used by\n the server process.\n\n Evennia |wcaches|n all retrieved database entities when they are\n loaded by use of the idmapper functionality. This allows Evennia\n to maintain the same instances of an entity and allowing\n non-persistent storage schemes. The total amount of cached objects\n are displayed plus a breakdown of database object types.\n\n The |wflushmem|n switch allows to flush the object cache. Please\n note that due to how Python's memory management works, releasing\n caches may not show you a lower Residual/Virtual memory footprint,\n the released memory will instead be re-used by the program.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.system.CmdServerLoad.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -138,18 +138,6 @@ output sent to caller.msg in the game</p>
|
|||
<dt id="evennia.commands.default.tests.TestHelp">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.commands.default.tests.</code><code class="sig-name descname">TestHelp</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/tests.html#TestHelp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.tests.TestHelp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.commands.default.tests.CommandTest" title="evennia.commands.default.tests.CommandTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.commands.default.tests.CommandTest</span></code></a></p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.commands.default.tests.TestHelp.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/default/tests.html#TestHelp.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.tests.TestHelp.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Sets up testing environment</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.commands.default.tests.TestHelp.tearDown">
|
||||
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/tests.html#TestHelp.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.tests.TestHelp.tearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.commands.default.tests.TestHelp.test_help">
|
||||
<code class="sig-name descname">test_help</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/commands/default/tests.html#TestHelp.test_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.commands.default.tests.TestHelp.test_help" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -611,11 +599,6 @@ set in self.parse())</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.commands.default.tests.CmdInterrupt.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.tests.CmdInterrupt.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'interrupt', '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 auto_help_display_key - (optional) if given, this replaces the string shown\n in the auto-help listing. This is particularly useful for system-commands\n whose actual key is not really meaningful.\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.default.tests.CmdInterrupt.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ connect “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['con', 'conn', 'co']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -91,11 +91,6 @@ there is no object yet before the account has logged in)</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -117,7 +112,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -146,11 +141,6 @@ create “account name” “pass word”</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -172,7 +162,7 @@ version is a bit more complicated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedQuit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['qu', 'q']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'qu']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -196,11 +186,6 @@ version is a bit more complicated.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedQuit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'qu q', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n quit when in unlogged-in state\n\n Usage:\n quit\n\n We maintain a different version of the quit command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -222,7 +207,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'look']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -246,11 +231,6 @@ All it does is display the connect screen.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n look when in unlogged-in state\n\n Usage:\n look\n\n This is an unconnected version of the look command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -271,7 +251,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -295,11 +275,6 @@ for simplicity. It shows a pane of info.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -140,11 +140,6 @@ the already formatted input.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.comms.channelhandler.ChannelCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.comms.channelhandler.ChannelCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'channel names', 'key': 'general', 'tags': '', 'text': '\n {channelkey} channel\n\n {channeldesc}\n\n Usage:\n {lower_channelkey} <message>\n {lower_channelkey}/history [start]\n {lower_channelkey} off - mutes the channel\n {lower_channelkey} on - unmutes the channel\n\n Switch:\n history: View 20 previous messages, either from the end or\n from <start> number of messages from the end.\n\n Example:\n {lower_channelkey} Hello World!\n {lower_channelkey}/history\n {lower_channelkey}/history 30\n\n '}</em><a class="headerlink" href="#evennia.comms.channelhandler.ChannelCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -36,471 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.contrib.awsstorage.aws_s3_cdn">
|
||||
<span id="evennia-contrib-awsstorage-aws-s3-cdn"></span><h1>evennia.contrib.awsstorage.aws_s3_cdn<a class="headerlink" href="#module-evennia.contrib.awsstorage.aws_s3_cdn" title="Permalink to this headline">¶</a></h1>
|
||||
<p>AWS Storage System
|
||||
The Right Honourable Reverend (trhr) 2020</p>
|
||||
<p>ABOUT THIS PLUGIN:</p>
|
||||
<p>This plugin migrates the Web-based portion of Evennia, namely images,
|
||||
javascript, and other items located inside staticfiles into Amazon AWS (S3) for hosting.</p>
|
||||
<p>Files hosted on S3 are “in the cloud,” and while your personal
|
||||
server may be sufficient for serving multimedia to a minimal number of users,
|
||||
the perfect use case for this plugin would be:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Servers supporting heavy web-based traffic (webclient, etc)</p></li>
|
||||
<li><p>With a sizable number of users</p></li>
|
||||
<li><p>Where the users are globally distributed</p></li>
|
||||
<li><p>Where multimedia files are served to users as a part of gameplay</p></li>
|
||||
</ol>
|
||||
<p>Bottom line - if you’re sending an image to a player every time they traverse a
|
||||
map, the bandwidth reduction will be substantial. If not, probably skip
|
||||
this one.</p>
|
||||
<p>Note that storing and serving files via S3 is not technically free outside of
|
||||
Amazon’s “free tier” offering, which you may or may not be eligible for;
|
||||
evennia’s base install currently requires 1.5MB of storage space on S3,
|
||||
making the current total cost to install this plugin ~$0.0005 per year. If
|
||||
you have substantial media assets and intend to serve them to many users,
|
||||
caveat emptor on a total cost of ownership - check AWS’s pricing structure.</p>
|
||||
<p>See the ./README.md file for details and install instructions.</p>
|
||||
<dl class="py function">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.setting">
|
||||
<code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">setting</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#setting"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.setting" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function to get a Django setting by name. If setting doesn’t exist
|
||||
it will return a default.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>name</strong> (<em>str</em>) – A Django setting name</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>The value of the setting variable by that name</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.safe_join">
|
||||
<code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">safe_join</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">base</span></em>, <em class="sig-param"><span class="o">*</span><span class="n">paths</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#safe_join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.safe_join" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function, a version of django.utils._os.safe_join for S3 paths.
|
||||
Joins one or more path components to the base path component
|
||||
intelligently. Returns a normalized version of the final path.
|
||||
The final path must be located inside of the base path component
|
||||
(otherwise a ValueError is raised). Paths outside the base path
|
||||
indicate a possible security sensitive operation.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>base</strong> (<em>str</em>) – A path string to the base of the staticfiles</p></li>
|
||||
<li><p><strong>*paths</strong> (<em>list</em>) – A list of paths as referenced from the base path</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>final_path (str)</em> – A joined path, base + filepath</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.check_location">
|
||||
<code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">check_location</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">storage</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#check_location"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.check_location" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function to make sure that the storage location is configured correctly.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>storage</strong> (<em>Storage</em>) – A Storage object (Django)</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p><strong>ImproperlyConfigured</strong> – If the storage location is not configured correctly,
|
||||
this is raised.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.lookup_env">
|
||||
<code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">lookup_env</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">names</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#lookup_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.lookup_env" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function for looking up names in env vars. Returns the first element found.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>names</strong> (<em>str</em>) – A list of environment variables</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>value (str)</em> – The value of the found environment variable.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.get_available_overwrite_name">
|
||||
<code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">get_available_overwrite_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">max_length</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#get_available_overwrite_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.get_available_overwrite_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function indicating files that will be overwritten during trunc.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<em>str</em>) – The name of the file</p></li>
|
||||
<li><p><strong>max_length</strong> (<em>int</em>) – The maximum length of a filename</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>joined (path)</em> – A joined path including directory, file, and extension</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">S3Boto3StorageFile</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3StorageFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.core.files.base.File</span></code></p>
|
||||
<p>The default file object used by the S3Boto3Storage backend.
|
||||
This file implements file streaming using boto’s multipart
|
||||
uploading functionality. The file can be opened in read or
|
||||
write mode.
|
||||
This class extends Django’s File class. However, the contained
|
||||
data is only the data contained in the current buffer. So you
|
||||
should not access the contained file object directly. You should
|
||||
access the data via this class.
|
||||
Warning: This file <em>must</em> be closed using the close() method in
|
||||
order to properly write the file to S3. Be sure to close the file
|
||||
in your application.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">mode</span></em>, <em class="sig-param"><span class="n">storage</span></em>, <em class="sig-param"><span class="n">buffer_size</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3StorageFile.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initializes the File object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<em>str</em>) – The name of the file</p></li>
|
||||
<li><p><strong>mode</strong> (<em>str</em>) – The access mode (‘r’ or ‘w’)</p></li>
|
||||
<li><p><strong>storage</strong> (<em>Storage</em>) – The Django Storage object</p></li>
|
||||
<li><p><strong>buffer_size</strong> (<em>int</em>) – The buffer size, for multipart uploads</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.buffer_size">
|
||||
<code class="sig-name descname">buffer_size</code><em class="property"> = 5242880</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.buffer_size" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.size">
|
||||
<em class="property">property </em><code class="sig-name descname">size</code><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.size" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper property to return filesize</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.file">
|
||||
<em class="property">property </em><code class="sig-name descname">file</code><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.file" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function to manage zipping and temporary files</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.read">
|
||||
<code class="sig-name descname">read</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3StorageFile.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.read" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks if file is in read mode; then continues to boto3 operation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.readline">
|
||||
<code class="sig-name descname">readline</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3StorageFile.readline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.readline" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks if file is in read mode; then continues to boto3 operation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.write">
|
||||
<code class="sig-name descname">write</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">content</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3StorageFile.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.write" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks if file is in write mode or needs multipart handling,
|
||||
then continues to boto3 operation.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.close">
|
||||
<code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3StorageFile.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.close" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Manages file closing after multipart uploads</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.deconstruct">
|
||||
<code class="sig-name descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3StorageFile.deconstruct" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a 3-tuple of class import path, positional arguments,
|
||||
and keyword arguments.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.awsstorage.aws_s3_cdn.</code><code class="sig-name descname">S3Boto3Storage</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.core.files.storage.Storage</span></code></p>
|
||||
<p>Amazon Simple Storage Service using Boto3
|
||||
This storage backend supports opening files in read or write
|
||||
mode and supports streaming(buffering) data in chunks to S3
|
||||
when writing.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.default_content_type">
|
||||
<code class="sig-name descname">default_content_type</code><em class="property"> = 'application/octet-stream'</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.default_content_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.access_key_names">
|
||||
<code class="sig-name descname">access_key_names</code><em class="property"> = ['AWS_S3_ACCESS_KEY_ID', 'AWS_ACCESS_KEY_ID']</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.access_key_names" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.secret_key_names">
|
||||
<code class="sig-name descname">secret_key_names</code><em class="property"> = ['AWS_S3_SECRET_ACCESS_KEY', 'AWS_SECRET_ACCESS_KEY']</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.secret_key_names" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.security_token_names">
|
||||
<code class="sig-name descname">security_token_names</code><em class="property"> = ['AWS_SESSION_TOKEN', 'AWS_SECURITY_TOKEN']</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.security_token_names" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.file_overwrite">
|
||||
<code class="sig-name descname">file_overwrite</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.file_overwrite" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.object_parameters">
|
||||
<code class="sig-name descname">object_parameters</code><em class="property"> = {}</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.object_parameters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.bucket_name">
|
||||
<code class="sig-name descname">bucket_name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.bucket_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.auto_create_bucket">
|
||||
<code class="sig-name descname">auto_create_bucket</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.auto_create_bucket" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.default_acl">
|
||||
<code class="sig-name descname">default_acl</code><em class="property"> = 'public-read'</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.default_acl" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.bucket_acl">
|
||||
<code class="sig-name descname">bucket_acl</code><em class="property"> = 'public-read'</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.bucket_acl" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.querystring_auth">
|
||||
<code class="sig-name descname">querystring_auth</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.querystring_auth" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.querystring_expire">
|
||||
<code class="sig-name descname">querystring_expire</code><em class="property"> = 3600</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.querystring_expire" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.signature_version">
|
||||
<code class="sig-name descname">signature_version</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.signature_version" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.reduced_redundancy">
|
||||
<code class="sig-name descname">reduced_redundancy</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.reduced_redundancy" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.location">
|
||||
<code class="sig-name descname">location</code><em class="property"> = ''</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.location" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.encryption">
|
||||
<code class="sig-name descname">encryption</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.encryption" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.custom_domain">
|
||||
<code class="sig-name descname">custom_domain</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.custom_domain" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.addressing_style">
|
||||
<code class="sig-name descname">addressing_style</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.addressing_style" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.secure_urls">
|
||||
<code class="sig-name descname">secure_urls</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.secure_urls" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.file_name_charset">
|
||||
<code class="sig-name descname">file_name_charset</code><em class="property"> = 'utf-8'</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.file_name_charset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.gzip">
|
||||
<code class="sig-name descname">gzip</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.gzip" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.preload_metadata">
|
||||
<code class="sig-name descname">preload_metadata</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.preload_metadata" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.gzip_content_types">
|
||||
<code class="sig-name descname">gzip_content_types</code><em class="property"> = ('text/css', 'text/javascript', 'application/javascript', 'application/x-javascript', 'image/svg+xml')</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.gzip_content_types" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.endpoint_url">
|
||||
<code class="sig-name descname">endpoint_url</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.endpoint_url" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.proxies">
|
||||
<code class="sig-name descname">proxies</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.proxies" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.region_name">
|
||||
<code class="sig-name descname">region_name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.region_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.use_ssl">
|
||||
<code class="sig-name descname">use_ssl</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.use_ssl" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.verify">
|
||||
<code class="sig-name descname">verify</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.verify" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.max_memory_size">
|
||||
<code class="sig-name descname">max_memory_size</code><em class="property"> = 0</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.max_memory_size" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">acl</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">bucket</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">settings</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check if some of the settings we’ve provided as class attributes
|
||||
need to be overwritten with values passed in here.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.url_protocol">
|
||||
<code class="sig-name descname">url_protocol</code><em class="property"> = 'http:'</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.url_protocol" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.access_key">
|
||||
<code class="sig-name descname">access_key</code><em class="property"> = ''</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.access_key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.secret_key">
|
||||
<code class="sig-name descname">secret_key</code><em class="property"> = ''</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.secret_key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.security_token">
|
||||
<code class="sig-name descname">security_token</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.security_token" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.config">
|
||||
<code class="sig-name descname">config</code><em class="property"> = None</em><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.config" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.connection">
|
||||
<em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.connection" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates the actual connection to S3</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.bucket">
|
||||
<em class="property">property </em><code class="sig-name descname">bucket</code><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.bucket" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the current bucket. If there is no current bucket object
|
||||
create it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.entries">
|
||||
<em class="property">property </em><code class="sig-name descname">entries</code><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.entries" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the locally cached files for the bucket.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.delete">
|
||||
<code class="sig-name descname">delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Deletes a file from S3.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.exists">
|
||||
<code class="sig-name descname">exists</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.exists" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks if file exists.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.listdir">
|
||||
<code class="sig-name descname">listdir</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.listdir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.listdir" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Translational function to go from S3 file paths to the format
|
||||
Django’s listdir expects.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.size">
|
||||
<code class="sig-name descname">size</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.size" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Gets the filesize of a remote file.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.deconstruct">
|
||||
<code class="sig-name descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.deconstruct" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a 3-tuple of class import path, positional arguments,
|
||||
and keyword arguments.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.get_object_parameters">
|
||||
<code class="sig-name descname">get_object_parameters</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.get_object_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.get_object_parameters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a dictionary that is passed to file upload. Override this
|
||||
method to adjust this on a per-object basis to set e.g ContentDisposition.
|
||||
By default, returns the value of AWS_S3_OBJECT_PARAMETERS.
|
||||
Setting ContentEncoding will prevent objects from being automatically gzipped.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.get_modified_time">
|
||||
<code class="sig-name descname">get_modified_time</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.get_modified_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.get_modified_time" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns an (aware) datetime object containing the last modified time if
|
||||
USE_TZ is True, otherwise returns a naive datetime in the local timezone.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.modified_time">
|
||||
<code class="sig-name descname">modified_time</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.modified_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.modified_time" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a naive datetime object containing the last modified time.
|
||||
If USE_TZ=False then get_modified_time will return a naive datetime
|
||||
so we just return that, else we have to localize and strip the tz</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.url">
|
||||
<code class="sig-name descname">url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">parameters</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">expire</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.url" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns the URL of a remotely-hosted file</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.get_available_name">
|
||||
<code class="sig-name descname">get_available_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">max_length</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/aws_s3_cdn.html#S3Boto3Storage.get_available_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.aws_s3_cdn.S3Boto3Storage.get_available_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Overwrite existing file with the same name.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-contrib-awsstorage-aws-s3-cdn">
|
||||
<h1>evennia.contrib.awsstorage.aws_s3_cdn<a class="headerlink" href="#evennia-contrib-awsstorage-aws-s3-cdn" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
<div class="section" id="module-evennia.contrib.awsstorage">
|
||||
<span id="evennia-contrib-awsstorage"></span><h1>evennia.contrib.awsstorage<a class="headerlink" href="#module-evennia.contrib.awsstorage" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Intended to be a collecting folder for Django-specific contribs that do not have observable effects to players.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.awsstorage.aws_s3_cdn.html">evennia.contrib.awsstorage.aws_s3_cdn</a></li>
|
||||
|
|
|
|||
|
|
@ -36,225 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.contrib.awsstorage.tests">
|
||||
<span id="evennia-contrib-awsstorage-tests"></span><h1>evennia.contrib.awsstorage.tests<a class="headerlink" href="#module-evennia.contrib.awsstorage.tests" title="Permalink to this headline">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3TestCase">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.awsstorage.tests.</code><code class="sig-name descname">S3Boto3TestCase</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3TestCase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3TestCase" 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="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3TestCase.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3TestCase.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3TestCase.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.awsstorage.tests.</code><code class="sig-name descname">S3Boto3StorageTests</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.awsstorage.tests.S3Boto3TestCase" title="evennia.contrib.awsstorage.tests.S3Boto3TestCase"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.awsstorage.tests.S3Boto3TestCase</span></code></a></p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name">
|
||||
<code class="sig-name descname">test_clean_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_clean_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test the base case of _clean_name</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name_normalize">
|
||||
<code class="sig-name descname">test_clean_name_normalize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_clean_name_normalize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name_normalize" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test the normalization of _clean_name</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name_trailing_slash">
|
||||
<code class="sig-name descname">test_clean_name_trailing_slash</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_clean_name_trailing_slash"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name_trailing_slash" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test the _clean_name when the path has a trailing slash</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name_windows">
|
||||
<code class="sig-name descname">test_clean_name_windows</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_clean_name_windows"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_clean_name_windows" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test the _clean_name when the path has a trailing slash</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_pickle_with_bucket">
|
||||
<code class="sig-name descname">test_pickle_with_bucket</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_pickle_with_bucket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_pickle_with_bucket" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test that the storage can be pickled with a bucket attached</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_pickle_without_bucket">
|
||||
<code class="sig-name descname">test_pickle_without_bucket</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_pickle_without_bucket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_pickle_without_bucket" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test that the storage can be pickled, without a bucket instance</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_url_slashes">
|
||||
<code class="sig-name descname">test_storage_url_slashes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_url_slashes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_url_slashes" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test URL generation.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save">
|
||||
<code class="sig-name descname">test_storage_save</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test saving a file</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_with_acl">
|
||||
<code class="sig-name descname">test_storage_save_with_acl</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_save_with_acl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_with_acl" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test saving a file with user defined ACL.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_content_type">
|
||||
<code class="sig-name descname">test_content_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_content_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_content_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test saving a file with a None content type.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_gzipped">
|
||||
<code class="sig-name descname">test_storage_save_gzipped</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_save_gzipped"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_gzipped" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test saving a gzipped file</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_gzip">
|
||||
<code class="sig-name descname">test_storage_save_gzip</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_save_gzip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_gzip" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test saving a file with gzip enabled.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_gzip_twice">
|
||||
<code class="sig-name descname">test_storage_save_gzip_twice</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_save_gzip_twice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_save_gzip_twice" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test saving the same file content twice with gzip enabled.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_compress_content_len">
|
||||
<code class="sig-name descname">test_compress_content_len</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_compress_content_len"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_compress_content_len" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test that file returned by _compress_content() is readable.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_open_write">
|
||||
<code class="sig-name descname">test_storage_open_write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_open_write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_open_write" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test opening a file in write mode</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_open_no_write">
|
||||
<code class="sig-name descname">test_storage_open_no_write</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_open_no_write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_open_no_write" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test opening file in write mode and closing without writing.</p>
|
||||
<p>A file should be created as by obj.put(…).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_open_no_overwrite_existing">
|
||||
<code class="sig-name descname">test_storage_open_no_overwrite_existing</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_open_no_overwrite_existing"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_open_no_overwrite_existing" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test opening an existing file in write mode and closing without writing.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_write_beyond_buffer_size">
|
||||
<code class="sig-name descname">test_storage_write_beyond_buffer_size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_write_beyond_buffer_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_write_beyond_buffer_size" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test writing content that exceeds the buffer size</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_auto_creating_bucket">
|
||||
<code class="sig-name descname">test_auto_creating_bucket</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_auto_creating_bucket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_auto_creating_bucket" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_auto_creating_bucket_with_acl">
|
||||
<code class="sig-name descname">test_auto_creating_bucket_with_acl</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_auto_creating_bucket_with_acl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_auto_creating_bucket_with_acl" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_exists">
|
||||
<code class="sig-name descname">test_storage_exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_exists" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_exists_false">
|
||||
<code class="sig-name descname">test_storage_exists_false</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_exists_false"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_exists_false" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_exists_doesnt_create_bucket">
|
||||
<code class="sig-name descname">test_storage_exists_doesnt_create_bucket</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_exists_doesnt_create_bucket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_exists_doesnt_create_bucket" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_delete">
|
||||
<code class="sig-name descname">test_storage_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_listdir_base">
|
||||
<code class="sig-name descname">test_storage_listdir_base</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_listdir_base"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_listdir_base" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_listdir_subdir">
|
||||
<code class="sig-name descname">test_storage_listdir_subdir</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_listdir_subdir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_listdir_subdir" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_size">
|
||||
<code class="sig-name descname">test_storage_size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_size" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_mtime">
|
||||
<code class="sig-name descname">test_storage_mtime</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_mtime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_mtime" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_url">
|
||||
<code class="sig-name descname">test_storage_url</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_storage_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_storage_url" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_generated_url_is_encoded">
|
||||
<code class="sig-name descname">test_generated_url_is_encoded</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_generated_url_is_encoded"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_generated_url_is_encoded" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_special_characters">
|
||||
<code class="sig-name descname">test_special_characters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_special_characters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_special_characters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_strip_signing_parameters">
|
||||
<code class="sig-name descname">test_strip_signing_parameters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_strip_signing_parameters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_strip_signing_parameters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_connection_threading">
|
||||
<code class="sig-name descname">test_connection_threading</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_connection_threading"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_connection_threading" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_location_leading_slash">
|
||||
<code class="sig-name descname">test_location_leading_slash</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_location_leading_slash"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_location_leading_slash" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_override_class_variable">
|
||||
<code class="sig-name descname">test_override_class_variable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_override_class_variable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_override_class_variable" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_override_init_argument">
|
||||
<code class="sig-name descname">test_override_init_argument</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/awsstorage/tests.html#S3Boto3StorageTests.test_override_init_argument"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.awsstorage.tests.S3Boto3StorageTests.test_override_init_argument" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-contrib-awsstorage-tests">
|
||||
<h1>evennia.contrib.awsstorage.tests<a class="headerlink" href="#evennia-contrib-awsstorage-tests" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -402,11 +402,6 @@ available to the command</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdTradeBase.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Base command for Trade commands to inherit from. Implements the\n custom parsing.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeBase.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -450,11 +445,6 @@ available to the command</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdTradeHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'trade', 'key': 'trade help', 'tags': '', 'text': '\n help command for the trade system.\n\n Usage:\n trade help\n\n Displays help for the trade commands.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTradeHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -499,11 +489,6 @@ standing offer.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdOffer.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'trading', 'key': 'offer', 'tags': '', 'text': '\n offer one or more items in trade.\n\n Usage:\n offer <object> [, object2, ...][:emote]\n\n Offer objects in trade. This will replace the currently\n standing offer.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdOffer.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -551,11 +536,6 @@ the current offer using the ‘offers’ command.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdAccept.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'agree', 'category': 'trading', 'key': 'accept', 'tags': '', 'text': "\n accept the standing offer\n\n Usage:\n accept [:emote]\n agreee [:emote]\n\n This will accept the current offer. The other party must also accept\n for the deal to go through. You can use the 'decline' command to change\n your mind as long as the other party has not yet accepted. You can inspect\n the current offer using the 'offers' command.\n "}</em><a class="headerlink" href="#evennia.contrib.barter.CmdAccept.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -602,11 +582,6 @@ decline the old offer.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdDecline.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'trading', 'key': 'decline', 'tags': '', 'text': "\n decline the standing offer\n\n Usage:\n decline [:emote]\n\n This will decline a previously 'accept'ed offer (so this allows you to\n change your mind). You can only use this as long as the other party\n has not yet accepted the deal. Also, changing the offer will automatically\n decline the old offer.\n "}</em><a class="headerlink" href="#evennia.contrib.barter.CmdDecline.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -651,11 +626,6 @@ determine if it’s worth your while.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdEvaluate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'eval', 'category': 'trading', 'key': 'evaluate', 'tags': '', 'text': "\n evaluate objects on offer\n\n Usage:\n evaluate <offered object>\n\n This allows you to examine any object currently on offer, to\n determine if it's worth your while.\n "}</em><a class="headerlink" href="#evennia.contrib.barter.CmdEvaluate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -680,7 +650,7 @@ try to influence the other part in the deal.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdStatus.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['offers', 'deal']</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['deal', 'offers']</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -704,11 +674,6 @@ try to influence the other part in the deal.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdStatus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'offers deal', 'category': 'trading', 'key': 'status', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}</em><a class="headerlink" href="#evennia.contrib.barter.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -753,11 +718,6 @@ finish trade [:say]</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdFinish.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'finish trade', 'category': 'trading', 'key': 'end trade', 'tags': '', 'text': '\n end the trade prematurely\n\n Usage:\n end trade [:say]\n finish trade [:say]\n\n This ends the trade prematurely. No trade will take place.\n\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdFinish.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -832,11 +792,6 @@ info to your choice.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.barter.CmdTrade.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'barter', 'category': 'general', 'key': 'trade', 'tags': '', 'text': '\n Initiate trade with another party\n\n Usage:\n trade <other party> [:say]\n trade <other party> accept [:say]\n trade <other party> decline [:say]\n\n Initiate trade with another party. The other party needs to repeat\n this command with trade accept/decline within a minute in order to\n properly initiate the trade action. You can use the decline option\n yourself if you want to retract an already suggested trade. The\n optional say part works like the say command and allows you to add\n info to your choice.\n '}</em><a class="headerlink" href="#evennia.contrib.barter.CmdTrade.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -250,11 +250,6 @@ overloading evential same-named class properties.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.building_menu.CmdNoInput.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': 'No input has been found.'}</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoInput.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -301,11 +296,6 @@ overloading evential same-named class properties.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.building_menu.CmdNoMatch.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': 'No input has been found.'}</em><a class="headerlink" href="#evennia.contrib.building_menu.CmdNoMatch.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -870,11 +860,6 @@ set in self.parse())</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.building_menu.GenericBuildingCmd.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '@edit', 'tags': '', 'text': "\n Generic building command.\n\n Syntax:\n @edit [object]\n\n Open a building menu to edit the specified object. This menu allows to\n change the object's key and description.\n\n Examples:\n @edit here\n @edit self\n @edit #142\n\n "}</em><a class="headerlink" href="#evennia.contrib.building_menu.GenericBuildingCmd.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ at them with this command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -106,11 +106,6 @@ that is checked by the @ic command directly.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n ooc look\n\n Usage:\n look\n look <character>\n\n This is an OOC version of the look command. Since an Account doesn\'t\n have an in-game existence, there is no concept of location or\n "self".\n\n If any characters are available for you to control, you may look\n at them with this command.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -156,11 +151,6 @@ attribute on ourselves to remember it.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.chargen.CmdOOCCharacterCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n creates a character\n\n Usage:\n create <character name>\n\n This will create a new character, assuming\n the given character name does not already exist.\n '}</em><a class="headerlink" href="#evennia.contrib.chargen.CmdOOCCharacterCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -358,11 +358,6 @@ provide will be displayed after the clothing’s name.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdWear.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'wear', 'tags': '', 'text': "\n Puts on an item of clothing you are holding.\n\n Usage:\n wear <obj> [wear style]\n\n Examples:\n wear shirt\n wear scarf wrapped loosely about the shoulders\n\n All the clothes you are wearing are appended to your description.\n If you provide a 'wear style' after the command, the message you\n provide will be displayed after the clothing's name.\n "}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdWear.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -403,11 +398,6 @@ off the covering item first.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdRemove.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'remove', 'tags': '', 'text': "\n Takes off an item of clothing.\n\n Usage:\n remove <obj>\n\n Removes an item of clothing you are wearing. You can't remove\n clothes that are covered up by something else - you must take\n off the covering item first.\n "}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdRemove.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -448,11 +438,6 @@ You can’t remove an item of clothing if it’s covered.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdCover.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'cover', 'tags': '', 'text': "\n Covers a worn item of clothing with another you're holding or wearing.\n\n Usage:\n cover <obj> [with] <obj>\n\n When you cover a clothing item, it is hidden and no longer appears in\n your description until it's uncovered or the item covering it is removed.\n You can't remove an item of clothing if it's covered.\n "}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdCover.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -494,11 +479,6 @@ it is also covered by something else.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdUncover.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'clothing', 'key': 'uncover', 'tags': '', 'text': "\n Reveals a worn item of clothing that's currently covered up.\n\n Usage:\n uncover <obj>\n\n When you uncover an item of clothing, you allow it to appear in your\n description without having to take off the garment that's currently\n covering it. You can't uncover an item of clothing if the item covering\n it is also covered by something else.\n "}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdUncover.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -548,11 +528,6 @@ location you are currently in.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdDrop.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'drop', 'tags': '', 'text': '\n drop something\n\n Usage:\n drop <obj>\n\n Lets you drop an object from your inventory into the\n location you are currently in.\n '}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdDrop.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -602,11 +577,6 @@ placing it in their inventory.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdGive.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'give', 'tags': '', 'text': '\n give away something to someone\n\n Usage:\n give <inventory obj> = <target>\n\n Gives an items from your inventory to another character,\n placing it in their inventory.\n '}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdGive.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -627,7 +597,7 @@ inv</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdInventory.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'inv']</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['inv', 'i']</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -656,11 +626,6 @@ inv</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.clothing.CmdInventory.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}</em><a class="headerlink" href="#evennia.contrib.clothing.CmdInventory.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -172,11 +172,6 @@ everyone but the person rolling.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.dice.CmdDice.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@dice roll', 'category': 'general', 'key': 'dice', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}</em><a class="headerlink" href="#evennia.contrib.dice.CmdDice.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['conn', 'co', 'con']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['con', 'conn', 'co']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -101,11 +101,6 @@ there is no object yet before the account has logged in)</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -125,7 +120,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -159,11 +154,6 @@ name enclosed in quotes:</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -180,7 +170,7 @@ version is a bit more complicated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['qu', 'q']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'qu']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -204,11 +194,6 @@ version is a bit more complicated.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'qu q', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n We maintain a different version of the `quit` command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedQuit.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -225,7 +210,7 @@ All it does is display the connect screen.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'look']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['look', 'l']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -249,11 +234,6 @@ All it does is display the connect screen.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n This is an unconnected version of the `look` command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -269,7 +249,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -293,11 +273,6 @@ for simplicity. It shows a pane of info.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.contrib.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -293,11 +293,6 @@ look <a href="#id1"><span class="problematic" id="id2">*</span></a><account&g
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -361,11 +356,6 @@ version of the <strong>desc</strong> command.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(desc) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDesc.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'describe', 'category': 'building', 'key': 'desc', 'tags': '', 'text': '\n `desc` - describe an object or room.\n\n Usage:\n desc[/switch] [<obj> =] <description>\n\n Switches for `desc`:\n spring - set description for <season> in current room.\n summer\n autumn\n winter\n\n Sets the "desc" attribute on an object. If an object is not given,\n describe the current room.\n\n You can also embed special time markers in your room description, like this:\n\n ```\n <night>In the darkness, the forest looks foreboding.</night>.\n ```\n\n Text marked this way will only display when the server is truly at the given\n timeslot. The available times are night, morning, afternoon and evening.\n\n Note that seasons and time-of-day slots only work on rooms in this\n version of the `desc` command.\n\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDesc.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -424,11 +414,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomDetail.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': '@detail', 'tags': '', 'text': '\n sets a detail on a room\n\n Usage:\n @detail[/del] <key> [= <description>]\n @detail <key>;<alias>;... = description\n\n Example:\n @detail\n @detail walls = The walls are covered in ...\n @detail castle;ruin;tower = The distant ruin ...\n @detail/del wall\n @detail/del castle;ruin;tower\n\n This command allows to show the current room details if you enter it\n without any argument. Otherwise, sets or deletes a detail on the current\n room, if this room supports details like an extended room. To add new\n detail, just use the @detail command, specifying the key, an equal sign\n and the description. You can assign the same description to several\n details using the alias syntax (replace key by alias1;alias2;alias3;...).\n To remove one or several details, use the @detail/del switch.\n\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomDetail.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -472,11 +457,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.extended_room.CmdExtendedRoomGameTime.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'time', 'tags': '', 'text': '\n Check the game time\n\n Usage:\n time\n\n Shows the current in-game time and season.\n '}</em><a class="headerlink" href="#evennia.contrib.extended_room.CmdExtendedRoomGameTime.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -363,11 +363,6 @@ send</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.fieldfill.CmdTestMenu.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'testmenu', 'tags': '', 'text': "\n This test command will initialize a menu that presents you with a form.\n You can fill out the fields of this form in any order, and then type in\n 'send' to send a message to another online player, which will reach them\n after a delay you specify.\n\n Usage:\n <field> = <new value>\n clear <field>\n help\n look\n quit\n send\n "}</em><a class="headerlink" href="#evennia.contrib.fieldfill.CmdTestMenu.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
|
|||
|
|
@ -109,11 +109,6 @@ default cmdset before it becomes available.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();call:all()'</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.gendersub.SetGender.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@sex', 'category': 'general', 'key': '@gender', 'tags': '', 'text': '\n Sets gender on yourself\n\n Usage:\n @gender male||female||neutral||ambiguous\n\n '}</em><a class="headerlink" href="#evennia.contrib.gendersub.SetGender.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -67,23 +67,7 @@ useful but are deemed too game-specific to go into the core library.</p>
|
|||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.slow_exit.html">evennia.contrib.slow_exit</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.talking_npc.html">evennia.contrib.talking_npc</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.test_traits.html">evennia.contrib.test_traits</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.traits.html">evennia.contrib.traits</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html#adding-traits-to-a-typeclass">Adding Traits to a typeclass</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html#using-traits">Using traits</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html#trait-types">Trait types</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html#static-trait">Static trait</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#counter">Counter</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#rate">.rate</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#percentage">.percentage()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#gauge">Gauge</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#trait">Trait</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html#expanding-with-your-own-traits">Expanding with your own Traits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.traits.html">evennia.contrib.traits</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.tree_select.html">evennia.contrib.tree_select</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.unixcommand.html">evennia.contrib.unixcommand</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.contrib.wilderness.html">evennia.contrib.wilderness</a></li>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.ingame_python.commands.CmdCallback.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@callback', '@calls', '@callbacks']</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@calls', '@callbacks', '@callback']</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -130,11 +130,6 @@ on user permission.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(developer)'</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.ingame_python.commands.CmdCallback.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@callback @calls @callbacks', 'category': 'building', 'key': '@call', 'tags': '', 'text': '\n Command to edit callbacks.\n '}</em><a class="headerlink" href="#evennia.contrib.ingame_python.commands.CmdCallback.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -217,11 +217,6 @@ the newly created mails.</p></li>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.mail.CmdMail.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'mail', 'category': 'general', 'key': '@mail', 'tags': '', 'text': '\n Communicate with others by sending mail.\n\n Usage:\n @mail - Displays all the mail an account has in their mailbox\n @mail <#> - Displays a specific message\n @mail <accounts>=<subject>/<message>\n - Sends a message to the comma separated list of accounts.\n @mail/delete <#> - Deletes a specific message\n @mail/forward <account list>=<#>[/<Message>]\n - Forwards an existing message to the specified list of accounts,\n original message is delivered with optional Message prepended.\n @mail/reply <#>=<message>\n - Replies to a message #. Prepends message to the original\n message text.\n Switches:\n delete - deletes a message\n forward - forward a received message to another object with an optional message attached.\n reply - Replies to a received message, appending the original message to the bottom.\n Examples:\n @mail 2\n @mail Griatch=New mail/Hey man, I am sending you a message!\n @mail/delete 6\n @mail/forward feend78 Griatch=4/You guys should read this.\n @mail/reply 9=Thanks for the info!\n\n '}</em><a class="headerlink" href="#evennia.contrib.mail.CmdMail.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -290,11 +285,6 @@ reply - Replies to a received message, appending the original message to the b
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.mail.CmdMailCharacter.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'mail', 'category': 'general', 'key': '@mail', 'tags': '', 'text': '\n Communicate with others by sending mail.\n\n Usage:\n @mail - Displays all the mail an account has in their mailbox\n @mail <#> - Displays a specific message\n @mail <accounts>=<subject>/<message>\n - Sends a message to the comma separated list of accounts.\n @mail/delete <#> - Deletes a specific message\n @mail/forward <account list>=<#>[/<Message>]\n - Forwards an existing message to the specified list of accounts,\n original message is delivered with optional Message prepended.\n @mail/reply <#>=<message>\n - Replies to a message #. Prepends message to the original\n message text.\n Switches:\n delete - deletes a message\n forward - forward a received message to another object with an optional message attached.\n reply - Replies to a received message, appending the original message to the bottom.\n Examples:\n @mail 2\n @mail Griatch=New mail/Hey man, I am sending you a message!\n @mail/delete 6\n @mail/forward feend78 Griatch=4/You guys should read this.\n @mail/reply 9=Thanks for the info!\n\n '}</em><a class="headerlink" href="#evennia.contrib.mail.CmdMailCharacter.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -232,11 +232,6 @@ how many times the map is iterated over.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.mapbuilder.CmdMapBuilder.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@buildmap', 'category': 'building', 'key': '@mapbuilder', 'tags': '', 'text': '\n Build a map from a 2D ASCII map.\n\n Usage:\n @mapbuilder[/switch] <path.to.file.MAPNAME> <path.to.file.MAP_LEGEND>\n\n Switches:\n one - execute build instructions once without automatic exit creation\n two - execute build instructions twice without automatic exit creation\n\n Example:\n @mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND\n @mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND\n @mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND\n (Legend path defaults to map path)\n\n This is a command which takes two inputs:\n A string of ASCII characters representing a map and a dictionary of\n functions containing build instructions. The characters of the map are\n iterated over and compared to a list of trigger characters. When a match\n is found the corresponding function is executed generating the rooms,\n exits and objects as defined by the users build instructions. If a\n character is not a match to a provided trigger character (including spaces)\n it is simply skipped and the process continues. By default exits are\n automatically generated but is turned off by switches which also determines\n how many times the map is iterated over.\n '}</em><a class="headerlink" href="#evennia.contrib.mapbuilder.CmdMapBuilder.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -141,11 +141,6 @@ to the menu’s own look command.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.menu_login.CmdUnloggedinLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': "\n An unloggedin version of the look command. This is called by the server\n when the account first connects. It sets up the menu before handing off\n to the menu's own look command.\n\n "}</em><a class="headerlink" href="#evennia.contrib.menu_login.CmdUnloggedinLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -115,11 +115,6 @@ description in use and <strong>db.multidesc</strong> to store all descriptions.<
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.multidescer.CmdMultiDesc.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'desc', 'category': 'general', 'key': '+desc', 'tags': '', 'text': '\n Manage multiple descriptions\n\n Usage:\n +desc [key] - show current desc desc with <key>\n +desc <key> = <text> - add/replace desc with <key>\n +desc/list - list descriptions (abbreviated)\n +desc/list/full - list descriptions (full texts)\n +desc/edit <key> - add/edit desc <key> in line editor\n +desc/del <key> - delete desc <key>\n +desc/swap <key1>-<key2> - swap positions of <key1> and <key2> in list\n +desc/set <key> [+key+...] - set desc as default or combine multiple descs\n\n Notes:\n When combining multiple descs with +desc/set <key> + <key2> + ...,\n any keys not matching an actual description will be inserted\n as plain text. Use e.g. ansi line break ||/ to add a new\n paragraph and + + or ansi space ||_ to add extra whitespace.\n\n '}</em><a class="headerlink" href="#evennia.contrib.multidescer.CmdMultiDesc.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -205,11 +205,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(puzzle) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.puzzles.CmdCreatePuzzleRecipe.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@puzzlerecipe', 'category': 'puzzles', 'key': '@puzzle', 'tags': '', 'text': "\n Creates a puzzle recipe. A puzzle consists of puzzle-parts that\n the player can 'use' together to create a specified result.\n\n Usage:\n @puzzle name,<part1[,part2,...>] = <result1[,result2,...]>\n\n Example:\n create/drop balloon\n create/drop glass of water\n create/drop water balloon\n @puzzle waterballon,balloon,glass of water = water balloon\n @del ballon, glass of water, water balloon\n @armpuzzle #1\n\n Notes:\n Each part and result are objects that must (temporarily) exist and be placed in their\n corresponding location in order to create the puzzle. After the creation of the puzzle,\n these objects are not needed anymore and can be deleted. Components of the puzzle\n will be re-created by use of the `@armpuzzle` command later.\n\n "}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdCreatePuzzleRecipe.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -273,11 +268,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(puzzleedit) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.puzzles.CmdEditPuzzle.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '@puzzleedit', 'tags': '', 'text': "\n Edits puzzle properties\n\n Usage:\n @puzzleedit[/delete] <#dbref>\n @puzzleedit <#dbref>/use_success_message = <Custom message>\n @puzzleedit <#dbref>/use_success_location_message = <Custom message from {caller} producing {result_names}>\n @puzzleedit <#dbref>/mask = attr1[,attr2,...]>\n @puzzleedit[/addpart] <#dbref> = <obj[,obj2,...]>\n @puzzleedit[/delpart] <#dbref> = <obj[,obj2,...]>\n @puzzleedit[/addresult] <#dbref> = <obj[,obj2,...]>\n @puzzleedit[/delresult] <#dbref> = <obj[,obj2,...]>\n\n Switches:\n addpart - adds parts to the puzzle\n delpart - removes parts from the puzzle\n addresult - adds results to the puzzle\n delresult - removes results from the puzzle\n delete - deletes the recipe. Existing parts and results aren't modified\n\n mask - attributes to exclude during matching (e.g. location, desc, etc.)\n use_success_location_message containing {result_names} and {caller} will\n automatically be replaced with correct values. Both are optional.\n\n When removing parts/results, it's possible to remove all.\n\n "}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdEditPuzzle.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -325,11 +315,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(armpuzzle) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.puzzles.CmdArmPuzzle.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '@armpuzzle', 'tags': '', 'text': '\n Arms a puzzle by spawning all its parts.\n\n Usage:\n @armpuzzle <puzzle #dbref>\n\n Notes:\n Create puzzles with `@puzzle`; get list of\n defined puzzles using `@lspuzzlerecipes`.\n\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdArmPuzzle.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -378,11 +363,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:pperm(use) or pperm(Player)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.puzzles.CmdUsePuzzleParts.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'combine', 'category': 'puzzles', 'key': 'use', 'tags': '', 'text': '\n Use an object, or a group of objects at once.\n\n\n Example:\n You look around you and see a pole, a long string, and a needle.\n\n use pole, long string, needle\n\n Genius! You built a fishing pole.\n\n\n Usage:\n use <obj1> [,obj2,...]\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdUsePuzzleParts.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -427,11 +407,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(lspuzzlerecipes) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.puzzles.CmdListPuzzleRecipes.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '@lspuzzlerecipes', 'tags': '', 'text': '\n Searches for all puzzle recipes\n\n Usage:\n @lspuzzlerecipes\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListPuzzleRecipes.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -476,11 +451,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(lsarmedpuzzles) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.puzzles.CmdListArmedPuzzles.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'puzzles', 'key': '@lsarmedpuzzles', 'tags': '', 'text': '\n Searches for all armed puzzles\n\n Usage:\n @lsarmedpuzzles\n '}</em><a class="headerlink" href="#evennia.contrib.puzzles.CmdListArmedPuzzles.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -265,10 +265,7 @@ langname can be None.</p>
|
|||
</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><a class="reference internal" href="#evennia.contrib.rpsystem.LanguageError" title="evennia.contrib.rpsystem.LanguageError"><strong>evennia.contrib.rpsystem.LanguageError</strong></a> – If an invalid language was</p></li>
|
||||
<li><p><strong>specified.</strong> – </p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><a class="reference internal" href="evennia.contrib.rplanguage.html#evennia.contrib.rplanguage.LanguageError" title="evennia.contrib.rplanguage.LanguageError"><strong>rplanguage.LanguageError</strong></a> – If an invalid language was specified.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
|
|
@ -553,11 +550,6 @@ mechanism. This is useful for adding masks/hoods etc.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.RPCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': 'simple parent'}</em><a class="headerlink" href="#evennia.contrib.rpsystem.RPCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -611,11 +603,6 @@ a different language.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdEmote.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':', 'category': 'general', 'key': 'emote', 'tags': '', 'text': '\n Emote an action, allowing dynamic replacement of\n text in the emote.\n\n Usage:\n emote text\n\n Example:\n emote /me looks around.\n emote With a flurry /me attacks /tall man with his sword.\n emote "Hello", /me says.\n\n Describes an event in the world. This allows the use of /ref\n markers to replace with the short descriptions or recognized\n strings of objects in the same room. These will be translated to\n emotes to match each person seeing it. Use "..." for saying\n things and langcode"..." without spaces to say something in\n a different language.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdEmote.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -635,7 +622,7 @@ a different language.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdSay.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['"', "'"]</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ["'", '"']</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -659,11 +646,6 @@ a different language.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdSay.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSay.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -707,11 +689,6 @@ a different language.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdSdesc.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'sdesc', 'tags': '', 'text': '\n Assign yourself a short description (sdesc).\n\n Usage:\n sdesc <short description>\n\n Assigns a short description to yourself.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdSdesc.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -770,11 +747,6 @@ sdesc in the emote, regardless of who is seeing it.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdPose.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'pose', 'tags': '', 'text': "\n Set a static pose\n\n Usage:\n pose <pose>\n pose default <pose>\n pose reset\n pose obj = <pose>\n pose default obj = <pose>\n pose reset obj =\n\n Examples:\n pose leans against the tree\n pose is talking to the barkeep.\n pose box = is sitting on the floor.\n\n Set a static pose. This is the end of a full sentence that starts\n with your sdesc. If no full stop is given, it will be added\n automatically. The default pose is the pose you get when using\n pose reset. Note that you can use sdescs/recogs to reference\n people in your pose, but these always appear as that person's\n sdesc in the emote, regardless of who is seeing it.\n\n "}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdPose.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -825,11 +797,6 @@ Using the command without arguments will list all current recogs.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdRecog.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'recognize forget', 'category': 'general', 'key': 'recog', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -874,11 +841,6 @@ set in self.parse())</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpsystem.CmdMask.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'unmask', 'category': 'general', 'key': 'mask', 'tags': '', 'text': "\n Wear a mask\n\n Usage:\n mask <new sdesc>\n unmask\n\n This will put on a mask to hide your identity. When wearing\n a mask, your sdesc will be replaced by the sdesc you pick and\n people's recognitions of you will be disabled.\n\n "}</em><a class="headerlink" href="#evennia.contrib.rpsystem.CmdMask.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -179,11 +179,6 @@ unique.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(open) or perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.simpledoor.CmdOpen.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'building', 'key': 'open', 'tags': '', 'text': '\n open a new exit from the current room\n\n Usage:\n open <new exit>[;alias;alias..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = <destination>\n\n Handles the creation of exits. If a destination is given, the exit\n will point there. The <return exit> argument sets up an exit at the\n destination leading back to the current room. Destination name\n can be given both as a #dbref and a name, if that name is globally\n unique.\n\n '}</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpen.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -227,11 +222,6 @@ close <door></p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.simpledoor.CmdOpenCloseDoor.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'close', 'category': 'general', 'key': 'open', 'tags': '', 'text': '\n Open and close a door\n\n Usage:\n open <door>\n close <door>\n\n '}</em><a class="headerlink" href="#evennia.contrib.simpledoor.CmdOpenCloseDoor.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -133,11 +133,6 @@ is assumed.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.slow_exit.CmdSetSpeed.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'setspeed', 'tags': '', 'text': "\n set your movement speed\n\n Usage:\n setspeed stroll|walk|run|sprint\n\n This will set your movement speed, determining how long time\n it takes to traverse exits. If no speed is set, 'walk' speed\n is assumed.\n "}</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdSetSpeed.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -177,11 +172,6 @@ stored deferred from the exit traversal above.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.slow_exit.CmdStop.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'stop', 'tags': '', 'text': '\n stop moving\n\n Usage:\n stop\n\n Stops the current movement, if any.\n '}</em><a class="headerlink" href="#evennia.contrib.slow_exit.CmdStop.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -120,11 +120,6 @@ that NPC and give you options on what to talk about.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.talking_npc.CmdTalk.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'talk', 'tags': '', 'text': '\n Talks to an npc\n\n Usage:\n talk\n\n This command is only available if a talkative non-player-character\n (NPC) is actually present. It will strike up a conversation with\n that NPC and give you options on what to talk about.\n '}</em><a class="headerlink" href="#evennia.contrib.talking_npc.CmdTalk.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -36,406 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.contrib.test_traits">
|
||||
<span id="evennia-contrib-test-traits"></span><h1>evennia.contrib.test_traits<a class="headerlink" href="#module-evennia.contrib.test_traits" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Unit test module for Trait classes.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TraitHandlerTest</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<p>Testing for TraitHandler</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_add_trait">
|
||||
<code class="sig-name descname">test_add_trait</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_add_trait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_add_trait" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_cache">
|
||||
<code class="sig-name descname">test_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_cache" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Cache should not be set until first get</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_setting">
|
||||
<code class="sig-name descname">test_setting</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_setting"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_setting" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Don’t allow setting stuff on traithandler</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_getting">
|
||||
<code class="sig-name descname">test_getting</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_getting"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_getting" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test we are getting data from the dbstore</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_all">
|
||||
<code class="sig-name descname">test_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test all method</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_remove">
|
||||
<code class="sig-name descname">test_remove</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_remove" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test remove method</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_clear">
|
||||
<code class="sig-name descname">test_clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_clear" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test clear method</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TraitHandlerTest.test_trait_db_connection">
|
||||
<code class="sig-name descname">test_trait_db_connection</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TraitHandlerTest.test_trait_db_connection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TraitHandlerTest.test_trait_db_connection" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test that updating a trait property actually updates value in db</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTrait</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<p>Test the base Trait class</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait.test_init">
|
||||
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_init" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait.test_validate_input__valid">
|
||||
<code class="sig-name descname">test_validate_input__valid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_validate_input__valid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_validate_input__valid" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test valid validation input</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait.test_validate_input__fail">
|
||||
<code class="sig-name descname">test_validate_input__fail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_validate_input__fail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_validate_input__fail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test failing validation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait.test_trait_getset">
|
||||
<code class="sig-name descname">test_trait_getset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_trait_getset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_trait_getset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get-set-del operations on trait</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTrait.test_repr">
|
||||
<code class="sig-name descname">test_repr</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTrait.test_repr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTrait.test_repr" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitStatic">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitStatic</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<p>Test for static Traits</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitStatic.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitStatic.test_init">
|
||||
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.test_init" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitStatic.test_value">
|
||||
<code class="sig-name descname">test_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.test_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.test_value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>value is base + mod</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitStatic.test_delete">
|
||||
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitStatic.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitStatic.test_delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Deleting resets to default.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitCounter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<p>Test for counter- Traits</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_init">
|
||||
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_init" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_value">
|
||||
<code class="sig-name descname">test_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>value is current + mod, where current defaults to base</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__minmax">
|
||||
<code class="sig-name descname">test_boundaries__minmax</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__minmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__minmax" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test range</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__bigmod">
|
||||
<code class="sig-name descname">test_boundaries__bigmod</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__bigmod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__bigmod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>add a big mod</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__change_boundaries">
|
||||
<code class="sig-name descname">test_boundaries__change_boundaries</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__change_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__change_boundaries" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Change boundaries after base/mod change</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__disable">
|
||||
<code class="sig-name descname">test_boundaries__disable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__disable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__disable" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Disable and re-enable boundaries</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_boundaries__inverse">
|
||||
<code class="sig-name descname">test_boundaries__inverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_boundaries__inverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_boundaries__inverse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set inverse boundaries - limited by base</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_current">
|
||||
<code class="sig-name descname">test_current</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_current"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_current" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Modifying current value</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_delete">
|
||||
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Deleting resets to default.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_percentage">
|
||||
<code class="sig-name descname">test_percentage</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_percentage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_percentage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test percentage calculation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounter.test_descs">
|
||||
<code class="sig-name descname">test_descs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounter.test_descs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounter.test_descs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test descriptions</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitCounterTimed</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<p>Test for trait with timer component</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_rate">
|
||||
<code class="sig-name descname">test_timer_rate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mock_time</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed.test_timer_rate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_rate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test time stepping</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_ratetarget">
|
||||
<code class="sig-name descname">test_timer_ratetarget</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mock_time</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitCounterTimed.test_timer_ratetarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitCounterTimed.test_timer_ratetarget" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test ratetarget</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitGauge</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_init">
|
||||
<code class="sig-name descname">test_init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_init" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_value">
|
||||
<code class="sig-name descname">test_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>value is current, where current defaults to base + mod</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__minmax">
|
||||
<code class="sig-name descname">test_boundaries__minmax</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__minmax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__minmax" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test range</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__bigmod">
|
||||
<code class="sig-name descname">test_boundaries__bigmod</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__bigmod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__bigmod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>add a big mod</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__change_boundaries">
|
||||
<code class="sig-name descname">test_boundaries__change_boundaries</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__change_boundaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__change_boundaries" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Change boundaries after current change</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__disable">
|
||||
<code class="sig-name descname">test_boundaries__disable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__disable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__disable" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Disable and re-enable boundary</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_boundaries__inverse">
|
||||
<code class="sig-name descname">test_boundaries__inverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_boundaries__inverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_boundaries__inverse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Try to set reversed boundaries</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_current">
|
||||
<code class="sig-name descname">test_current</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_current"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_current" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Modifying current value</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_delete">
|
||||
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Deleting resets to default.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_percentage">
|
||||
<code class="sig-name descname">test_percentage</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_percentage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_percentage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test percentage calculation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGauge.test_descs">
|
||||
<code class="sig-name descname">test_descs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGauge.test_descs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGauge.test_descs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test descriptions</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestTraitGaugeTimed</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.test_traits._TraitHandlerBase</span></code></p>
|
||||
<p>Test for trait with timer component</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_rate">
|
||||
<code class="sig-name descname">test_timer_rate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mock_time</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed.test_timer_rate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_rate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Test time stepping</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_ratetarget">
|
||||
<code class="sig-name descname">test_timer_ratetarget</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mock_time</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestTraitGaugeTimed.test_timer_ratetarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestTraitGaugeTimed.test_timer_ratetarget" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test ratetarget</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.test_traits.</code><code class="sig-name descname">TestNumericTraitOperators</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.test.testcases.TestCase</span></code></p>
|
||||
<p>Test case for numeric magic method implementations.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.setUp">
|
||||
<code class="sig-name descname">setUp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.tearDown">
|
||||
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.tearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_pos_shortcut">
|
||||
<code class="sig-name descname">test_pos_shortcut</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_pos_shortcut"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_pos_shortcut" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>overridden unary + operator returns <strong>value</strong> property</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_add_traits">
|
||||
<code class="sig-name descname">test_add_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_add_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_add_traits" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test addition of <strong>Trait</strong> objects</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_sub_traits">
|
||||
<code class="sig-name descname">test_sub_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_sub_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_sub_traits" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test subtraction of <strong>Trait</strong> objects</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_mul_traits">
|
||||
<code class="sig-name descname">test_mul_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_mul_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_mul_traits" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test multiplication of <strong>Trait</strong> objects</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_floordiv">
|
||||
<code class="sig-name descname">test_floordiv</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_floordiv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_floordiv" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test floor division of <strong>Trait</strong> objects</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_traits">
|
||||
<code class="sig-name descname">test_comparisons_traits</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_comparisons_traits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_traits" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>test equality comparison between <strong>Trait</strong> objects</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_numeric">
|
||||
<code class="sig-name descname">test_comparisons_numeric</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/test_traits.html#TestNumericTraitOperators.test_comparisons_numeric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.test_traits.TestNumericTraitOperators.test_comparisons_numeric" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>equality comparisons between <strong>Trait</strong> and numeric</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-contrib-test-traits">
|
||||
<h1>evennia.contrib.test_traits<a class="headerlink" href="#evennia-contrib-test-traits" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,807 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.contrib.traits">
|
||||
<span id="evennia-contrib-traits"></span><h1>evennia.contrib.traits<a class="headerlink" href="#module-evennia.contrib.traits" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Traits</p>
|
||||
<p>Whitenoise 2014, Ainneve contributors,
|
||||
Griatch 2020</p>
|
||||
<p>A <strong>Trait</strong> represents a modifiable property on (usually) a Character. They can
|
||||
be used to represent everything from attributes (str, agi etc) to skills
|
||||
(hunting 10, swords 14 etc) and dynamically changing things like HP, XP etc.</p>
|
||||
<p>Traits use Evennia Attributes under the hood, making them persistent (they survive
|
||||
a server reload/reboot).</p>
|
||||
<div class="section" id="adding-traits-to-a-typeclass">
|
||||
<h2>Adding Traits to a typeclass<a class="headerlink" href="#adding-traits-to-a-typeclass" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To access and manipulate traits on an object, its Typeclass needs to have a
|
||||
<strong>TraitHandler</strong> assigned it. Usually, the handler is made available as <strong>.traits</strong>
|
||||
(in the same way as <strong>.tags</strong> or <strong>.attributes</strong>).</p>
|
||||
<p>Here’s an example for adding the TraitHandler to the base Object class:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># mygame/typeclasses/objects.py</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia</span> <span class="k">import</span> <span class="n">DefaultObject</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="k">import</span> <span class="n">lazy_property</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.contrib.traits</span> <span class="k">import</span> <span class="n">TraitHandler</span>
|
||||
|
||||
<span class="c1"># ...</span>
|
||||
|
||||
<span class="k">class</span> <span class="nc">Object</span><span class="p">(</span><span class="n">DefaultObject</span><span class="p">):</span>
|
||||
<span class="o">...</span>
|
||||
<span class="nd">@lazy_property</span>
|
||||
<span class="k">def</span> <span class="nf">traits</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="c1"># this adds the handler as .traits</span>
|
||||
<span class="k">return</span> <span class="n">TraitHandler</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
<p>After a reload you can now try adding some example traits:</p>
|
||||
</div>
|
||||
<div class="section" id="using-traits">
|
||||
<h2>Using traits<a class="headerlink" href="#using-traits" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A trait is added to the traithandler, after which one can access it
|
||||
as a property on the handler (similarly to how you can do .db.attrname for Attributes
|
||||
in Evennia).</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># this is an example using the "static" trait, described below</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"hunting"</span><span class="p">,</span> <span class="s2">"Hunting Skill"</span><span class="p">,</span> <span class="n">trait_type</span><span class="o">=</span><span class="s2">"static"</span><span class="p">,</span> <span class="n">base</span><span class="o">=</span><span class="mi">4</span><span class="p">)</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">4</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span> <span class="o">+=</span> <span class="mi">5</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">9</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"hp"</span><span class="p">,</span> <span class="s2">"Health"</span><span class="p">,</span> <span class="n">trait_type</span><span class="o">=</span><span class="s2">"gauge"</span><span class="p">,</span> <span class="nb">min</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="nb">max</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">100</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span> <span class="o">-=</span> <span class="mi">200</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">0</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">100</span>
|
||||
<span class="c1"># you can also access property with getitem</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="p">[</span><span class="s2">"value"</span><span class="p">]</span>
|
||||
<span class="mi">100</span>
|
||||
<span class="c1"># you can store arbitrary data persistently as well</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">effect</span> <span class="o">=</span> <span class="s2">"poisoned!"</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">effect</span>
|
||||
<span class="s2">"poisoned!"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>When adding the trait, you supply the name of the property (<strong>hunting</strong>) along
|
||||
with a more human-friendly name (“Hunting Skill”). The latter will show if you
|
||||
print the trait etc. The <strong>trait_type</strong> is important, this specifies which type
|
||||
of trait this is.</p>
|
||||
</div>
|
||||
<div class="section" id="trait-types">
|
||||
<h2>Trait types<a class="headerlink" href="#trait-types" title="Permalink to this headline">¶</a></h2>
|
||||
<p>All default traits have a read-only <strong>.value</strong> property that shows the relevant or
|
||||
‘current’ value of the trait. Exactly what this means depends on the type of trait.</p>
|
||||
<p>Traits can also be combined to do arithmetic with their .value, if both have a
|
||||
compatible type.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">trait1</span> <span class="o">+</span> <span class="n">trait2</span>
|
||||
<span class="go">54</span>
|
||||
<span class="gp">>>> </span><span class="n">trait1</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">3</span>
|
||||
<span class="gp">>>> </span><span class="n">trait1</span> <span class="o">+</span> <span class="mi">2</span>
|
||||
<span class="gp">>>> </span><span class="n">trait1</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">5</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Two numerical traits can also be compared (bigger-than etc), which is useful in
|
||||
all sorts of rule-resolution.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="n">trait1</span> <span class="o">></span> <span class="n">trait2</span><span class="p">:</span>
|
||||
<span class="c1"># do stuff</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="static-trait">
|
||||
<h2>Static trait<a class="headerlink" href="#static-trait" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>value = base + mod</strong></p>
|
||||
<p>The static trait has a <strong>base</strong> value and an optional <strong>mod</strong>-ifier. A typical use
|
||||
of a static trait would be a Strength stat or Skill value. That is, something
|
||||
that varies slowly or not at all, and which may be modified in-place.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"str"</span><span class="p">,</span> <span class="s2">"Strength"</span><span class="p">,</span> <span class="n">trait_type</span><span class="o">=</span><span class="s2">"static"</span><span class="p">,</span> <span class="n">base</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">mod</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">12 # base + mod</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">base</span> <span class="o">+=</span> <span class="mi">2</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">mod</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">15</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">mod</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">12</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="counter">
|
||||
<h3>Counter<a class="headerlink" href="#counter" title="Permalink to this headline">¶</a></h3>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>min/unset base base+mod max/unset</dt><dd><dl class="simple">
|
||||
<dt><a href="#id1"><span class="problematic" id="id2">|--------------|</span></a>——–<a href="#id3"><span class="problematic" id="id4">|---------X--------X------------|</span></a></dt><dd><dl class="simple">
|
||||
<dt>current value</dt><dd><p>= current
|
||||
+ mod</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<p>A counter describes a value that can move from a base. The <strong>current</strong> property
|
||||
is the thing usually modified. It starts at the <strong>base</strong>. One can also add a modifier,
|
||||
which will both be added to the base and to current (forming .value).
|
||||
The min/max of the range are optional, a boundary set to None will remove it.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"hunting"</span><span class="p">,</span> <span class="s2">"Hunting Skill"</span><span class="p">,</span> <span class="n">trait_type</span><span class="o">=</span><span class="s2">"counter"</span><span class="p">,</span>
|
||||
<span class="go"> base=10, mod=1, min=0, max=100)</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">11 # current starts at base + mod</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span> <span class="o">+=</span> <span class="mi">10</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">21</span>
|
||||
<span class="go"># reset back to base+mod by deleting current</span>
|
||||
<span class="gp">>>> </span><span class="k">del</span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">11</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">max</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># removing upper bound</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Counters have some extra properties:</p>
|
||||
<p><strong>descs</strong> is a dict {upper_bound:text_description}. This allows for easily
|
||||
storing a more human-friendly description of the current value in the
|
||||
interval. Here is an example for skill values between 0 and 10:</p>
|
||||
<blockquote>
|
||||
<div><p>{0: “unskilled”, 1: “neophyte”, 5: “trained”, 7: “expert”, 9: “master”}</p>
|
||||
</div></blockquote>
|
||||
<p>The keys must be supplied from smallest to largest. Any values below the lowest and above the
|
||||
highest description will be considered to be included in the closest description slot.
|
||||
By calling <strong>.desc()</strong> on the Counter, will you get the text matching the current <strong>value</strong>
|
||||
value.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># (could also have passed descs= to traits.add())</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">descs</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="mi">0</span><span class="p">:</span> <span class="s2">"unskilled"</span><span class="p">,</span> <span class="mi">10</span><span class="p">:</span> <span class="s2">"neophyte"</span><span class="p">,</span> <span class="mi">50</span><span class="p">:</span> <span class="s2">"trained"</span><span class="p">,</span> <span class="mi">70</span><span class="p">:</span> <span class="s2">"expert"</span><span class="p">,</span> <span class="mi">90</span><span class="p">:</span> <span class="s2">"master"</span><span class="p">}</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">11</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">desc</span><span class="p">()</span>
|
||||
<span class="s2">"neophyte"</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span> <span class="o">+=</span> <span class="mi">60</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="mi">71</span>
|
||||
<span class="o">>>></span> <span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">desc</span><span class="p">()</span>
|
||||
<span class="s2">"expert"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="rate">
|
||||
<h4>.rate<a class="headerlink" href="#rate" title="Permalink to this headline">¶</a></h4>
|
||||
<p>The <strong>rate</strong> property defaults to 0. If set to a value different from 0, it
|
||||
allows the trait to change value dynamically. This could be used for example
|
||||
for an attribute that was temporarily lowered but will gradually (or abruptly)
|
||||
recover after a certain time. The rate is given as change of the <strong>current</strong>
|
||||
per-second, and the .value will still be restrained by min/max boundaries, if
|
||||
those are set.</p>
|
||||
<p>It is also possible to set a “.ratetarget”, for the auto-change to stop at
|
||||
(rather than at the min/max boundaries). This allows the value to return to
|
||||
a previous value.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">71</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">ratetarget</span> <span class="o">=</span> <span class="mi">71</span>
|
||||
<span class="go"># debuff hunting for some reason</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">current</span> <span class="o">-=</span> <span class="mi">30</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">41</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">1</span> <span class="c1"># 1/s increase</span>
|
||||
<span class="go"># Waiting 5s</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">46</span>
|
||||
<span class="go"># Waiting 8s</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">54</span>
|
||||
<span class="go"># Waiting 100s</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">71 # we have stopped at the ratetarget</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">rate</span> <span class="o">=</span> <span class="mi">0</span> <span class="c1"># disable auto-change</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that if rate is a non-integer, the resulting .value (at least until it
|
||||
reaches the boundary) will likely also come out a float. If you expect an
|
||||
integer, you must run run int() on the result yourself.</p>
|
||||
</div>
|
||||
<div class="section" id="percentage">
|
||||
<h4>.percentage()<a class="headerlink" href="#percentage" title="Permalink to this headline">¶</a></h4>
|
||||
<p>If both min and max are defined, the <strong>.percentage()</strong> method of the trait will
|
||||
return the value as a percentage.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hunting</span><span class="o">.</span><span class="n">percentage</span><span class="p">()</span>
|
||||
<span class="go">"71.0%"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="gauge">
|
||||
<h3>Gauge<a class="headerlink" href="#gauge" title="Permalink to this headline">¶</a></h3>
|
||||
<p>This emulates a [fuel-] gauge that empties from a base+mod value.</p>
|
||||
<blockquote>
|
||||
<div><dl>
|
||||
<dt>min/0 max=base+mod</dt><dd><dl>
|
||||
<dt><a href="#id5"><span class="problematic" id="id6">|-----------------------X---------------------------|</span></a></dt><dd><blockquote>
|
||||
<div><p>value</p>
|
||||
</div></blockquote>
|
||||
<p>= current</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<p>The ‘current’ value will start from a full gauge. The .max property is
|
||||
read-only and is set by .base + .mod. So contrary to a Counter, the modifier
|
||||
only applies to the max value of the gauge and not the current value. The
|
||||
minimum bound defaults to 0. This trait is useful for showing resources that
|
||||
can deplete, like health, stamina and the like.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"hp"</span><span class="p">,</span> <span class="s2">"Health"</span><span class="p">,</span> <span class="n">trait_type</span><span class="o">=</span><span class="s2">"gauge"</span><span class="p">,</span> <span class="n">base</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span> <span class="c1"># (or .current)</span>
|
||||
<span class="go">100</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">mod</span> <span class="o">=</span> <span class="mi">10</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">110</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">current</span> <span class="o">-=</span> <span class="mi">30</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">80</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Same as Counters, Gauges can also have <strong>descs</strong> to describe the interval and can also
|
||||
have <strong>rate</strong> and <strong>ratetarget</strong> to auto-update the value. The rate is particularly useful
|
||||
for gauges, for everything from poison slowly draining your health, to resting gradually
|
||||
increasing it. You can also use the <strong>.percentage()</strong> function to show the current value
|
||||
as a percentage.</p>
|
||||
</div>
|
||||
<div class="section" id="trait">
|
||||
<h3>Trait<a class="headerlink" href="#trait" title="Permalink to this headline">¶</a></h3>
|
||||
<p>A single value of any type.</p>
|
||||
<p>This is the ‘base’ Trait, meant to inherit from if you want to make your own
|
||||
trait-types (see below). Its .value can be anything (that can be stored in an Attribute)
|
||||
and if it’s a integer/float you can do arithmetic with it, but otherwise it
|
||||
acts just like a glorified Attribute.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"mytrait"</span><span class="p">,</span> <span class="s2">"My Trait"</span><span class="p">,</span> <span class="n">trait_type</span><span class="o">=</span><span class="s2">"trait"</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="mi">30</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">30</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="s2">"stringvalue"</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mytrait</span><span class="o">.</span><span class="n">value</span>
|
||||
<span class="go">"stringvalue"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="expanding-with-your-own-traits">
|
||||
<h2>Expanding with your own Traits<a class="headerlink" href="#expanding-with-your-own-traits" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A Trait is a class inhering from <strong>evennia.contrib.traits.Trait</strong> (or
|
||||
from one of the existing Trait classes).</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a file, say, 'mygame/world/traits.py'</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.contrib.traits</span> <span class="k">import</span> <span class="n">Trait</span>
|
||||
|
||||
<span class="k">class</span> <span class="nc">RageTrait</span><span class="p">(</span><span class="n">Trait</span><span class="p">):</span>
|
||||
|
||||
<span class="n">trait_type</span> <span class="o">=</span> <span class="s2">"rage"</span>
|
||||
<span class="n">default_keys</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s2">"rage"</span><span class="p">:</span> <span class="mi">0</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Above is an example custom-trait-class “rage” that stores a property “rage” on
|
||||
itself, with a default value of 0. This has all the
|
||||
functionality of a Trait - for example, if you do del on the <strong>rage</strong> property, it will be
|
||||
set back to its default (0). If you wanted to customize what it does, you
|
||||
just add <strong>rage</strong> property get/setters/deleters on the class.</p>
|
||||
<p>To add your custom RageTrait to Evennia, add the following to your settings file
|
||||
(assuming your class is in mygame/world/traits.py):</p>
|
||||
<blockquote>
|
||||
<div><p>TRAIT_CLASS_PATHS = [“world.traits.RageTrait”]</p>
|
||||
</div></blockquote>
|
||||
<p>Reload the server and you should now be able to use your trait:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s2">"mood"</span><span class="p">,</span> <span class="s2">"A dark mood"</span><span class="p">,</span> <span class="n">rage</span><span class="o">=</span><span class="mi">30</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">obj</span><span class="o">.</span><span class="n">traits</span><span class="o">.</span><span class="n">mood</span><span class="o">.</span><span class="n">rage</span>
|
||||
<span class="go">30</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<hr class="docutils" />
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.traits.TraitException">
|
||||
<em class="property">exception </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">TraitException</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">msg</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitException" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">RuntimeError</span></code></p>
|
||||
<p>Base exception class raised by <strong>Trait</strong> objects.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>msg</strong> (<em>str</em>) – informative error message</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitException.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">msg</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitException.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitException.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.traits.MandatoryTraitKey">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">MandatoryTraitKey</code><a class="reference internal" href="../_modules/evennia/contrib/traits.html#MandatoryTraitKey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.MandatoryTraitKey" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>This represents a required key that must be
|
||||
supplied when a Trait is initialized. It’s used
|
||||
by Trait classes when defining their required keys.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.traits.TraitHandler">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">TraitHandler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">db_attribute_key</span><span class="o">=</span><span class="default_value">'traits'</span></em>, <em class="sig-param"><span class="n">db_attribute_category</span><span class="o">=</span><span class="default_value">'traits'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>Factory class that instantiates Trait objects.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitHandler.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">db_attribute_key</span><span class="o">=</span><span class="default_value">'traits'</span></em>, <em class="sig-param"><span class="n">db_attribute_category</span><span class="o">=</span><span class="default_value">'traits'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize the handler and set up its internal Attribute-based storage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>obj</strong> (<em>Object</em>) – Parent Object typeclass for this TraitHandler</p></li>
|
||||
<li><p><strong>db_attribute_key</strong> (<em>str</em>) – Name of the DB attribute for trait data storage</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitHandler.all">
|
||||
<em class="property">property </em><code class="sig-name descname">all</code><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get all trait keys in this handler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>list</em> – All Trait keys.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitHandler.get">
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.get" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>trait_key</strong> (<em>str</em>) – key from the traits dict containing config data.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>(<strong>Trait</strong> or <strong>None</strong>) – named Trait class or None if trait key
|
||||
is not found in traits collection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitHandler.add">
|
||||
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_key</span></em>, <em class="sig-param"><span class="n">name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">trait_type</span><span class="o">=</span><span class="default_value">'static'</span></em>, <em class="sig-param"><span class="n">force</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">trait_properties</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.add" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Create a new Trait and add it to the handler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>trait_key</strong> (<em>str</em>) – This is the name of the property that will be made
|
||||
available on this handler (example ‘hp’).</p></li>
|
||||
<li><p><strong>name</strong> (<em>str</em><em>, </em><em>optional</em>) – Name of the Trait, like “Health”. If
|
||||
not given, will use <strong>trait_key</strong> starting with a capital letter.</p></li>
|
||||
<li><p><strong>trait_type</strong> (<em>str</em><em>, </em><em>optional</em>) – One of ‘static’, ‘counter’ or ‘gauge’.</p></li>
|
||||
<li><p><strong>force_add</strong> (<em>bool</em>) – If set, create a new Trait even if a Trait with
|
||||
the same <strong>trait_key</strong> already exists.</p></li>
|
||||
<li><p><strong>trait_properties</strong> (<em>dict</em>) – These will all be use to initialize
|
||||
the new trait. See the <strong>properties</strong> class variable on each
|
||||
Trait class to see which are required.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.traits.TraitException" title="evennia.contrib.traits.TraitException"><strong>TraitException</strong></a> – If specifying invalid values for the given Trait,
|
||||
the <strong>trait_type</strong> is not recognized, or an existing trait
|
||||
already exists (and <strong>force</strong> is unset).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitHandler.remove">
|
||||
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.remove" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove a Trait from the handler’s parent object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>trait_key</strong> (<em>str</em>) – The name of the trait to remove.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.TraitHandler.clear">
|
||||
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#TraitHandler.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.TraitHandler.clear" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove all Traits from the handler’s parent object.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.traits.Trait">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">Trait</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#Trait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.Trait" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>Represents an object or Character trait. This simple base is just
|
||||
storing anything in it’s ‘value’ property, so it’s pretty much just a
|
||||
different wrapper to an Attribute. It does no type-checking of what is
|
||||
stored.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>See module docstring for configuration details.</p>
|
||||
</div>
|
||||
<p>value</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.Trait.trait_type">
|
||||
<code class="sig-name descname">trait_type</code><em class="property"> = 'trait'</em><a class="headerlink" href="#evennia.contrib.traits.Trait.trait_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.Trait.default_keys">
|
||||
<code class="sig-name descname">default_keys</code><em class="property"> = {'value': None}</em><a class="headerlink" href="#evennia.contrib.traits.Trait.default_keys" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.Trait.allow_extra_properties">
|
||||
<code class="sig-name descname">allow_extra_properties</code><em class="property"> = True</em><a class="headerlink" href="#evennia.contrib.traits.Trait.allow_extra_properties" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.Trait.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#Trait.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.Trait.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This both initializes and validates the Trait on creation. It must
|
||||
raise exception if validation fails. The TraitHandler will call this
|
||||
when the trait is furst added, to make sure it validates before
|
||||
storing.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>trait_data</strong> (<em>any</em>) – Any pickle-able values to store with this trait.
|
||||
This must contain any cls.default_keys that do not have a default
|
||||
value in cls.data_default_values. Any extra kwargs will be made
|
||||
available as extra properties on the Trait, assuming the class
|
||||
variable <strong>allow_extra_properties</strong> is set.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p><a class="reference internal" href="#evennia.contrib.traits.TraitException" title="evennia.contrib.traits.TraitException"><strong>TraitException</strong></a> – If input-validation failed.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.Trait.validate_input">
|
||||
<em class="property">static </em><code class="sig-name descname">validate_input</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cls</span></em>, <em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#Trait.validate_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.Trait.validate_input" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Validate input</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>trait_data</strong> (<em>dict</em><em> or </em><em>_SaverDict</em>) – Data to be used for
|
||||
initialization of this trait.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>dict</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Validated data, possibly complemented with default</dt><dd><p>values from default_keys.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><p><a class="reference internal" href="#evennia.contrib.traits.TraitException" title="evennia.contrib.traits.TraitException"><strong>TraitException</strong></a> – If finding unset keys without a default.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.Trait.name">
|
||||
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#evennia.contrib.traits.Trait.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Display name for the trait.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.Trait.key">
|
||||
<em class="property">property </em><code class="sig-name descname">key</code><a class="headerlink" href="#evennia.contrib.traits.Trait.key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Display name for the trait.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.Trait.value">
|
||||
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.Trait.value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Store a value</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.traits.StaticTrait">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">StaticTrait</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#StaticTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.StaticTrait" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.Trait" title="evennia.contrib.traits.Trait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.Trait</span></code></a></p>
|
||||
<p>Static Trait. This is a single value with a modifier,
|
||||
with no concept of a ‘current’ value.</p>
|
||||
<p>value = base + mod</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.StaticTrait.trait_type">
|
||||
<code class="sig-name descname">trait_type</code><em class="property"> = 'static'</em><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.trait_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.StaticTrait.default_keys">
|
||||
<code class="sig-name descname">default_keys</code><em class="property"> = {'base': 0, 'mod': 0}</em><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.default_keys" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.StaticTrait.mod">
|
||||
<em class="property">property </em><code class="sig-name descname">mod</code><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.mod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The trait’s modifier.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.StaticTrait.value">
|
||||
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.StaticTrait.value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The value of the Trait</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.traits.CounterTrait">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">CounterTrait</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.Trait" title="evennia.contrib.traits.Trait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.Trait</span></code></a></p>
|
||||
<p>Counter Trait.</p>
|
||||
<p>This includes modifications and min/max limits as well as the notion of a
|
||||
current value. The value can also be reset to the base value.</p>
|
||||
<dl class="simple">
|
||||
<dt>min/unset base base+mod max/unset</dt><dd><dl class="simple">
|
||||
<dt><a href="#id7"><span class="problematic" id="id8">|--------------|</span></a>——–<a href="#id9"><span class="problematic" id="id10">|---------X--------X------------|</span></a></dt><dd><dl class="simple">
|
||||
<dt>current value</dt><dd><p>= current
|
||||
+ mod</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<ul>
|
||||
<li><p>value = current + mod, starts at base + mod</p></li>
|
||||
<li><p>if min or max is None, there is no upper/lower bound (default)</p></li>
|
||||
<li><p>if max is set to “base”, max will be equal ot base+mod</p></li>
|
||||
<li><p>descs are used to optionally describe each value interval.
|
||||
The desc of the current <strong>value</strong> value can then be retrieved
|
||||
with .desc(). The property is set as {lower_bound_inclusive:desc}
|
||||
and should be given smallest-to-biggest. For example, for
|
||||
a skill rating between 0 and 10:</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>{0: “unskilled”,</dt><dd><p>1: “neophyte”,
|
||||
5: “traited”,
|
||||
7: “expert”,
|
||||
9: “master”}</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</li>
|
||||
<li><p>rate/ratetarget are optional settings to include a rate-of-change
|
||||
of the current value. This is calculated on-demand and allows for
|
||||
describing a value that is gradually growing smaller/bigger. The
|
||||
increase will stop when either reaching a boundary (if set) or
|
||||
ratetarget. Setting the rate to 0 (default) stops any change.</p></li>
|
||||
</ul>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.trait_type">
|
||||
<code class="sig-name descname">trait_type</code><em class="property"> = 'counter'</em><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.trait_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.default_keys">
|
||||
<code class="sig-name descname">default_keys</code><em class="property"> = {'base': 0, 'descs': None, 'max': None, 'min': None, 'mod': 0, 'rate': 0, 'ratetarget': None}</em><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.default_keys" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.validate_input">
|
||||
<em class="property">static </em><code class="sig-name descname">validate_input</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cls</span></em>, <em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.validate_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.validate_input" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add extra validation for descs</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.base">
|
||||
<em class="property">property </em><code class="sig-name descname">base</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.base" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.mod">
|
||||
<em class="property">property </em><code class="sig-name descname">mod</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.mod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.min">
|
||||
<em class="property">property </em><code class="sig-name descname">min</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.min" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.max">
|
||||
<em class="property">property </em><code class="sig-name descname">max</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.max" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.current">
|
||||
<em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.current" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The <strong>current</strong> value of the <strong>Trait</strong>. This does not have .mod added.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.value">
|
||||
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The value of the Trait (current + mod)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.ratetarget">
|
||||
<em class="property">property </em><code class="sig-name descname">ratetarget</code><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.ratetarget" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.percent">
|
||||
<code class="sig-name descname">percent</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">formatting</span><span class="o">=</span><span class="default_value">'{:3.1f}%'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.percent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the current value as a percentage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>formatting</strong> (<em>str</em><em>, </em><em>optional</em>) – Should contain a
|
||||
format-tag which will receive the value. If
|
||||
this is set to None, the raw float will be
|
||||
returned.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>float or str</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Depending of if a <strong>formatting</strong> string</dt><dd><p>is supplied or not.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.reset">
|
||||
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.reset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Resets <strong>current</strong> property equal to <strong>base</strong> value.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.CounterTrait.desc">
|
||||
<code class="sig-name descname">desc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#CounterTrait.desc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.CounterTrait.desc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Retrieve descriptions of the current value, if available.</p>
|
||||
<p>This must be a mapping {upper_bound_inclusive: text},
|
||||
ordered from small to big. Any value above the highest
|
||||
upper bound will be included as being in the highest bound.
|
||||
rely on Python3.7+ dicts retaining ordering to let this
|
||||
describe the interval.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><p><em>str</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>The description describing the <strong>value</strong> value.</dt><dd><p>If not found, returns the empty string.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.traits.</code><code class="sig-name descname">GaugeTrait</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">trait_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.traits.CounterTrait" title="evennia.contrib.traits.CounterTrait"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.traits.CounterTrait</span></code></a></p>
|
||||
<p>Gauge Trait.</p>
|
||||
<p>This emulates a gauge-meter that empties from a base+mod value.</p>
|
||||
<dl>
|
||||
<dt>min/0 max=base+mod</dt><dd><dl>
|
||||
<dt><a href="#id11"><span class="problematic" id="id12">|-----------------------X---------------------------|</span></a></dt><dd><blockquote>
|
||||
<div><p>value</p>
|
||||
</div></blockquote>
|
||||
<p>= current</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<ul>
|
||||
<li><p>min defaults to 0</p></li>
|
||||
<li><p>max value is always base + mad</p></li>
|
||||
<li><p>.max is an alias of .base</p></li>
|
||||
<li><p>value = current and varies from min to max.</p></li>
|
||||
<li><dl>
|
||||
<dt>descs is a mapping {upper_bound_inclusive: desc}. These</dt><dd><p>are checked with .desc() and can be retrieve a text
|
||||
description for a given current value.</p>
|
||||
<p>For example, this could be used to describe health
|
||||
values between 0 and 100:</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>{0: “Dead”</dt><dd><p>10: “Badly hurt”,
|
||||
30: “Bleeding”,
|
||||
50: “Hurting”,
|
||||
90: “Healthy”}</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.trait_type">
|
||||
<code class="sig-name descname">trait_type</code><em class="property"> = 'gauge'</em><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.trait_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.default_keys">
|
||||
<code class="sig-name descname">default_keys</code><em class="property"> = {'base': 0, 'descs': None, 'min': 0, 'mod': 0, 'rate': 0, 'ratetarget': None}</em><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.default_keys" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.base">
|
||||
<em class="property">property </em><code class="sig-name descname">base</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.base" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.mod">
|
||||
<em class="property">property </em><code class="sig-name descname">mod</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.mod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.min">
|
||||
<em class="property">property </em><code class="sig-name descname">min</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.min" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.max">
|
||||
<em class="property">property </em><code class="sig-name descname">max</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.max" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The max is always base + mod.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.current">
|
||||
<em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.current" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The <strong>current</strong> value of the gauge.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.value">
|
||||
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The value of the trait</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.percent">
|
||||
<code class="sig-name descname">percent</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">formatting</span><span class="o">=</span><span class="default_value">'{:3.1f}%'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait.percent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the current value as a percentage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>formatting</strong> (<em>str</em><em>, </em><em>optional</em>) – Should contain a
|
||||
format-tag which will receive the value. If
|
||||
this is set to None, the raw float will be
|
||||
returned.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>float or str</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Depending of if a <strong>formatting</strong> string</dt><dd><p>is supplied or not.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.traits.GaugeTrait.reset">
|
||||
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/traits.html#GaugeTrait.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.traits.GaugeTrait.reset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fills the gauge to its maximum allowed by base + mod</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="evennia-contrib-traits">
|
||||
<h1>evennia.contrib.traits<a class="headerlink" href="#evennia-contrib-traits" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -859,27 +60,6 @@ returned.</p>
|
|||
</div>
|
||||
</div>
|
||||
<script>$('#searchbox').show(0);</script>
|
||||
<p><h3><a href="../index.html">Table of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">evennia.contrib.traits</a><ul>
|
||||
<li><a class="reference internal" href="#adding-traits-to-a-typeclass">Adding Traits to a typeclass</a></li>
|
||||
<li><a class="reference internal" href="#using-traits">Using traits</a></li>
|
||||
<li><a class="reference internal" href="#trait-types">Trait types</a></li>
|
||||
<li><a class="reference internal" href="#static-trait">Static trait</a><ul>
|
||||
<li><a class="reference internal" href="#counter">Counter</a><ul>
|
||||
<li><a class="reference internal" href="#rate">.rate</a></li>
|
||||
<li><a class="reference internal" href="#percentage">.percentage()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#gauge">Gauge</a></li>
|
||||
<li><a class="reference internal" href="#trait">Trait</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#expanding-with-your-own-traits">Expanding with your own Traits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div role="note" aria-label="source link">
|
||||
<!--h3>This Page</h3-->
|
||||
<ul class="this-page-menu">
|
||||
|
|
|
|||
|
|
@ -369,11 +369,6 @@ set in self.parse())</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tree_select.CmdNameColor.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'namecolor', 'tags': '', 'text': '\n Set or remove a special color on your name. Just an example for the\n easy menu selection tree contrib.\n '}</em><a class="headerlink" href="#evennia.contrib.tree_select.CmdNameColor.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
|
|||
|
|
@ -500,11 +500,6 @@ When it’s your turn, you can attack other characters.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdFight.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdFight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'fight', 'tags': '', 'text': "\n Starts a fight with everyone in the same room as you.\n\n Usage:\n fight\n\n When you start a fight, everyone in the room who is able to\n fight is added to combat, and a turn order is randomly rolled.\n When it's your turn, you can attack other characters.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdFight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -544,11 +539,6 @@ a chance to hit, and if successful, will deal damage.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdAttack.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'attack', 'tags': '', 'text': '\n Attacks another character.\n\n Usage:\n attack <target>\n\n When in a fight, you may attack another character. The attack has\n a chance to hit, and if successful, will deal damage.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -569,7 +559,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -588,11 +578,6 @@ if there are still any actions you can take.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdPass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -633,11 +618,6 @@ fight ends.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdDisengage.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdDisengage.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'spare', 'category': 'combat', 'key': 'disengage', 'tags': '', 'text': "\n Passes your turn and attempts to end combat.\n\n Usage:\n disengage\n\n Ends your turn early and signals that you're trying to end\n the fight. If all participants in a fight disengage, the\n fight ends.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdDisengage.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -677,11 +657,6 @@ rest if you’re not in a fight.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdRest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdRest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'rest', 'tags': '', 'text': "\n Recovers damage.\n\n Usage:\n rest\n\n Resting recovers your HP to its maximum, but you can only\n rest if you're not in a fight.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdRest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -723,11 +698,6 @@ topics related to the game.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdCombatHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_basic.CmdCombatHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_basic.CmdCombatHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -617,11 +617,6 @@ When it’s your turn, you can attack other characters.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdFight.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdFight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'fight', 'tags': '', 'text': "\n Starts a fight with everyone in the same room as you.\n\n Usage:\n fight\n\n When you start a fight, everyone in the room who is able to\n fight is added to combat, and a turn order is randomly rolled.\n When it's your turn, you can attack other characters.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdFight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -661,11 +656,6 @@ a chance to hit, and if successful, will deal damage.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdAttack.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'attack', 'tags': '', 'text': '\n Attacks another character.\n\n Usage:\n attack <target>\n\n When in a fight, you may attack another character. The attack has\n a chance to hit, and if successful, will deal damage.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -686,7 +676,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -705,11 +695,6 @@ if there are still any actions you can take.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdPass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -750,11 +735,6 @@ fight ends.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdDisengage.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdDisengage.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'spare', 'category': 'combat', 'key': 'disengage', 'tags': '', 'text': "\n Passes your turn and attempts to end combat.\n\n Usage:\n disengage\n\n Ends your turn early and signals that you're trying to end\n the fight. If all participants in a fight disengage, the\n fight ends.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdDisengage.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -794,11 +774,6 @@ rest if you’re not in a fight.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdRest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdRest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'rest', 'tags': '', 'text': "\n Recovers damage.\n\n Usage:\n rest\n\n Resting recovers your HP to its maximum, but you can only\n rest if you're not in a fight.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdRest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -840,11 +815,6 @@ topics related to the game.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdCombatHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdCombatHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdCombatHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -888,11 +858,6 @@ currently wielding.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdWield.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdWield.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'wield', 'tags': '', 'text': '\n Wield a weapon you are carrying\n\n Usage:\n wield <weapon>\n\n Select a weapon you are carrying to wield in combat. If\n you are already wielding another weapon, you will switch\n to the weapon you specify instead. Using this command in\n combat will spend your action for your turn. Use the\n "unwield" command to stop wielding any weapon you are\n currently wielding.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdWield.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -932,11 +897,6 @@ weapon you are currently wielding and become unarmed.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdUnwield.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdUnwield.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'unwield', 'tags': '', 'text': '\n Stop wielding a weapon.\n\n Usage:\n unwield\n\n After using this command, you will stop wielding any\n weapon you are currently wielding and become unarmed.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdUnwield.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -977,11 +937,6 @@ command to remove any armor you are wearing.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdDon.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdDon.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'don', 'tags': '', 'text': '\n Don armor that you are carrying\n\n Usage:\n don <armor>\n\n Select armor to wear in combat. You can\'t use this\n command in the middle of a fight. Use the "doff"\n command to remove any armor you are wearing.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdDon.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1022,11 +977,6 @@ You can’t use this command in combat.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdDoff.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_equip.CmdDoff.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'doff', 'tags': '', 'text': "\n Stop wearing armor.\n\n Usage:\n doff\n\n After using this command, you will stop wearing any\n armor you are currently using and become unarmored.\n You can't use this command in combat.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_equip.CmdDoff.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -651,11 +651,6 @@ When it’s your turn, you can attack other characters.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdFight.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdFight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'fight', 'tags': '', 'text': "\n Starts a fight with everyone in the same room as you.\n\n Usage:\n fight\n\n When you start a fight, everyone in the room who is able to\n fight is added to combat, and a turn order is randomly rolled.\n When it's your turn, you can attack other characters.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdFight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -695,11 +690,6 @@ a chance to hit, and if successful, will deal damage.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdAttack.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'attack', 'tags': '', 'text': '\n Attacks another character.\n\n Usage:\n attack <target>\n\n When in a fight, you may attack another character. The attack has\n a chance to hit, and if successful, will deal damage.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -720,7 +710,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -739,11 +729,6 @@ if there are still any actions you can take.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdPass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -784,11 +769,6 @@ fight ends.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdDisengage.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdDisengage.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'spare', 'category': 'combat', 'key': 'disengage', 'tags': '', 'text': "\n Passes your turn and attempts to end combat.\n\n Usage:\n disengage\n\n Ends your turn early and signals that you're trying to end\n the fight. If all participants in a fight disengage, the\n fight ends.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdDisengage.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -828,11 +808,6 @@ rest if you’re not in a fight.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdRest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdRest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'rest', 'tags': '', 'text': "\n Recovers damage.\n\n Usage:\n rest\n\n Resting recovers your HP to its maximum, but you can only\n rest if you're not in a fight.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdRest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -874,11 +849,6 @@ topics related to the game.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdCombatHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdCombatHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdCombatHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -919,11 +889,6 @@ to attack others, and as such can only be used in combat.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdUse.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_items.CmdUse.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'use', 'tags': '', 'text': '\n Use an item.\n\n Usage:\n use <item> [= target]\n\n An item can have various function - looking at the item may\n provide information as to its effects. Some items can be used\n to attack others, and as such can only be used in combat.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_items.CmdUse.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -523,11 +523,6 @@ When it’s your turn, you can attack other characters.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdFight.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdFight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'fight', 'tags': '', 'text': "\n Starts a fight with everyone in the same room as you.\n\n Usage:\n fight\n\n When you start a fight, everyone in the room who is able to\n fight is added to combat, and a turn order is randomly rolled.\n When it's your turn, you can attack other characters.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdFight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -567,11 +562,6 @@ a chance to hit, and if successful, will deal damage.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdAttack.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'attack', 'tags': '', 'text': '\n Attacks another character.\n\n Usage:\n attack <target>\n\n When in a fight, you may attack another character. The attack has\n a chance to hit, and if successful, will deal damage.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -592,7 +582,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -611,11 +601,6 @@ if there are still any actions you can take.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdPass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -656,11 +641,6 @@ fight ends.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdDisengage.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdDisengage.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'spare', 'category': 'combat', 'key': 'disengage', 'tags': '', 'text': "\n Passes your turn and attempts to end combat.\n\n Usage:\n disengage\n\n Ends your turn early and signals that you're trying to end\n the fight. If all participants in a fight disengage, the\n fight ends.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdDisengage.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -714,11 +694,6 @@ fight ends.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdLearnSpell.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdLearnSpell.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'magic', 'key': 'learnspell', 'tags': '', 'text': "\n Learn a magic spell.\n\n Usage:\n learnspell <spell name>\n\n Adds a spell by name to your list of spells known.\n\n The following spells are provided as examples:\n\n |wmagic missile|n (3 MP): Fires three missiles that never miss. Can target\n up to three different enemies.\n\n |wflame shot|n (3 MP): Shoots a high-damage jet of flame at one target.\n\n |wcure wounds|n (5 MP): Heals damage on one target.\n\n |wmass cure wounds|n (10 MP): Like 'cure wounds', but can heal up to 5\n targets at once.\n\n |wfull heal|n (12 MP): Heals one target back to full HP.\n\n |wcactus conjuration|n (2 MP): Creates a cactus.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdLearnSpell.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -766,11 +741,6 @@ function.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdCast.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdCast.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'magic', 'key': 'cast', 'tags': '', 'text': "\n Cast a magic spell that you know, provided you have the MP\n to spend on its casting.\n\n Usage:\n cast <spellname> [= <target1>, <target2>, etc...]\n\n Some spells can be cast on multiple targets, some can be cast\n on only yourself, and some don't need a target specified at all.\n Typing 'cast' by itself will give you a list of spells you know.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdCast.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -810,11 +780,6 @@ only rest if you’re not in a fight.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdRest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdRest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'rest', 'tags': '', 'text': "\n Recovers damage and restores MP.\n\n Usage:\n rest\n\n Resting recovers your HP and MP to their maximum, but you can\n only rest if you're not in a fight.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdRest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -854,11 +819,6 @@ other targets in combat.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdStatus.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdStatus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'status', 'tags': '', 'text': '\n Gives combat information.\n\n Usage:\n status\n\n Shows your current and maximum HP and your distance from\n other targets in combat.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -900,11 +860,6 @@ topics related to the game.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdCombatHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_magic.CmdCombatHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_magic.CmdCombatHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -814,11 +814,6 @@ When it’s your turn, you can attack other characters.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdFight.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdFight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'fight', 'tags': '', 'text': "\n Starts a fight with everyone in the same room as you.\n\n Usage:\n fight\n\n When you start a fight, everyone in the room who is able to\n fight is added to combat, and a turn order is randomly rolled.\n When it's your turn, you can attack other characters.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdFight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -860,11 +855,6 @@ you. Use the ‘approach’ command to get closer to a target.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdAttack.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'attack', 'tags': '', 'text': "\n Attacks another character in melee.\n\n Usage:\n attack <target>\n\n When in a fight, you may attack another character. The attack has\n a chance to hit, and if successful, will deal damage. You can only\n attack engaged targets - that is, targets that are right next to\n you. Use the 'approach' command to get closer to a target.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -907,11 +897,6 @@ nearby enemies.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdShoot.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdShoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'shoot', 'tags': '', 'text': "\n Attacks another character from range.\n\n Usage:\n shoot <target>\n\n When in a fight, you may shoot another character. The attack has\n a chance to hit, and if successful, will deal damage. You can attack\n any target in combat by shooting, but can't shoot if there are any\n targets engaged with you. Use the 'withdraw' command to retreat from\n nearby enemies.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdShoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -951,11 +936,6 @@ characters you are 0 spaces away from.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdApproach.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdApproach.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'approach', 'tags': '', 'text': '\n Approaches an object.\n\n Usage:\n approach <target>\n\n Move one space toward a character or object. You can only attack\n characters you are 0 spaces away from.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdApproach.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -994,11 +974,6 @@ characters you are 0 spaces away from.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdWithdraw.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdWithdraw.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'withdraw', 'tags': '', 'text': '\n Moves away from an object.\n\n Usage:\n withdraw <target>\n\n Move one space away from a character or object.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdWithdraw.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1019,7 +994,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1038,11 +1013,6 @@ if there are still any actions you can take.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdPass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1083,11 +1053,6 @@ fight ends.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdDisengage.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdDisengage.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'spare', 'category': 'combat', 'key': 'disengage', 'tags': '', 'text': "\n Passes your turn and attempts to end combat.\n\n Usage:\n disengage\n\n Ends your turn early and signals that you're trying to end\n the fight. If all participants in a fight disengage, the\n fight ends.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdDisengage.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1127,11 +1092,6 @@ rest if you’re not in a fight.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdRest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdRest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'rest', 'tags': '', 'text': "\n Recovers damage.\n\n Usage:\n rest\n\n Resting recovers your HP to its maximum, but you can only\n rest if you're not in a fight.\n "}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdRest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1171,11 +1131,6 @@ other targets in combat.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdStatus.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdStatus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'combat', 'key': 'status', 'tags': '', 'text': '\n Gives combat information.\n\n Usage:\n status\n\n Shows your current and maximum HP and your distance from\n other targets in combat.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1217,11 +1172,6 @@ topics related to the game.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdCombatHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.turnbattle.tb_range.CmdCombatHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}</em><a class="headerlink" href="#evennia.contrib.turnbattle.tb_range.CmdCombatHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -86,11 +86,6 @@ push the lid of the button away.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdNudge.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdNudge.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nudge', 'category': 'general', 'key': 'nudge lid', 'tags': '', 'text': "\n Try to nudge the button's lid\n\n Usage:\n nudge lid\n\n This command will have you try to\n push the lid of the button away.\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdNudge.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -138,11 +133,6 @@ lid-state respectively.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdPush.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdPush.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push press press button', 'category': 'general', 'key': 'push button', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdPush.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -162,7 +152,7 @@ lid-state respectively.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdSmashGlass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['smash lid', 'break lid', 'smash']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdSmashGlass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['break lid', 'smash', 'smash lid']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdSmashGlass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -187,11 +177,6 @@ of causing the lamp to break.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdSmashGlass.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdSmashGlass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'smash lid break lid smash', 'category': 'general', 'key': 'smash glass', 'tags': '', 'text': '\n smash glass\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -234,11 +219,6 @@ of causing the lamp to break.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdOpenLid.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdOpenLid.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'open button open', 'category': 'general', 'key': 'open lid', 'tags': '', 'text': '\n open lid\n\n Usage:\n open lid\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdOpenLid.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -282,11 +262,6 @@ of causing the lamp to break.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdCloseLid.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdCloseLid.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'close', 'category': 'general', 'key': 'close lid', 'tags': '', 'text': '\n close the lid\n\n Usage:\n close lid\n\n Closes the lid of the red button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdCloseLid.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -306,7 +281,7 @@ of causing the lamp to break.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['listen', 'feel', 'ex', 'l', 'examine', 'get']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['listen', 'feel', 'get', 'examine', 'ex', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -330,11 +305,6 @@ of causing the lamp to break.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'listen feel ex l examine get', 'category': 'general', 'key': 'look', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -377,11 +347,6 @@ of causing the lamp to break.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n Help function while in the blinded state\n\n Usage:\n help\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.cmdset_red_button.CmdBlindHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -36,79 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.contrib.tutorial_examples.mirror">
|
||||
<span id="evennia-contrib-tutorial-examples-mirror"></span><h1>evennia.contrib.tutorial_examples.mirror<a class="headerlink" href="#module-evennia.contrib.tutorial_examples.mirror" title="Permalink to this headline">¶</a></h1>
|
||||
<p>TutorialMirror</p>
|
||||
<p>A simple mirror object to experiment with.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorial_examples.mirror.</code><code class="sig-name descname">TutorialMirror</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_examples/mirror.html#TutorialMirror"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject</span></code></a></p>
|
||||
<p>A simple mirror object that
|
||||
- echoes back the description of the object looking at it
|
||||
- echoes back whatever is being sent to its .msg - to the</p>
|
||||
<blockquote>
|
||||
<div><p>sender, if given, otherwise to the location of the mirror.</p>
|
||||
</div></blockquote>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror.return_appearance">
|
||||
<code class="sig-name descname">return_appearance</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">looker</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_examples/mirror.html#TutorialMirror.return_appearance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror.return_appearance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This formats the description of this object. Called by the ‘look’ command.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>looker</strong> (<em>Object</em>) – Object doing the looking.</p></li>
|
||||
<li><p><strong>**kwargs</strong> (<em>dict</em>) – Arbitrary, optional arguments for users
|
||||
overriding the call (unused by default).</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror.msg">
|
||||
<code class="sig-name descname">msg</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">text</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">from_obj</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_examples/mirror.html#TutorialMirror.msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror.msg" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply override .msg to echo back to the messenger or to the current
|
||||
location.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>text</strong> (<em>str</em><em> or </em><em>tuple</em><em>, </em><em>optional</em>) – The message to send. This
|
||||
is treated internally like any send-command, so its
|
||||
value can be a tuple if sending multiple arguments to
|
||||
the <strong>text</strong> oob command.</p></li>
|
||||
<li><p><strong>from_obj</strong> (<em>obj</em><em> or </em><em>iterable</em>) – given, at_msg_send will be called. This value will be
|
||||
passed on to the protocol. If iterable, will execute hook
|
||||
on all entities in it.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultObject.DoesNotExist" title="evennia.objects.objects.DefaultObject.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject.DoesNotExist</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror.MultipleObjectsReturned">
|
||||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultObject.MultipleObjectsReturned" title="evennia.objects.objects.DefaultObject.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject.MultipleObjectsReturned</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorial_examples.mirror.TutorialMirror'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_examples.mirror.TutorialMirror.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'TutorialMirror'</em><a class="headerlink" href="#evennia.contrib.tutorial_examples.mirror.TutorialMirror.typename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-contrib-tutorial-examples-mirror">
|
||||
<h1>evennia.contrib.tutorial_examples.mirror<a class="headerlink" href="#evennia-contrib-tutorial-examples-mirror" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,11 +87,6 @@ to turn on/off the mob.”</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:superuser()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.mob.CmdMobOnOff.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.mob.CmdMobOnOff.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'moboff', 'category': 'general', 'key': 'mobon', 'tags': '', 'text': "\n Activates/deactivates Mob\n\n Usage:\n mobon <mob>\n moboff <mob>\n\n This turns the mob from active (alive) mode\n to inactive (dead) mode. It is used during\n building to activate the mob once it's\n prepared.\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.mob.CmdMobOnOff.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -127,7 +122,7 @@ the way it came. If unset, the mob will remain
|
|||
stationary (idling) until attacked.</p>
|
||||
</dd>
|
||||
<dt>aggressive: if set, will attack Characters in</dt><dd><p>the same room using whatever Weapon it
|
||||
carries (see tutorial_world.objects.TutorialWeapon).
|
||||
carries (see tutorial_world.objects.Weapon).
|
||||
if unset, the mob will never engage in combat
|
||||
no matter what.</p>
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ TutorialClimbable
|
|||
Obelisk
|
||||
LightSource
|
||||
CrumblingWall
|
||||
TutorialWeapon
|
||||
TutorialWeaponRack</p>
|
||||
Weapon
|
||||
WeaponRack</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialObject">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorial_world.objects.</code><code class="sig-name descname">TutorialObject</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialObject" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -133,11 +133,6 @@ Attribute “readable_text” on the object and displays that.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdRead.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdRead.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'tutorialworld', 'key': 'read', 'tags': '', 'text': '\n Usage:\n read [obj]\n\n Read some text of a readable object.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdRead.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -235,11 +230,6 @@ Attribute and add the readable cmdset.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdClimb.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdClimb.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'tutorialworld', 'key': 'climb', 'tags': '', 'text': '\n Climb an object\n\n Usage:\n climb <object>\n\n This allows you to climb.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdClimb.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -360,7 +350,7 @@ of the object. We overload it with our own version.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdLight.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['light', 'burn']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['burn', 'light']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -385,11 +375,6 @@ to sit on a “lightable” object, we operate only on self.obj.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:holds()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'light burn', 'category': 'tutorialworld', 'key': 'on', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdLight.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -491,7 +476,7 @@ shift green root up/down</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['move', 'push', 'shiftroot', 'pull']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['shiftroot', 'move', 'pull', 'push']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -525,11 +510,6 @@ yellow/green - horizontal roots</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:locattr(is_lit)'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'move push shiftroot pull', 'category': 'tutorialworld', 'key': 'shift', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -544,7 +524,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdPressButton.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['push button', 'button', 'press button']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['button', 'press button', 'push button']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -568,11 +548,6 @@ yellow/green - horizontal roots</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:objattr(button_exposed) and objlocattr(is_lit)'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'push button button press button', 'category': 'tutorialworld', 'key': 'press', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -714,7 +689,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdAttack.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['fight', 'kill', 'pierce', 'hit', 'stab', 'chop', 'parry', 'thrust', 'bash', 'defend', 'slash']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['fight', 'chop', 'parry', 'thrust', 'kill', 'slash', 'pierce', 'defend', 'bash', 'stab', 'hit']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -738,11 +713,6 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'fight kill pierce hit stab chop parry thrust bash defend slash', 'category': 'tutorialworld', 'key': 'attack', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -764,8 +734,8 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorial_world.objects.</code><code class="sig-name descname">TutorialWeapon</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialWeapon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorial_world.objects.</code><code class="sig-name descname">Weapon</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#Weapon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorial_world.objects.TutorialObject" title="evennia.contrib.tutorial_world.objects.TutorialObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorial_world.objects.TutorialObject</span></code></a></p>
|
||||
<p>This defines a bladed weapon.</p>
|
||||
<dl>
|
||||
|
|
@ -778,38 +748,38 @@ damage - base damage given (modified by hit success and</p>
|
|||
</dd>
|
||||
</dl>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon.at_object_creation">
|
||||
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialWeapon.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon.at_object_creation" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon.at_object_creation">
|
||||
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#Weapon.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon.at_object_creation" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Called at first creation of the object</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon.reset">
|
||||
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialWeapon.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon.reset" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon.reset">
|
||||
<code class="sig-name descname">reset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#Weapon.reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon.reset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>When reset, the weapon is simply deleted, unless it has a place
|
||||
to return to.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorial_world.objects.TutorialObject.DoesNotExist" title="evennia.contrib.tutorial_world.objects.TutorialObject.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorial_world.objects.TutorialObject.DoesNotExist</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon.MultipleObjectsReturned">
|
||||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon.MultipleObjectsReturned">
|
||||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorial_world.objects.TutorialObject.MultipleObjectsReturned" title="evennia.contrib.tutorial_world.objects.TutorialObject.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorial_world.objects.TutorialObject.MultipleObjectsReturned</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorial_world.objects.TutorialWeapon'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorial_world.objects.Weapon'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeapon.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'TutorialWeapon'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeapon.typename" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.Weapon.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'Weapon'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.Weapon.typename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -855,11 +825,6 @@ itself handle all messages.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdGetWeapon.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.CmdGetWeapon.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'tutorialworld', 'key': 'get weapon', 'tags': '', 'text': '\n Usage:\n get weapon\n\n This will try to obtain a weapon from the container.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.CmdGetWeapon.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -886,8 +851,8 @@ itself handle all messages.</p>
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorial_world.objects.</code><code class="sig-name descname">TutorialWeaponRack</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialWeaponRack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorial_world.objects.</code><code class="sig-name descname">WeaponRack</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#WeaponRack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorial_world.objects.TutorialObject" title="evennia.contrib.tutorial_world.objects.TutorialObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorial_world.objects.TutorialObject</span></code></a></p>
|
||||
<p>This object represents a weapon store. When people use the
|
||||
“get weapon” command on this rack, it will produce one
|
||||
|
|
@ -905,14 +870,14 @@ grab another one.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack.at_object_creation">
|
||||
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialWeaponRack.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack.at_object_creation" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack.at_object_creation">
|
||||
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#WeaponRack.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack.at_object_creation" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>called at creation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack.produce_weapon">
|
||||
<code class="sig-name descname">produce_weapon</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">caller</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#TutorialWeaponRack.produce_weapon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack.produce_weapon" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack.produce_weapon">
|
||||
<code class="sig-name descname">produce_weapon</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">caller</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorial_world/objects.html#WeaponRack.produce_weapon"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack.produce_weapon" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This will produce a new weapon from the rack,
|
||||
assuming the caller hasn’t already gotten one. When
|
||||
doing so, the caller will get Tagged with the id
|
||||
|
|
@ -921,25 +886,25 @@ pulling weapons from it indefinitely.</p>
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorial_world.objects.TutorialObject.DoesNotExist" title="evennia.contrib.tutorial_world.objects.TutorialObject.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorial_world.objects.TutorialObject.DoesNotExist</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack.MultipleObjectsReturned">
|
||||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack.MultipleObjectsReturned">
|
||||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorial_world.objects.TutorialObject.MultipleObjectsReturned" title="evennia.contrib.tutorial_world.objects.TutorialObject.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorial_world.objects.TutorialObject.MultipleObjectsReturned</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorial_world.objects.TutorialWeaponRack'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack.path">
|
||||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorial_world.objects.WeaponRack'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack.path" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.objects.TutorialWeaponRack.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'TutorialWeaponRack'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.TutorialWeaponRack.typename" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="evennia.contrib.tutorial_world.objects.WeaponRack.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'WeaponRack'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.objects.WeaponRack.typename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -86,11 +86,6 @@ called <strong>tutorial_info</strong> and display that.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorial.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorial.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'tut', 'category': 'tutorialworld', 'key': 'tutorial', 'tags': '', 'text': '\n Get help during the tutorial\n\n Usage:\n tutorial [obj]\n\n This command allows you to get behind-the-scenes info\n about an object or the current location.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorial.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -144,11 +139,6 @@ the set_detail method and uses it.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:perm(Builder)'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialSetDetail.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialSetDetail.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'tutorialworld', 'key': '@detail', 'tags': '', 'text': '\n sets a detail on a room\n\n Usage:\n @detail <key> = <description>\n @detail <key>;<alias>;... = description\n\n Example:\n @detail walls = The walls are covered in ...\n @detail castle;ruin;tower = The distant ruin ...\n\n This sets a "detail" on the object this command is defined on\n (TutorialRoom for this tutorial). This detail can be accessed with\n the TutorialRoomLook command sitting on TutorialRoom objects (details\n are set as a simple dictionary on the room). This is a Builder command.\n\n We custom parse the key for the ;-separator in order to create\n multiple aliases to the detail all at once.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialSetDetail.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -183,7 +173,7 @@ code except for adding in the details.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['l', 'ls']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['ls', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -196,11 +186,6 @@ code except for adding in the details.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l ls', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -237,11 +222,6 @@ to all the variables defined therein.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialGiveUp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdTutorialGiveUp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'abort', 'category': 'general', 'key': 'give up', 'tags': '', 'text': '\n Give up the tutorial-world quest and return to Limbo, the start room of the\n server.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdTutorialGiveUp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -447,11 +427,6 @@ set in self.parse())</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdEvenniaIntro.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdEvenniaIntro.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'intro', 'tags': '', 'text': '\n Start the Evennia intro wizard.\n\n Usage:\n intro\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdEvenniaIntro.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -581,11 +556,6 @@ on the bridge, 0 - 4.</p></li>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdEast.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdEast.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'e', 'category': 'tutorialworld', 'key': 'east', 'tags': '', 'text': '\n Go eastwards across the bridge.\n\n Tutorial info:\n This command relies on the caller having two Attributes\n (assigned by the room when entering):\n - east_exit: a unique name or dbref to the room to go to\n when exiting east.\n - west_exit: a unique name or dbref to the room to go to\n when exiting west.\n The room must also have the following Attributes\n - tutorial_bridge_posistion: the current position on\n on the bridge, 0 - 4.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdEast.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -644,11 +614,6 @@ on the bridge, 0 - 4.</p></li>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdWest.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdWest.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'w', 'category': 'tutorialworld', 'key': 'west', 'tags': '', 'text': '\n Go westwards across the bridge.\n\n Tutorial info:\n This command relies on the caller having two Attributes\n (assigned by the room when entering):\n - east_exit: a unique name or dbref to the room to go to\n when exiting east.\n - west_exit: a unique name or dbref to the room to go to\n when exiting west.\n The room must also have the following property:\n - tutorial_bridge_posistion: the current position on\n on the bridge, 0 - 4.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdWest.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -693,11 +658,6 @@ if they fall off the bridge.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookBridge.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookBridge.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n looks around at the bridge.\n\n Tutorial info:\n This command assumes that the room has an Attribute\n "fall_exit", a unique name or dbref to the place they end upp\n if they fall off the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookBridge.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -712,7 +672,7 @@ if they fall off the bridge.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -736,11 +696,6 @@ if they fall off the bridge.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -864,7 +819,7 @@ to find something.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['fiddle', 'feel around', 'feel', 'search', 'l']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['feel', 'l', 'search', 'fiddle', 'feel around']</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -890,11 +845,6 @@ random chance of eventually finding a light source.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'fiddle feel around feel search l', 'category': 'tutorialworld', 'key': 'look', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -933,11 +883,6 @@ random chance of eventually finding a light source.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdDarkHelp.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdDarkHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'tutorialworld', 'key': 'help', 'tags': '', 'text': '\n Help command for the dark state.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdDarkHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -980,11 +925,6 @@ suggestions)</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdDarkNoMatch.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorial_world.rooms.CmdDarkNoMatch.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': "\n This is a system command. Commands with special keys are used to\n override special sitations in the game. The CMD_NOMATCH is used\n when the given command is not found in the current command set (it\n replaces Evennia's default behavior or offering command\n suggestions)\n "}</em><a class="headerlink" href="#evennia.contrib.tutorial_world.rooms.CmdDarkNoMatch.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -317,11 +317,6 @@ use its <strong>add_argument</strong> method.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.unixcommand.UnixCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Unix-type commands, supporting short and long options.\n\n This command syntax uses the Unix-style commands with short options\n (-X) and long options (--something). The `argparse` module is\n used to parse the command.\n\n In order to use it, you should override two methods:\n - `init_parser`: this method is called when the command is created.\n It can be used to set options in the parser. `self.parser`\n contains the `argparse.ArgumentParser`, so you can add arguments\n here.\n - `func`: this method is called to execute the command, but after\n the parser has checked the arguments given to it are valid.\n You can access the namespace of valid arguments in `self.opts`\n at this point.\n\n The help of UnixCommands is derived from the docstring, in a\n slightly different way than usual: the first line of the docstring\n is used to represent the program description (the very short\n line at the top of the help message). The other lines below are\n used as the program\'s "epilog", displayed below the options. It\n means in your docstring, you don\'t have to write the options.\n They will be automatically provided by the parser and displayed\n accordingly. The `argparse` module provides a default \'-h\' or\n \'--help\' option on the command. Typing |whelp commandname|n will\n display the same as |wcommandname -h|n, though this behavior can\n be changed.\n\n '}</em><a class="headerlink" href="#evennia.contrib.unixcommand.UnixCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -139,12 +139,6 @@ access_type - type of access sought
|
|||
default - what to return if no lock of access_type was found</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.help.models.HelpEntry.search_index_entry">
|
||||
<em class="property">property </em><code class="sig-name descname">search_index_entry</code><a class="headerlink" href="#evennia.help.models.HelpEntry.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Property for easily retaining a search index entry for this object.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.help.models.HelpEntry.web_get_admin_url">
|
||||
<code class="sig-name descname">web_get_admin_url</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/help/models.html#HelpEntry.web_get_admin_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.help.models.HelpEntry.web_get_admin_url" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -215,23 +215,7 @@ with ‘q’, remove the break line and restart server when finished.</p></li>
|
|||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.slow_exit.html">evennia.contrib.slow_exit</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.talking_npc.html">evennia.contrib.talking_npc</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.test_traits.html">evennia.contrib.test_traits</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html">evennia.contrib.traits</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#adding-traits-to-a-typeclass">Adding Traits to a typeclass</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#using-traits">Using traits</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#trait-types">Trait types</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#static-trait">Static trait</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#counter">Counter</a><ul>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.contrib.traits.html#rate">.rate</a></li>
|
||||
<li class="toctree-l5"><a class="reference internal" href="evennia.contrib.traits.html#percentage">.percentage()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#gauge">Gauge</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.contrib.traits.html#trait">Trait</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.contrib.traits.html#expanding-with-your-own-traits">Expanding with your own Traits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.traits.html">evennia.contrib.traits</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.tree_select.html">evennia.contrib.tree_select</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.unixcommand.html">evennia.contrib.unixcommand</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.contrib.wilderness.html">evennia.contrib.wilderness</a></li>
|
||||
|
|
@ -395,14 +379,8 @@ with ‘q’, remove the break line and restart server when finished.</p></li>
|
|||
<li class="toctree-l1"><a class="reference internal" href="evennia.utils.html">evennia.utils</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.ansi.html">evennia.utils.ansi</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.batchprocessors.html">evennia.utils.batchprocessors</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-command-processor-file-syntax">Batch-command processor file syntax</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.utils.batchprocessors.html#example-of-batch-ev-file">Example of batch.ev file:</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-code-processor-file-syntax">Batch-code processor file syntax</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="evennia.utils.batchprocessors.html#example-batch-py-file">Example batch.py file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-command-processor-file-syntax">Batch-Command processor file syntax</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-code-processor-file-syntax">Batch-Code processor file syntax</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.containers.html">evennia.utils.containers</a></li>
|
||||
|
|
|
|||
|
|
@ -69,17 +69,6 @@ handler is defined</p>
|
|||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.models.ContentsHandler.load">
|
||||
<code class="sig-name descname">load</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/models.html#ContentsHandler.load"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.models.ContentsHandler.load" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Retrieves all objects from database. Used for initializing.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>Objects (list of ObjectDB)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.models.ContentsHandler.init">
|
||||
<code class="sig-name descname">init</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/models.html#ContentsHandler.init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.models.ContentsHandler.init" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -88,14 +77,11 @@ handler is defined</p>
|
|||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.models.ContentsHandler.get">
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">content_type</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/models.html#ContentsHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.models.ContentsHandler.get" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/models.html#ContentsHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.models.ContentsHandler.get" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the contents of the cache.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>exclude</strong> (<em>Object</em><em> or </em><em>list of Object</em>) – object(s) to ignore</p></li>
|
||||
<li><p><strong>content_type</strong> (<em>str</em><em> or </em><em>None</em>) – Filter list by a content-type. If None, don’t filter.</p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><strong>exclude</strong> (<em>Object</em><em> or </em><em>list of Object</em>) – object(s) to ignore</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>objects (list)</em> – the Objects inside this location</p>
|
||||
|
|
|
|||
|
|
@ -197,26 +197,21 @@ currently connected to this object.</p>
|
|||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.objects.DefaultObject.contents_get">
|
||||
<code class="sig-name descname">contents_get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">content_type</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.contents_get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.contents_get" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">contents_get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.contents_get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.contents_get" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns the contents of this object, i.e. all
|
||||
objects that has this object set as its location.
|
||||
This should be publically available.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>exclude</strong> (<em>Object</em>) – Object to exclude from returned
|
||||
contents list</p></li>
|
||||
<li><p><strong>content_type</strong> (<em>str</em>) – A content_type to filter by. None for no
|
||||
filtering.</p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><strong>exclude</strong> (<em>Object</em>) – Object to exclude from returned
|
||||
contents list</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>contents (list)</em> – List of contents of this Object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>Also available as the <strong>contents</strong> property, minus exclusion
|
||||
and filtering.</p>
|
||||
<p>Also available as the <strong>contents</strong> property.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -233,20 +228,15 @@ objects that has this object set as its location.
|
|||
This should be publically available.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>exclude</strong> (<em>Object</em>) – Object to exclude from returned
|
||||
contents list</p></li>
|
||||
<li><p><strong>content_type</strong> (<em>str</em>) – A content_type to filter by. None for no
|
||||
filtering.</p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><strong>exclude</strong> (<em>Object</em>) – Object to exclude from returned
|
||||
contents list</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>contents (list)</em> – List of contents of this Object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>Also available as the <strong>contents</strong> property, minus exclusion
|
||||
and filtering.</p>
|
||||
<p>Also available as the <strong>contents</strong> property.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -310,7 +300,7 @@ plural (str): The determined plural form of the key, including the count.</p>
|
|||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.objects.DefaultObject.search">
|
||||
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">global_search</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_nicks</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">location</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">quiet</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nofound_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">multimatch_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">stacked</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.search" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">global_search</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">use_nicks</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">location</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">quiet</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nofound_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">multimatch_string</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultObject.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultObject.search" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns an Object matching a search string/condition</p>
|
||||
<p>Perform a standard object search in the database, handling
|
||||
multiple results and lack thereof gracefully. By default, only
|
||||
|
|
@ -372,22 +362,14 @@ to find an object (globally) by its database-id 123. If <strong>False</strong>,
|
|||
will be treated like a normal string. If <strong>None</strong> (default), the ability to query by
|
||||
#dbref is turned on if <strong>self</strong> has the permission ‘Builder’ and is turned off
|
||||
otherwise.</p></li>
|
||||
<li><p><strong>stacked</strong> (<em>int</em><em>, </em><em>optional</em>) – If > 0, multimatches will be analyzed to determine if they
|
||||
only contains identical objects; these are then assumed ‘stacked’ and no multi-match
|
||||
error will be generated, instead <strong>stacked</strong> number of matches will be returned. If
|
||||
<strong>stacked</strong> is larger than number of matches, returns that number of matches. If
|
||||
the found stack is a mix of objects, return None and handle the multi-match
|
||||
error depending on the value of <strong>quiet</strong>.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>Object</em> – If finding a match an <strong>quiet=False</strong>
|
||||
None: If not finding a unique match and <strong>quiet=False</strong>.
|
||||
list: With 0, 1 or more matching objects if <strong>quiet=True</strong>
|
||||
list: With 2 or more matching objects if <strong>stacked</strong> is a positive integer and</p>
|
||||
<blockquote>
|
||||
<div><p>the matched stack has only object-copies.</p>
|
||||
</div></blockquote>
|
||||
<dd class="field-even"><p><p><em>match (Object, None or list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>will return an Object/None if <strong>quiet=False</strong>,</dt><dd><p>otherwise it will return a list of 0, 1 or more matches.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
@ -1511,36 +1493,6 @@ errors (list): A list of errors in string form, if any.</p>
|
|||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.objects.DefaultCharacter.normalize_name">
|
||||
<em class="property">classmethod </em><code class="sig-name descname">normalize_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultCharacter.normalize_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultCharacter.normalize_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Normalize the character name prior to creating. Note that this should be refactored
|
||||
to support i18n for non-latin scripts, but as we (currently) have no bug reports requesting better
|
||||
support of non-latin character sets, requiring character names to be latinified is an acceptable option.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>name</strong> (<em>str</em>) – The name of the character</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>latin_name (str)</em> – A valid name.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.objects.DefaultCharacter.validate_name">
|
||||
<em class="property">classmethod </em><code class="sig-name descname">validate_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultCharacter.validate_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultCharacter.validate_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Validate the character name prior to creating. Overload this function to add custom validators</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>name</strong> (<em>str</em>) – The name of the character</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>valid (bool)</em> – True if character creation should continue; False if it should fail</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.objects.objects.DefaultCharacter.basetype_setup">
|
||||
<code class="sig-name descname">basetype_setup</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/objects/objects.html#DefaultCharacter.basetype_setup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.objects.objects.DefaultCharacter.basetype_setup" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -1770,11 +1722,6 @@ overriding the call (unused by default).</p></li>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.objects.objects.ExitCommand.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.objects.objects.ExitCommand.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n This is a command that simply cause the caller to traverse\n the object it is attached to.\n\n '}</em><a class="headerlink" href="#evennia.objects.objects.ExitCommand.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -62,17 +62,6 @@ to the server using the AMP connection.</p>
|
|||
At this point, the AMP connection is already established.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.portal.portalsessionhandler.PortalSessionHandler.generate_sessid">
|
||||
<code class="sig-name descname">generate_sessid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/portal/portalsessionhandler.html#PortalSessionHandler.generate_sessid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.portal.portalsessionhandler.PortalSessionHandler.generate_sessid" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply generates a sessid that’s guaranteed to be unique for this Portal run.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>sessid</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.portal.portalsessionhandler.PortalSessionHandler.connect">
|
||||
<code class="sig-name descname">connect</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/portal/portalsessionhandler.html#PortalSessionHandler.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.portal.portalsessionhandler.PortalSessionHandler.connect" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -224,18 +224,18 @@ reaching this point.</p>
|
|||
are considered.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>options</strong> (<em>dict</em>) – <p>Send-option flags (booleans)</p>
|
||||
<dd class="field-even"><p><strong>options</strong> (<em>dict</em>) – <p>Send-option flags:</p>
|
||||
<ul class="simple">
|
||||
<li><p>mxp: enforce mxp link support.</p></li>
|
||||
<li><p>ansi: enforce no ansi colors.</p></li>
|
||||
<li><p>xterm256: enforce xterm256 colors, regardless of ttype setting.</p></li>
|
||||
<li><p>nocolor: strip all colors.</p></li>
|
||||
<li><p>raw: pass string through without any ansi processing
|
||||
(i.e. include evennia ansi markers but do not
|
||||
<li><p>mxp: Enforce MXP link support.</p></li>
|
||||
<li><p>ansi: Enforce no ANSI colors.</p></li>
|
||||
<li><p>xterm256: Enforce xterm256 colors, regardless of TTYPE setting.</p></li>
|
||||
<li><p>nocolor: Strip all colors.</p></li>
|
||||
<li><p>raw: Pass string through without any ansi processing
|
||||
(i.e. include Evennia ansi markers but do not
|
||||
convert them into ansi tokens)</p></li>
|
||||
<li><p>echo: turn on/off line echo on the client. turn
|
||||
<li><p>echo: Turn on/off line echo on the client. Turn
|
||||
off line echo for client, for example for password.
|
||||
note that it must be actively turned back on again!</p></li>
|
||||
Note that it must be actively turned back on again!</p></li>
|
||||
</ul>
|
||||
</p>
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -241,25 +241,19 @@ disconnect this protocol.</p>
|
|||
are considered.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>options</strong> (<em>dict</em>) – <p>Send-option flags</p>
|
||||
<dd class="field-even"><p><strong>options</strong> (<em>dict</em>) – <p>Send-option flags:</p>
|
||||
<ul class="simple">
|
||||
<li><p>mxp: Enforce MXP link support.</p></li>
|
||||
<li><p>ansi: Enforce no ANSI colors.</p></li>
|
||||
<li><p>xterm256: Enforce xterm256 colors, regardless of TTYPE.</p></li>
|
||||
<li><p>noxterm256: Enforce no xterm256 color support, regardless of TTYPE.</p></li>
|
||||
<li><p>nocolor: Strip all Color, regardless of ansi/xterm256 setting.</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>raw: Pass string through without any ansi processing</dt><dd><p>(i.e. include Evennia ansi markers but do not
|
||||
convert them into ansi tokens)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="simple">
|
||||
<dt>echo: Turn on/off line echo on the client. Turn</dt><dd><p>off line echo for client, for example for password.
|
||||
Note that it must be actively turned back on again!</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>raw: Pass string through without any ansi processing
|
||||
(i.e. include Evennia ansi markers but do not
|
||||
convert them into ansi tokens)</p></li>
|
||||
<li><p>echo: Turn on/off line echo on the client. Turn
|
||||
off line echo for client, for example for password.
|
||||
Note that it must be actively turned back on again!</p></li>
|
||||
</ul>
|
||||
</p>
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -46,15 +46,19 @@ commands, by contrast, can have many forms and it is up to the client
|
|||
how and if they are handled. Examples of OOB instructions could be to
|
||||
instruct the client to play sounds or to update a graphical health
|
||||
bar.</p>
|
||||
<p>Note that in Evennia’s Web client, all send commands are “OOB
|
||||
commands”, (including the “text” one), there is no equivalence to
|
||||
MSDP/GMCP for the webclient since it doesn’t need it.</p>
|
||||
<p>> Note that in Evennia’s Web client, all send commands are “OOB commands”,
|
||||
(including the “text” one), there is no equivalence to MSDP/GMCP for the
|
||||
webclient since it doesn’t need it.</p>
|
||||
<p>This implements the following telnet OOB communication protocols:</p>
|
||||
<ul class="simple">
|
||||
<li><p>MSDP (Mud Server Data Protocol), as per <a class="reference external" href="http://tintin.sourceforge.net/msdp/">http://tintin.sourceforge.net/msdp/</a></p></li>
|
||||
<li><p>MSDP (Mud Server Data Protocol), as per
|
||||
<a class="reference external" href="http://tintin.sourceforge.net/msdp/">http://tintin.sourceforge.net/msdp/</a></p></li>
|
||||
<li><p>GMCP (Generic Mud Communication Protocol) as per
|
||||
<a class="reference external" href="http://www.ironrealms.com/rapture/manual/files/FeatGMCP-txt.html#Generic_MUD_Communication_Protocol%28GMCP%29">http://www.ironrealms.com/rapture/manual/files/FeatGMCP-txt.html#Generic_MUD_Communication_Protocol%28GMCP%29</a></p></li>
|
||||
</ul>
|
||||
<p>Following the lead of KaVir’s protocol snippet, we first check if client
|
||||
supports MSDP and if not, we fallback to GMCP with a MSDP header where
|
||||
applicable.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.portal.telnet_oob.TelnetOOB">
|
||||
|
|
@ -134,17 +138,17 @@ supported.</p>
|
|||
<p class="rubric">Notes</p>
|
||||
<p>The output of this encoding will be
|
||||
MSDP structures on these forms:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[],</span> <span class="p">{}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="s2">""</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">arg</span><span class="p">],</span> <span class="p">{}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">arg</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">args</span><span class="p">],{}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">ARRAYOPEN</span> <span class="n">VAL</span> <span class="n">arg</span> <span class="n">VAL</span> <span class="n">arg</span> <span class="o">...</span> <span class="n">ARRAYCLOSE</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">TABLEOPEN</span> <span class="n">VAR</span> <span class="n">key</span> <span class="n">VAL</span> <span class="n">val</span> <span class="o">...</span> <span class="n">TABLECLOSE</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[],</span> <span class="p">{}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="s2">""</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">arg</span><span class="p">],</span> <span class="p">{}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">arg</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">args</span><span class="p">],{}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">ARRAYOPEN</span> <span class="n">VAL</span> <span class="n">arg</span> <span class="n">VAL</span> <span class="n">arg</span> <span class="o">...</span> <span class="n">ARRAYCLOSE</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">TABLEOPEN</span> <span class="n">VAR</span> <span class="n">key</span> <span class="n">VAL</span> <span class="n">val</span> <span class="o">...</span> <span class="n">TABLECLOSE</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">args</span><span class="p">],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">ARRAYOPEN</span> <span class="n">VAL</span> <span class="n">arg</span> <span class="n">VAL</span> <span class="n">arg</span> <span class="o">...</span> <span class="n">ARRAYCLOSE</span>
|
||||
<span class="n">VAR</span> <span class="n">cmdname</span> <span class="n">VAL</span> <span class="n">TABLEOPEN</span> <span class="n">VAR</span> <span class="n">key</span> <span class="n">VAL</span> <span class="n">val</span> <span class="o">...</span> <span class="n">TABLECLOSE</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Further nesting is not supported, so if an array argument
|
||||
consists of an array (for example), that array will be
|
||||
json-converted to a string.</p>
|
||||
<p>Further nesting is not supported, so if an array argument consists
|
||||
of an array (for example), that array will be json-converted to a
|
||||
string.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -171,11 +175,12 @@ be stripped on the Evennia side.</p>
|
|||
<span class="p">[</span><span class="n">cmd</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="p">[</span><span class="n">arg</span><span class="p">],</span> <span class="p">{}]</span> <span class="o">-></span> <span class="n">Cmd</span><span class="o">.</span><span class="n">Name</span> <span class="n">arg</span>
|
||||
<span class="p">[</span><span class="n">cmd</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="p">[</span><span class="n">args</span><span class="p">],{}]</span> <span class="o">-></span> <span class="n">Cmd</span><span class="o">.</span><span class="n">Name</span> <span class="p">[</span><span class="n">args</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="n">cmd</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="p">[],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="n">Cmd</span><span class="o">.</span><span class="n">Name</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">args</span><span class="p">,</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="n">Core</span><span class="o">.</span><span class="n">Cmdname</span> <span class="p">[[</span><span class="n">args</span><span class="p">],{</span><span class="n">kwargs</span><span class="p">}]</span>
|
||||
<span class="p">[</span><span class="n">cmdname</span><span class="p">,</span> <span class="p">[</span><span class="n">args</span><span class="p">,</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="n">Core</span><span class="o">.</span><span class="n">Cmdname</span> <span class="p">[[</span><span class="n">args</span><span class="p">],{</span><span class="n">kwargs</span><span class="p">}]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>There are also a few default mappings between evennia outputcmds and GMCP:</p>
|
||||
<p>There are also a few default mappings between evennia outputcmds and
|
||||
GMCP:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">client_options</span> <span class="o">-></span> <span class="n">Core</span><span class="o">.</span><span class="n">Supports</span><span class="o">.</span><span class="n">Get</span>
|
||||
<span class="n">get_inputfuncs</span> <span class="o">-></span> <span class="n">Core</span><span class="o">.</span><span class="n">Commands</span><span class="o">.</span><span class="n">Get</span>
|
||||
<span class="n">get_value</span> <span class="o">-></span> <span class="n">Char</span><span class="o">.</span><span class="n">Value</span><span class="o">.</span><span class="n">Get</span>
|
||||
|
|
|
|||
|
|
@ -42,17 +42,13 @@
|
|||
<p>This module defines dummyrunner settings and sets up
|
||||
the actions available to dummy accounts.</p>
|
||||
<p>The settings are global variables:</p>
|
||||
<ul class="simple">
|
||||
<li><p>TIMESTEP - time in seconds between each ‘tick’</p></li>
|
||||
<li><p>CHANCE_OF_ACTION - chance 0-1 of action happening</p></li>
|
||||
<li><p>CHANCE_OF_LOGIN - chance 0-1 of login happening</p></li>
|
||||
<li><p>TELNET_PORT - port to use, defaults to settings.TELNET_PORT</p></li>
|
||||
<li><p>ACTIONS - see below</p></li>
|
||||
</ul>
|
||||
<p>TIMESTEP - time in seconds between each ‘tick’
|
||||
CHANCE_OF_ACTION - chance 0-1 of action happening
|
||||
CHANCE_OF_LOGIN - chance 0-1 of login happening
|
||||
TELNET_PORT - port to use, defaults to settings.TELNET_PORT
|
||||
ACTIONS - see below</p>
|
||||
<p>ACTIONS is a tuple</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">login_func</span><span class="p">,</span> <span class="n">logout_func</span><span class="p">,</span> <span class="p">(</span><span class="mf">0.3</span><span class="p">,</span> <span class="n">func1</span><span class="p">),</span> <span class="p">(</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">func2</span><span class="p">)</span> <span class="o">...</span> <span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>(login_func, logout_func, (0.3, func1), (0.1, func2) … )</p>
|
||||
<p>where the first entry is the function to call on first connect, with a
|
||||
chance of occurring given by CHANCE_OF_LOGIN. This function is usually
|
||||
responsible for logging in the account. The second entry is always
|
||||
|
|
@ -69,22 +65,28 @@ returns a string or a list of command strings to execute. Use the
|
|||
client object for optionally saving data between actions.</p>
|
||||
<p>The client object has the following relevant properties and methods:</p>
|
||||
<ul class="simple">
|
||||
<li><p>key - an optional client key. This is only used for dummyrunner output.
|
||||
Default is “Dummy-<cid>”</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>key - an optional client key. This is only used for dummyrunner output.</dt><dd><p>Default is “Dummy-<cid>”</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>cid - client id</p></li>
|
||||
<li><p>gid - globally unique id, hashed with time stamp</p></li>
|
||||
<li><p>istep - the current step</p></li>
|
||||
<li><p>exits - an empty list. Can be used to store exit names</p></li>
|
||||
<li><p>objs - an empty list. Can be used to store object names</p></li>
|
||||
<li><p>counter() - returns a unique increasing id, hashed with time stamp
|
||||
to make it unique also between dummyrunner instances.</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>counter() - returns a unique increasing id, hashed with time stamp</dt><dd><p>to make it unique also between dummyrunner instances.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The return should either be a single command string or a tuple of
|
||||
command strings. This list of commands will always be executed every
|
||||
TIMESTEP with a chance given by CHANCE_OF_ACTION by in the order given
|
||||
(no randomness) and allows for setting up a more complex chain of
|
||||
commands (such as creating an account and logging in).</p>
|
||||
<hr class="docutils" />
|
||||
<p>—</p>
|
||||
<dl class="py function">
|
||||
<dt id="evennia.server.profiling.dummyrunner_settings.c_login">
|
||||
<code class="sig-prename descclassname">evennia.server.profiling.dummyrunner_settings.</code><code class="sig-name descname">c_login</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">client</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/profiling/dummyrunner_settings.html#c_login"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.profiling.dummyrunner_settings.c_login" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@
|
|||
|
||||
<div class="section" id="module-evennia.server.server">
|
||||
<span id="evennia-server-server"></span><h1>evennia.server.server<a class="headerlink" href="#module-evennia.server.server" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This module implements the main Evennia server process, the core of the game
|
||||
engine.</p>
|
||||
<p>This module should be started with the ‘twistd’ executable since it sets up all
|
||||
the networking features. (this is done automatically by
|
||||
evennia/server/server_runner.py).</p>
|
||||
<p>This module implements the main Evennia server process, the core of
|
||||
the game engine.</p>
|
||||
<p>This module should be started with the ‘twistd’ executable since it
|
||||
sets up all the networking features. (this is done automatically
|
||||
by evennia/server/server_runner.py).</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.server.Evennia">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.server.</code><code class="sig-name descname">Evennia</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">application</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/server.html#Evennia"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.server.Evennia" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -99,20 +99,20 @@ Once finished the last_initial_setup_step is set to -1.</p>
|
|||
<dt id="evennia.server.server.Evennia.shutdown">
|
||||
<code class="sig-name descname">shutdown</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span><span class="o">=</span><span class="default_value">'reload'</span></em>, <em class="sig-param"><span class="n">_reactor_stopping</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/server.html#Evennia.shutdown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.server.Evennia.shutdown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Shuts down the server from inside it.</p>
|
||||
<dl class="simple">
|
||||
<dt>mode - sets the server restart mode.</dt><dd><ul class="simple">
|
||||
<li><p>‘reload’ - server restarts, no “persistent” scripts
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>mode</strong> (<em>str</em>) – Sets the server restart mode:</p></li>
|
||||
<li><p><strong>'reload'</strong> (<em>-</em>) – server restarts, no “persistent” scripts
|
||||
are stopped, at_reload hooks called.</p></li>
|
||||
<li><p>‘reset’ - server restarts, non-persistent scripts stopped,
|
||||
at_shutdown hooks called but sessions will not
|
||||
<li><p><strong>'reset' - server restarts</strong><strong>, </strong><strong>non-persistent scripts stopped</strong><strong>,</strong> (<em>-</em>) – at_shutdown hooks called but sessions will not
|
||||
be disconnected.</p></li>
|
||||
<li><p>‘shutdown’ - like reset, but server will not auto-restart.</p></li>
|
||||
<li><p><strong>- like reset</strong><strong>, </strong><strong>but server will not auto-restart.</strong> (<em>-'shutdown'</em>) – </p></li>
|
||||
<li><p><strong>_reactor_stopping</strong> – This is set if server is stopped by a kill
|
||||
command OR this method was already called
|
||||
once - in both cases the reactor is dead/stopping already.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>_reactor_stopping - this is set if server is stopped by a kill</dt><dd><p>command OR this method was already called
|
||||
once - in both cases the reactor is
|
||||
dead/stopping already.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,126 @@ a connection to the outside world but don’t know any details about how the
|
|||
connection actually happens (so it’s the same for telnet, web, ssh etc).</p>
|
||||
<p>It is stored on the Server side (as opposed to protocol-specific sessions which
|
||||
are stored on the Portal side)</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.serversession.NDbHolder">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.serversession.</code><code class="sig-name descname">NDbHolder</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">manager_name</span><span class="o">=</span><span class="default_value">'attributes'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NDbHolder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NDbHolder" 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>Holder for allowing property access of attributes</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NDbHolder.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">manager_name</span><span class="o">=</span><span class="default_value">'attributes'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NDbHolder.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NDbHolder.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NDbHolder.get_all">
|
||||
<code class="sig-name descname">get_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NDbHolder.get_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NDbHolder.get_all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NDbHolder.all">
|
||||
<em class="property">property </em><code class="sig-name descname">all</code><a class="headerlink" href="#evennia.server.serversession.NDbHolder.all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.serversession.</code><code class="sig-name descname">NAttributeHandler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler" 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>NAttributeHandler version without recache protection.
|
||||
This stand-alone handler manages non-database saving.
|
||||
It is similar to <strong>AttributeHandler</strong> and is used
|
||||
by the <strong>.ndb</strong> handler in the same way as <strong>.db</strong> does
|
||||
for the <strong>AttributeHandler</strong>.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialized on the object</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.has">
|
||||
<code class="sig-name descname">has</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler.has"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.has" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check if object has this attribute or not.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) – The Nattribute key to check.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>has_nattribute (bool)</em> – If Nattribute is set or not.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.get">
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.get" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the named key value.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) – The Nattribute key to get.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>the value of the Nattribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.add">
|
||||
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.add" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add new key and value.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The name of Nattribute to add.</p></li>
|
||||
<li><p><strong>value</strong> (<em>any</em>) – The value to store.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.remove">
|
||||
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.remove" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove Nattribute from storage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) – The name of the Nattribute to remove.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.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/server/serversession.html#NAttributeHandler.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.clear" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove all NAttributes from handler.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.NAttributeHandler.all">
|
||||
<code class="sig-name descname">all</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">return_tuples</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#NAttributeHandler.all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.NAttributeHandler.all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>List the contents of the handler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>return_tuples</strong> (<em>bool</em><em>, </em><em>optional</em>) – Defines if the Nattributes
|
||||
are returns as a list of keys or as a list of <strong>(key, value)</strong>.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>nattributes (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>A list of keys <strong>[key, key, …]</strong> or a</dt><dd><p>list of tuples <strong>[(key, value), …]</strong> depending on the
|
||||
setting of <strong>return_tuples</strong>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.serversession.ServerSession">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.serversession.</code><code class="sig-name descname">ServerSession</code><a class="reference internal" href="../_modules/evennia/server/serversession.html#ServerSession"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.ServerSession" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -63,11 +183,6 @@ through their session.</p>
|
|||
<em class="property">property </em><code class="sig-name descname">cmdset_storage</code><a class="headerlink" href="#evennia.server.serversession.ServerSession.cmdset_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.ServerSession.id">
|
||||
<em class="property">property </em><code class="sig-name descname">id</code><a class="headerlink" href="#evennia.server.serversession.ServerSession.id" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.server.serversession.ServerSession.at_sync">
|
||||
<code class="sig-name descname">at_sync</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/serversession.html#ServerSession.at_sync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.serversession.ServerSession.at_sync" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -180,7 +295,7 @@ idle timers and command counters.</p>
|
|||
<dd><p>Update the protocol_flags and sync them with Portal.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><p><strong>protocol_flag</strong> (<em>any</em>) – A key and value to set in the
|
||||
<dd class="field-odd"><p><strong>any</strong> – A key:value pair to set in the
|
||||
protocol_flags dictionary.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
@ -213,7 +328,7 @@ for the protocol(s).</p></li>
|
|||
the respective inputfuncs.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><p><strong>kwargs</strong> (<em>any</em>) – Incoming data from protocol on
|
||||
<dd class="field-odd"><p><strong>any</strong> – Incoming data from protocol on
|
||||
the form <strong>{“commandname”: ((args), {kwargs}),…}</strong></p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
@ -230,12 +345,12 @@ this data off to <strong>self.sessionhandler.call_inputfuncs(self, **kwargs)</st
|
|||
<dd><p>Wrapper to mimic msg() functionality of Objects and Accounts.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>text</strong> (<em>str</em>) – String input.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>any</strong> (<em>str</em><em> or </em><em>tuple</em>) – Send-commands identified
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>text</strong> (<em>str</em>) – String input.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>str</em><em> or </em><em>tuple</em>) – Send-commands identified
|
||||
by their keys. Or “options”, carrying options
|
||||
for the protocol(s).</p>
|
||||
for the protocol(s).</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
<p>This module defines handlers for storing sessions when handles
|
||||
sessions of users connecting to the server.</p>
|
||||
<p>There are two similar but separate stores of sessions:</p>
|
||||
<ul class="simple">
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt>ServerSessionHandler - this stores generic game sessions</dt><dd><p>for the game. These sessions has no knowledge about
|
||||
how they are connected to the world.</p>
|
||||
|
|
@ -55,6 +56,7 @@ handle network communication but holds no game info.</p>
|
|||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.server.sessionhandler.DummySession">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.server.sessionhandler.</code><code class="sig-name descname">DummySession</code><a class="reference internal" href="../_modules/evennia/server/sessionhandler.html#DummySession"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.sessionhandler.DummySession" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -118,22 +120,30 @@ sessions in store.</p>
|
|||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a>) – The relevant session instance.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>dict</em>) – of the instruction (like “text”). Suitable values for each
|
||||
keyword are:
|
||||
- arg -> [[arg], {}]
|
||||
- [args] -> [[args], {}]
|
||||
- {kwargs} -> [[], {kwargs}]
|
||||
- [args, {kwargs}] -> [[arg], {kwargs}]
|
||||
- [[args], {kwargs}] -> [[args], {kwargs}]</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>dict</em>) – <p>send-instruction, with the keyword itself being the name
|
||||
of the instruction (like “text”). Suitable values for each
|
||||
keyword are:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">arg</span> <span class="o">-></span> <span class="p">[[</span><span class="n">arg</span><span class="p">],</span> <span class="p">{}]</span>
|
||||
<span class="p">[</span><span class="n">args</span><span class="p">]</span> <span class="o">-></span> <span class="p">[[</span><span class="n">args</span><span class="p">],</span> <span class="p">{}]</span>
|
||||
<span class="p">{</span><span class="n">kwargs</span><span class="p">}</span> <span class="o">-></span> <span class="p">[[],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span>
|
||||
<span class="p">[</span><span class="n">args</span><span class="p">,</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="p">[[</span><span class="n">arg</span><span class="p">],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span>
|
||||
<span class="p">[[</span><span class="n">args</span><span class="p">],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span> <span class="o">-></span> <span class="p">[[</span><span class="n">args</span><span class="p">],</span> <span class="p">{</span><span class="n">kwargs</span><span class="p">}]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>kwargs (dict)</em> – A cleaned dictionary of cmdname:[[args],{kwargs}] pairs,
|
||||
where the keys, args and kwargs have all been converted to
|
||||
<dd class="field-even"><p><p><em>kwargs (dict)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>A cleaned dictionary of cmdname:[[args],{kwargs}] pairs,</dt><dd><p>where the keys, args and kwargs have all been converted to
|
||||
send-safe entities (strings or numbers), and inlinefuncs have been
|
||||
applied.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -482,13 +492,12 @@ object.</p>
|
|||
<code class="sig-name descname">sessions_from_csessid</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">csessid</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/sessionhandler.html#ServerSessionHandler.sessions_from_csessid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.sessionhandler.ServerSessionHandler.sessions_from_csessid" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Given a client identification hash (for session types that offer them)
|
||||
return all sessions with a matching hash.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args</dt><dd><p>csessid (str): The session hash.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>sessions (list)</em> – The sessions with matching .csessid, if any.</p>
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>csessid</strong> (<em>str</em>) – The session hash.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>sessions (list)</em> – The sessions with matching .csessid, if any.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -545,17 +554,17 @@ this class’ <strong>sessionhandler.call_inputfunc</strong> with the
|
|||
<dl class="py method">
|
||||
<dt id="evennia.server.sessionhandler.ServerSessionHandler.call_inputfuncs">
|
||||
<code class="sig-name descname">call_inputfuncs</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/server/sessionhandler.html#ServerSessionHandler.call_inputfuncs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.server.sessionhandler.ServerSessionHandler.call_inputfuncs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Split incoming data into its inputfunc counterparts. This should be
|
||||
called by the <strong>serversession.data_in</strong> as
|
||||
<strong>sessionhandler.call_inputfunc(self, **kwargs)</strong>.</p>
|
||||
<dd><p>Split incoming data into its inputfunc counterparts.
|
||||
This should be called by the serversession.data_in
|
||||
as <strong>sessionhandler.call_inputfunc(self, **kwargs)</strong>.</p>
|
||||
<p>We also intercept OOB communication here.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>sessions</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a>) – Session.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>any</strong> (<em>tuple</em>) – Incoming data from protocol, each
|
||||
on the form <strong>commandname=((args), {kwargs})</strong>.</p>
|
||||
<dd class="field-even"><p><strong>kwargs</strong> (<em>any</em>) – Incoming data from protocol on
|
||||
the form <strong>{“commandname”: ((args), {kwargs}),…}</strong></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -38,20 +38,22 @@
|
|||
|
||||
<div class="section" id="module-evennia.server.signals">
|
||||
<span id="evennia-server-signals"></span><h1>evennia.server.signals<a class="headerlink" href="#module-evennia.server.signals" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This module brings Django Signals into Evennia. These are events that can be
|
||||
subscribed to by importing a given Signal and using the following code.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">THIS_SIGNAL</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">callback</span><span class="p">,</span> <span class="n">sender_object</span><span class="p">)</span>
|
||||
<p>This module brings Django Signals into Evennia. These are events that
|
||||
can be subscribed to by importing a given Signal and using the
|
||||
following code.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">THIS_SIGNAL</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">callback</span><span class="p">,</span> <span class="n">sender_object</span><span class="o">**</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>When other code calls <strong>THIS_SIGNAL.send(sender, **kwargs)</strong>, the callback will
|
||||
be triggered.</p>
|
||||
<p>Callbacks must be on the following format:</p>
|
||||
<p>When other code calls <strong>THIS_SIGNAL.send(sender, **kwargs)</strong>, the callback
|
||||
will be triggered.</p>
|
||||
<p>Callbacks must be in the following format:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">my_callback</span><span class="p">(</span><span class="n">sender</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||
<span class="c1"># ...</span>
|
||||
<span class="o">...</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This is used on top of hooks to make certain features easier to add to contribs
|
||||
without necessitating a full takeover of hooks that may be in high demand.</p>
|
||||
<p>This is used on top of hooks to make certain features easier to
|
||||
add to contribs without necessitating a full takeover of hooks
|
||||
that may be in high demand.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ both pure-string values and pickled arbitrary data.</p>
|
|||
the Attribute- and NickHandlers as well as the <strong>NAttributeHandler</strong>,
|
||||
which is a non-db version of Attributes.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">IAttribute</code><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute" 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>
|
||||
<dt id="evennia.typeclasses.attributes.Attribute">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">Attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#Attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.utils.idmapper.models.html#evennia.utils.idmapper.models.SharedMemoryModel" title="evennia.utils.idmapper.models.SharedMemoryModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.idmapper.models.SharedMemoryModel</span></code></a></p>
|
||||
<p>Attributes are things that are specific to different types of objects. For
|
||||
example, a drink container needs to store its fill level, whereas an exit
|
||||
needs to store its open/closed/locked/unlocked state. These are done via
|
||||
|
|
@ -81,106 +81,6 @@ attributes on the fly as we like.</p>
|
|||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>This class is an API/Interface/Abstract base class; do not instantiate it directly.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.locks">
|
||||
<code class="sig-name descname">locks</code><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttribute.locks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.locks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.key">
|
||||
<em class="property">property </em><code class="sig-name descname">key</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.strvalue">
|
||||
<em class="property">property </em><code class="sig-name descname">strvalue</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.strvalue" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.category">
|
||||
<em class="property">property </em><code class="sig-name descname">category</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.model">
|
||||
<em class="property">property </em><code class="sig-name descname">model</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.attrtype">
|
||||
<em class="property">property </em><code class="sig-name descname">attrtype</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.attrtype" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.date_created">
|
||||
<em class="property">property </em><code class="sig-name descname">date_created</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.date_created" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.lock_storage">
|
||||
<em class="property">property </em><code class="sig-name descname">lock_storage</code><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttribute.access">
|
||||
<code class="sig-name descname">access</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">accessing_obj</span></em>, <em class="sig-param"><span class="n">access_type</span><span class="o">=</span><span class="default_value">'read'</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttribute.access"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttribute.access" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Determines if another object has permission to access.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>accessing_obj</strong> (<em>object</em>) – Entity trying to access this one.</p></li>
|
||||
<li><p><strong>access_type</strong> (<em>str</em><em>, </em><em>optional</em>) – Type of access sought, see
|
||||
the lock documentation.</p></li>
|
||||
<li><p><strong>default</strong> (<em>bool</em><em>, </em><em>optional</em>) – What result to return if no lock
|
||||
of access_type was found. The default, <strong>False</strong>, means a lockdown
|
||||
policy, only allowing explicit access.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – Not used; here to make the API consistent with
|
||||
other access calls.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>result (bool)</em> – If the lock was passed or not.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttribute">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">InMemoryAttribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pk</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.attributes.IAttribute</span></code></a></p>
|
||||
<p>This Attribute is used purely for NAttributes/NAttributeHandler. It has no database backend.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttribute.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pk</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttribute.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttribute.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Create an Attribute that exists only in Memory.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>pk</strong> (<em>int</em>) – This is a fake ‘primary key’ / id-field. It doesn’t actually have to be unique, but is fed an
|
||||
incrementing number from the InMemoryBackend by default. This is needed only so Attributes can be
|
||||
sorted. Some parts of the API also see the lack of a .pk field as a sign that the Attribute was
|
||||
deleted.</p></li>
|
||||
<li><p><strong>**kwargs</strong> – Other keyword arguments are used to construct the actual Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttribute.value">
|
||||
<em class="property">property </em><code class="sig-name descname">value</code><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttribute.value" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">Attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#Attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.attributes.IAttribute</span></code></a>, <a class="reference internal" href="evennia.utils.idmapper.models.html#evennia.utils.idmapper.models.SharedMemoryModel" title="evennia.utils.idmapper.models.SharedMemoryModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.idmapper.models.SharedMemoryModel</span></code></a></p>
|
||||
<p>This attribute is stored via Django. Most Attributes will be using this class.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.db_key">
|
||||
<code class="sig-name descname">db_key</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.db_key" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -237,6 +137,41 @@ object the first time, the query is executed.</p>
|
|||
object the first time, the query is executed.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.locks">
|
||||
<code class="sig-name descname">locks</code><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#Attribute.locks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.locks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.key">
|
||||
<em class="property">property </em><code class="sig-name descname">key</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.strvalue">
|
||||
<em class="property">property </em><code class="sig-name descname">strvalue</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.strvalue" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.category">
|
||||
<em class="property">property </em><code class="sig-name descname">category</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.model">
|
||||
<em class="property">property </em><code class="sig-name descname">model</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.attrtype">
|
||||
<em class="property">property </em><code class="sig-name descname">attrtype</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.attrtype" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.date_created">
|
||||
<em class="property">property </em><code class="sig-name descname">date_created</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.date_created" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.lock_storage">
|
||||
<em class="property">property </em><code class="sig-name descname">lock_storage</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -251,6 +186,29 @@ as storing a dbobj which is then deleted elsewhere) out-of-sync.
|
|||
The overhead of unpickling seems hard to avoid.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.access">
|
||||
<code class="sig-name descname">access</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">accessing_obj</span></em>, <em class="sig-param"><span class="n">access_type</span><span class="o">=</span><span class="default_value">'attrread'</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#Attribute.access"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.access" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Determines if another object has permission to access.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>accessing_obj</strong> (<em>object</em>) – Entity trying to access this one.</p></li>
|
||||
<li><p><strong>access_type</strong> (<em>str</em><em>, </em><em>optional</em>) – Type of access sought, see
|
||||
the lock documentation.</p></li>
|
||||
<li><p><strong>default</strong> (<em>bool</em><em>, </em><em>optional</em>) – What result to return if no lock
|
||||
of access_type was found. The default, <strong>False</strong>, means a lockdown
|
||||
policy, only allowing explicit access.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – Not used; here to make the API consistent with
|
||||
other access calls.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>result (bool)</em> – If the lock was passed or not.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.DoesNotExist">
|
||||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -279,18 +237,6 @@ instances.</p>
|
|||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.attrtype">
|
||||
<em class="property">property </em><code class="sig-name descname">attrtype</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.attrtype" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A wrapper for getting database field <strong>db_attrtype</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.category">
|
||||
<em class="property">property </em><code class="sig-name descname">category</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A wrapper for getting database field <strong>db_category</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.channeldb_set">
|
||||
<code class="sig-name descname">channeldb_set</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.channeldb_set" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -307,12 +253,6 @@ instances.</p>
|
|||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.date_created">
|
||||
<em class="property">property </em><code class="sig-name descname">date_created</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.date_created" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A wrapper for getting database field <strong>db_date_created</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.get_next_by_db_date_created">
|
||||
<code class="sig-name descname">get_next_by_db_date_created</code><span class="sig-paren">(</span><em class="sig-param">*</em>, <em class="sig-param">field=<django.db.models.fields.DateTimeField: db_date_created></em>, <em class="sig-param">is_next=True</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.get_next_by_db_date_created" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -330,18 +270,6 @@ class built by <strong>**create_forward_many_to_many_manager()**</strong> define
|
|||
object the first time, the query is executed.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.key">
|
||||
<em class="property">property </em><code class="sig-name descname">key</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A wrapper for getting database field <strong>db_key</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.model">
|
||||
<em class="property">property </em><code class="sig-name descname">model</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A wrapper for getting database field <strong>db_model</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.objectdb_set">
|
||||
<code class="sig-name descname">objectdb_set</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.objectdb_set" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -379,12 +307,6 @@ instances.</p>
|
|||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.strvalue">
|
||||
<em class="property">property </em><code class="sig-name descname">strvalue</code><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.strvalue" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A wrapper for getting database field <strong>db_strvalue</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.typeclasses.attributes.Attribute.typename">
|
||||
<code class="sig-name descname">typename</code><em class="property"> = 'SharedMemoryModelBase'</em><a class="headerlink" href="#evennia.typeclasses.attributes.Attribute.typename" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -392,544 +314,21 @@ class built by <strong>**create_forward_many_to_many_manager()**</strong> define
|
|||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">IAttributeBackend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">attrtype</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend" 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>Abstract interface for the backends used by the Attribute Handler.</p>
|
||||
<p>All Backends must implement this base class.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">attrtype</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.query_all">
|
||||
<code class="sig-name descname">query_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.query_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.query_all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fetch all Attributes from this object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>attrlist (list)</em> – A list of Attribute objects.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.query_key">
|
||||
<code class="sig-name descname">query_key</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.query_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.query_key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The key of the Attribute being searched for.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The category of the desired Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attribute (IAttribute)</em> – A single Attribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.query_category">
|
||||
<code class="sig-name descname">query_category</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">category</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.query_category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.query_category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns every matching Attribute as a list, given a category.</p>
|
||||
<p>This method calls up whatever storage the backend uses.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The category to query.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attrs (list)</em> – The discovered Attributes.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.get">
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.get" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Frontend for .get_cache. Retrieves Attribute(s).</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) – Attribute key to query for</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) – Attribiute category</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>args (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Returns a list of zero or more matches</dt><dd><p>found from cache or database.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.reset_cache">
|
||||
<code class="sig-name descname">reset_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.reset_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.reset_cache" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Reset cache from the outside.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.do_create_attribute">
|
||||
<code class="sig-name descname">do_create_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lockstring</span></em>, <em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">strvalue</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.do_create_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.do_create_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Does the hard work of actually creating Attributes, whatever is needed.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The Attribute’s key.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The Attribute’s category, or None</p></li>
|
||||
<li><p><strong>lockstring</strong> (<em>str</em>) – Any locks for the Attribute.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The Value of the Attribute.</p></li>
|
||||
<li><p><strong>strvalue</strong> (<em>bool</em>) – Signifies if this is a strvalue Attribute. Value MUST be a string or
|
||||
this will lead to Trouble. Ignored for InMemory attributes.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attr (IAttribute)</em> – The new Attribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.create_attribute">
|
||||
<code class="sig-name descname">create_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lockstring</span></em>, <em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">strvalue</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">cache</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.create_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.create_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Creates Attribute (using the class specified for the backend), (optionally) caches it, and returns it.</p>
|
||||
<p>This MUST actively save the Attribute to whatever database backend is used, AND
|
||||
call self.set_cache(key, category, new_attrobj)</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The Attribute’s key.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The Attribute’s category, or None</p></li>
|
||||
<li><p><strong>lockstring</strong> (<em>str</em>) – Any locks for the Attribute.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The Value of the Attribute.</p></li>
|
||||
<li><p><strong>strvalue</strong> (<em>bool</em>) – Signifies if this is a strvalue Attribute. Value MUST be a string or
|
||||
this will lead to Trouble. Ignored for InMemory attributes.</p></li>
|
||||
<li><p><strong>cache</strong> (<em>bool</em>) – Whether to cache the new Attribute</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attr (IAttribute)</em> – The new Attribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.do_update_attribute">
|
||||
<code class="sig-name descname">do_update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.do_update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.do_update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply sets a new Value to an Attribute.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The Attribute being changed.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The Value for the Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.do_batch_update_attribute">
|
||||
<code class="sig-name descname">do_batch_update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr_obj</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lock_storage</span></em>, <em class="sig-param"><span class="n">new_value</span></em>, <em class="sig-param"><span class="n">strvalue</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.do_batch_update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.do_batch_update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Called opnly by batch add. For the database backend, this is a method
|
||||
of updating that can alter category and lock-storage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>attr_obj</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The Attribute being altered.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The attribute’s (new) category.</p></li>
|
||||
<li><p><strong>lock_storage</strong> (<em>str</em>) – The attribute’s new locks.</p></li>
|
||||
<li><p><strong>new_value</strong> (<em>obj</em>) – The Attribute’s new value.</p></li>
|
||||
<li><p><strong>strvalue</strong> (<em>bool</em>) – Signifies if this is a strvalue Attribute. Value MUST be a string or
|
||||
this will lead to Trouble. Ignored for InMemory attributes.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.do_batch_finish">
|
||||
<code class="sig-name descname">do_batch_finish</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr_objs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.do_batch_finish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.do_batch_finish" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Called only by batch_add. Used for handling database operations and/or
|
||||
caching complications.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr_objs</strong> (<em>list of IAttribute</em>) – The Attributes created/updated thus far.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.batch_add">
|
||||
<code class="sig-name descname">batch_add</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.batch_add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.batch_add" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Batch-version of <strong>.add()</strong>. This is more efficient than repeat-calling
|
||||
<strong>.add</strong> when having many Attributes to add.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>*args</strong> (<em>tuple</em>) – <p>Tuples of varying length representing the
|
||||
Attribute to add to this object. Supported tuples are</p>
|
||||
<ul class="simple">
|
||||
<li><p>(key, value)</p></li>
|
||||
<li><p>(key, value, category)</p></li>
|
||||
<li><p>(key, value, category, lockstring)</p></li>
|
||||
<li><p>(key, value, category, lockstring, default_access)</p></li>
|
||||
</ul>
|
||||
</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p><strong>RuntimeError</strong> – If trying to pass a non-iterable as argument.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>The indata tuple order matters, so if you want a lockstring but no
|
||||
category, set the category to <strong>None</strong>. This method does not have the
|
||||
ability to check editing permissions and is mainly used internally.
|
||||
It does not use the normal <strong>self.add</strong> but applies the Attributes
|
||||
directly to the database.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.do_delete_attribute">
|
||||
<code class="sig-name descname">do_delete_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.do_delete_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.do_delete_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Does the hard work of actually deleting things.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The attribute to delete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.delete_attribute">
|
||||
<code class="sig-name descname">delete_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.delete_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.delete_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Given an Attribute, deletes it. Also remove it from cache.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The attribute to delete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.update_attribute">
|
||||
<code class="sig-name descname">update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply updates an Attribute.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The attribute to delete.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The new value.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.do_batch_delete">
|
||||
<code class="sig-name descname">do_batch_delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute_list</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.do_batch_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.do_batch_delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Given a list of attributes, deletes them all.
|
||||
The default implementation is fine, but this is overridable since some databases may allow
|
||||
for a better method.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attribute_list</strong> (<em>list of IAttribute</em>) – </p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.clear_attributes">
|
||||
<code class="sig-name descname">clear_attributes</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">accessing_obj</span></em>, <em class="sig-param"><span class="n">default_access</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.clear_attributes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.clear_attributes" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove all Attributes on this object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) – If given, clear only Attributes
|
||||
of this category.</p></li>
|
||||
<li><p><strong>accessing_obj</strong> (<em>object</em><em>, </em><em>optional</em>) – If given, check the
|
||||
<strong>attredit</strong> lock on each Attribute before continuing.</p></li>
|
||||
<li><p><strong>default_access</strong> (<em>bool</em><em>, </em><em>optional</em>) – Use this permission as
|
||||
fallback if <strong>access_obj</strong> is given but there is no lock of
|
||||
type <strong>attredit</strong> on the Attribute in question.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.IAttributeBackend.get_all_attributes">
|
||||
<code class="sig-name descname">get_all_attributes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#IAttributeBackend.get_all_attributes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.IAttributeBackend.get_all_attributes" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply returns all Attributes of this object, sorted by their IDs.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>attributes (list of IAttribute)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">InMemoryAttributeBackend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">attrtype</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.typeclasses.attributes.IAttributeBackend" title="evennia.typeclasses.attributes.IAttributeBackend"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.attributes.IAttributeBackend</span></code></a></p>
|
||||
<p>This Backend for Attributes stores NOTHING in the database. Everything is kept in memory, and normally lost
|
||||
on a crash, reload, shared memory flush, etc. It generates IDs for the Attributes it manages, but these are
|
||||
of little importance beyond sorting and satisfying the caching logic to know an Attribute hasn’t been
|
||||
deleted out from under the cache’s nose.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">attrtype</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.query_all">
|
||||
<code class="sig-name descname">query_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.query_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.query_all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fetch all Attributes from this object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>attrlist (list)</em> – A list of Attribute objects.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.query_key">
|
||||
<code class="sig-name descname">query_key</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.query_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.query_key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The key of the Attribute being searched for.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The category of the desired Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attribute (IAttribute)</em> – A single Attribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.query_category">
|
||||
<code class="sig-name descname">query_category</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">category</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.query_category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.query_category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns every matching Attribute as a list, given a category.</p>
|
||||
<p>This method calls up whatever storage the backend uses.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The category to query.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attrs (list)</em> – The discovered Attributes.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.do_create_attribute">
|
||||
<code class="sig-name descname">do_create_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lockstring</span></em>, <em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">strvalue</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.do_create_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.do_create_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>See parent class.</p>
|
||||
<p>strvalue has no meaning for InMemory attributes.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.do_update_attribute">
|
||||
<code class="sig-name descname">do_update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.do_update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.do_update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply sets a new Value to an Attribute.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The Attribute being changed.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The Value for the Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.do_batch_update_attribute">
|
||||
<code class="sig-name descname">do_batch_update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr_obj</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lock_storage</span></em>, <em class="sig-param"><span class="n">new_value</span></em>, <em class="sig-param"><span class="n">strvalue</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.do_batch_update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.do_batch_update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>No need to bother saving anything. Just set some values.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.do_batch_finish">
|
||||
<code class="sig-name descname">do_batch_finish</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr_objs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.do_batch_finish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.do_batch_finish" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Nothing to do here for In-Memory.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr_objs</strong> (<em>list of IAttribute</em>) – The Attributes created/updated thus far.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.InMemoryAttributeBackend.do_delete_attribute">
|
||||
<code class="sig-name descname">do_delete_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#InMemoryAttributeBackend.do_delete_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.InMemoryAttributeBackend.do_delete_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Removes the Attribute from local storage. Once it’s out of the cache, garbage collection will handle the rest.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The attribute to delete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">ModelAttributeBackend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">attrtype</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.typeclasses.attributes.IAttributeBackend" title="evennia.typeclasses.attributes.IAttributeBackend"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.attributes.IAttributeBackend</span></code></a></p>
|
||||
<p>Uses Django models for storing Attributes.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">attrtype</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.query_all">
|
||||
<code class="sig-name descname">query_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.query_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.query_all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fetch all Attributes from this object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>attrlist (list)</em> – A list of Attribute objects.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.query_key">
|
||||
<code class="sig-name descname">query_key</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.query_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.query_key" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The key of the Attribute being searched for.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The category of the desired Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attribute (IAttribute)</em> – A single Attribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.query_category">
|
||||
<code class="sig-name descname">query_category</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">category</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.query_category"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.query_category" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns every matching Attribute as a list, given a category.</p>
|
||||
<p>This method calls up whatever storage the backend uses.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The category to query.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attrs (list)</em> – The discovered Attributes.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.do_create_attribute">
|
||||
<code class="sig-name descname">do_create_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lockstring</span></em>, <em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">strvalue</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.do_create_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.do_create_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Does the hard work of actually creating Attributes, whatever is needed.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The Attribute’s key.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The Attribute’s category, or None</p></li>
|
||||
<li><p><strong>lockstring</strong> (<em>str</em>) – Any locks for the Attribute.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The Value of the Attribute.</p></li>
|
||||
<li><p><strong>strvalue</strong> (<em>bool</em>) – Signifies if this is a strvalue Attribute. Value MUST be a string or
|
||||
this will lead to Trouble. Ignored for InMemory attributes.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>attr (IAttribute)</em> – The new Attribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.do_update_attribute">
|
||||
<code class="sig-name descname">do_update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.do_update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.do_update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Simply sets a new Value to an Attribute.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The Attribute being changed.</p></li>
|
||||
<li><p><strong>value</strong> (<em>obj</em>) – The Value for the Attribute.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.do_batch_update_attribute">
|
||||
<code class="sig-name descname">do_batch_update_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr_obj</span></em>, <em class="sig-param"><span class="n">category</span></em>, <em class="sig-param"><span class="n">lock_storage</span></em>, <em class="sig-param"><span class="n">new_value</span></em>, <em class="sig-param"><span class="n">strvalue</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.do_batch_update_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.do_batch_update_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Called opnly by batch add. For the database backend, this is a method
|
||||
of updating that can alter category and lock-storage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>attr_obj</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The Attribute being altered.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em> or </em><em>None</em>) – The attribute’s (new) category.</p></li>
|
||||
<li><p><strong>lock_storage</strong> (<em>str</em>) – The attribute’s new locks.</p></li>
|
||||
<li><p><strong>new_value</strong> (<em>obj</em>) – The Attribute’s new value.</p></li>
|
||||
<li><p><strong>strvalue</strong> (<em>bool</em>) – Signifies if this is a strvalue Attribute. Value MUST be a string or
|
||||
this will lead to Trouble. Ignored for InMemory attributes.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.do_batch_finish">
|
||||
<code class="sig-name descname">do_batch_finish</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr_objs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.do_batch_finish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.do_batch_finish" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Called only by batch_add. Used for handling database operations and/or
|
||||
caching complications.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr_objs</strong> (<em>list of IAttribute</em>) – The Attributes created/updated thus far.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.ModelAttributeBackend.do_delete_attribute">
|
||||
<code class="sig-name descname">do_delete_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#ModelAttributeBackend.do_delete_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.ModelAttributeBackend.do_delete_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Does the hard work of actually deleting things.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>attr</strong> (<a class="reference internal" href="#evennia.typeclasses.attributes.IAttribute" title="evennia.typeclasses.attributes.IAttribute"><em>IAttribute</em></a>) – The attribute to delete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.AttributeHandler">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">AttributeHandler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">backend_class</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#AttributeHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.AttributeHandler" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">AttributeHandler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#AttributeHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.AttributeHandler" 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>Handler for adding Attributes to the object.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.AttributeHandler.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">backend_class</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#AttributeHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.AttributeHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Setup the AttributeHandler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>obj</strong> (<a class="reference internal" href="evennia.typeclasses.models.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><em>TypedObject</em></a>) – An Account, Object, Channel, ServerSession (not technically a typed object), etc.</p></li>
|
||||
<li><p><strong>backend_class</strong> (<em>IAttributeBackend class</em>) – The class of the backend to use.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#AttributeHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.AttributeHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize handler.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.AttributeHandler.reset_cache">
|
||||
<code class="sig-name descname">reset_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#AttributeHandler.reset_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.AttributeHandler.reset_cache" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Reset cache from the outside.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -1150,34 +549,6 @@ Attributes has no lock of type <strong>attrread</strong> defined on them.</p></l
|
|||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.AttributeHandler.reset_cache">
|
||||
<code class="sig-name descname">reset_cache</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#AttributeHandler.reset_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.AttributeHandler.reset_cache" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.DbHolder">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">DbHolder</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">manager_name</span><span class="o">=</span><span class="default_value">'attributes'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#DbHolder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.DbHolder" 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>Holder for allowing property access of attributes</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.DbHolder.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">manager_name</span><span class="o">=</span><span class="default_value">'attributes'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#DbHolder.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.DbHolder.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.DbHolder.get_all">
|
||||
<code class="sig-name descname">get_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#DbHolder.get_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.DbHolder.get_all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.DbHolder.all">
|
||||
<em class="property">property </em><code class="sig-name descname">all</code><a class="headerlink" href="#evennia.typeclasses.attributes.DbHolder.all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
|
|
@ -1199,15 +570,17 @@ matched by the in_template.</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>regex (regex)</em> – Regex to match against strings
|
||||
template (str): Template with markers <strong>**{arg1}, {arg2}**</strong>, etc for
|
||||
replacement using the standard .format method.</p>
|
||||
<dd class="field-even"><p><p><em>(regex, str)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Regex to match against strings and a template</dt><dd><p>Template with markers <strong>{arg1}</strong>, <strong>{arg2}</strong>, etc for
|
||||
replacement using the standard <strong>.format</strong> method.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>evennia.typecalasses.attributes.NickTemplateInvalid</strong> – If the in/out</p></li>
|
||||
<li><p><strong>template does not have a matching number of $args.</strong> – </p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><a class="reference internal" href="#evennia.typeclasses.attributes.NickTemplateInvalid" title="evennia.typeclasses.attributes.NickTemplateInvalid"><strong>attributes.NickTemplateInvalid</strong></a> – If the in/out template does not have a matching
|
||||
number of $args.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -1240,15 +613,7 @@ They also always use the <strong>strvalue</strong> fields for their data.</p>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NickHandler.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NickHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NickHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Setup the AttributeHandler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>obj</strong> (<a class="reference internal" href="evennia.typeclasses.models.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><em>TypedObject</em></a>) – An Account, Object, Channel, ServerSession (not technically a typed object), etc.</p></li>
|
||||
<li><p><strong>backend_class</strong> (<em>IAttributeBackend class</em>) – The class of the backend to use.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dd><p>Initialize handler.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -1361,6 +726,102 @@ with nicks stored on the Account level.</p></li>
|
|||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.attributes.</code><code class="sig-name descname">NAttributeHandler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler" 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 stand-alone handler manages non-database saving.
|
||||
It is similar to <strong>AttributeHandler</strong> and is used
|
||||
by the <strong>.ndb</strong> handler in the same way as <strong>.db</strong> does
|
||||
for the <strong>AttributeHandler</strong>.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initialized on the object</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.has">
|
||||
<code class="sig-name descname">has</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler.has"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.has" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check if object has this attribute or not.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) – The Nattribute key to check.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>has_nattribute (bool)</em> – If Nattribute is set or not.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.get">
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.get" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the named key value.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) – The Nattribute key to get.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>the value of the Nattribute.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.add">
|
||||
<code class="sig-name descname">add</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.add" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add new key and value.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em>) – The name of Nattribute to add.</p></li>
|
||||
<li><p><strong>value</strong> (<em>any</em>) – The value to store.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.remove">
|
||||
<code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.remove" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove Nattribute from storage.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>key</strong> (<em>str</em>) – The name of the Nattribute to remove.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.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/typeclasses/attributes.html#NAttributeHandler.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.clear" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove all NAttributes from handler.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.attributes.NAttributeHandler.all">
|
||||
<code class="sig-name descname">all</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">return_tuples</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/attributes.html#NAttributeHandler.all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.attributes.NAttributeHandler.all" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>List the contents of the handler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>return_tuples</strong> (<em>bool</em><em>, </em><em>optional</em>) – Defines if the Nattributes
|
||||
are returns as a list of keys or as a list of <strong>(key, value)</strong>.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>nattributes (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>A list of keys <strong>[key, key, …]</strong> or a</dt><dd><p>list of tuples <strong>[(key, value), …]</strong> depending on the
|
||||
setting of <strong>return_tuples</strong>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,13 +49,15 @@ all Attributes and TypedObjects).</p>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.managers.TypedObjectManager.get_attribute">
|
||||
<code class="sig-name descname">get_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">value</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">strvalue</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">obj</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">attrtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/managers.html#TypedObjectManager.get_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.managers.TypedObjectManager.get_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return Attribute objects by key, by category, by value, by strvalue, by
|
||||
object (it is stored on) or with a combination of those criteria.</p>
|
||||
<dd><p>Return Attribute objects by key, by category, by value, by
|
||||
<strong>strvalue</strong>, by object (it is stored on) or with a combination of
|
||||
those criteria.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) – The attribute’s key to search for</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) – The category of the attribute(s) to search for.</p></li>
|
||||
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) – The attribute’s key to search for.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) – The category of the attribute(s)
|
||||
to search for.</p></li>
|
||||
<li><p><strong>value</strong> (<em>str</em><em>, </em><em>optional</em>) – The attribute value to search for.
|
||||
Note that this is not a very efficient operation since it
|
||||
will query for a pickled entity. Mutually exclusive to
|
||||
|
|
@ -66,14 +68,14 @@ mutually exclusive to the <strong>value</strong> keyword and will take
|
|||
precedence if given.</p></li>
|
||||
<li><p><strong>obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – On which object the Attribute to
|
||||
search for is.</p></li>
|
||||
<li><p><strong>attrype</strong> (<em>str</em><em>, </em><em>optional</em>) – An attribute-type to search for.
|
||||
<li><p><strong>attrtype</strong> (<em>str</em><em>, </em><em>optional</em>) – An attribute-type to search for.
|
||||
By default this is either <strong>None</strong> (normal Attributes) or
|
||||
<strong>“nick”</strong>.</p></li>
|
||||
<li><p><strong>**kwargs</strong> (<em>any</em>) – Currently unused. Reserved for future use.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>any</em>) – Currently unused. Reserved for future use.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>list</em> – The matching Attributes.</p>
|
||||
<dd class="field-even"><p><em>attributes (list)</em> – The matching Attributes.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -165,7 +167,7 @@ stored on) or with a combination of those criteria.</p>
|
|||
to search for.</p></li>
|
||||
<li><p><strong>obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – On which object the Tag to
|
||||
search for is.</p></li>
|
||||
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) – One of <strong>None</strong> (normal tags),
|
||||
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) – One of None (normal tags),
|
||||
“alias” or “permission”</p></li>
|
||||
<li><p><strong>global_search</strong> (<em>bool</em><em>, </em><em>optional</em>) – Include all possible tags,
|
||||
not just tags on this object</p></li>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ The admin should usually not have to deal directly with the database object
|
|||
layer.</p>
|
||||
<p>This module also contains the Managers for the respective models; inherit from
|
||||
these to create custom managers.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt id="evennia.typeclasses.models.TypedObject">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.typeclasses.models.</code><code class="sig-name descname">TypedObject</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/models.html#TypedObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.models.TypedObject" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -157,10 +158,10 @@ a class based on the db_typeclass_path database field rather
|
|||
than use the one in the model.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>through to parent.</strong> (<em>Passed</em>) – </p>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>through to parent.</strong> (<em>Passed</em>) – </p>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>*args</strong> – Passed through to parent.</p></li>
|
||||
<li><p><strong>**kwargs</strong> – Passed through to parent.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
|
|
@ -366,7 +367,7 @@ superuser lock bypass (be careful with this one).</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>kwar</strong> (<em>any</em>) – Ignored, but is there to make the api
|
||||
<dd class="field-even"><p><strong>kwargs</strong> (<em>any</em>) – Ignored, but is there to make the api
|
||||
consistent with the object-typeclass method access, which
|
||||
use it to feed to its hook methods.</p>
|
||||
</dd>
|
||||
|
|
@ -399,30 +400,36 @@ without involving any locks.</p>
|
|||
<em class="property">property </em><code class="sig-name descname">db</code><a class="headerlink" href="#evennia.typeclasses.models.TypedObject.db" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Attribute handler wrapper. Allows for the syntax</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">obj</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">attrname</span> <span class="o">=</span> <span class="n">value</span>
|
||||
<span class="c1"># and</span>
|
||||
<span class="ow">and</span>
|
||||
<span class="n">value</span> <span class="o">=</span> <span class="n">obj</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">attrname</span>
|
||||
<span class="c1"># and</span>
|
||||
<span class="ow">and</span>
|
||||
<span class="k">del</span> <span class="n">obj</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">attrname</span>
|
||||
<span class="c1"># and</span>
|
||||
<span class="ow">and</span>
|
||||
<span class="n">all_attr</span> <span class="o">=</span> <span class="n">obj</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
|
||||
<span class="c1"># (unless there is an attribute</span>
|
||||
<span class="c1"># named 'all', in which case that will be returned instead).</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>(unless there is an attribute named ‘all’, in which case that will be
|
||||
returned instead).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.models.TypedObject.ndb">
|
||||
<em class="property">property </em><code class="sig-name descname">ndb</code><a class="headerlink" href="#evennia.typeclasses.models.TypedObject.ndb" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>NonDataBase). Everything stored
|
||||
to this is guaranteed to be cleared when a server is shutdown.
|
||||
Syntax is same as for the _get_db_holder() method and
|
||||
property, e.g. obj.ndb.attr = value etc.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Type</dt>
|
||||
<dd class="field-odd"><p>A non-attr_obj store (ndb</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dd><p>A non-attr_obj store (NonDataBase). Everything stored to this is
|
||||
guaranteed to be cleared when a server is shutdown. Syntax is same as
|
||||
for the <strong>.db</strong> property, e.g.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">obj</span><span class="o">.</span><span class="n">ndb</span><span class="o">.</span><span class="n">attrname</span> <span class="o">=</span> <span class="n">value</span>
|
||||
<span class="ow">and</span>
|
||||
<span class="n">value</span> <span class="o">=</span> <span class="n">obj</span><span class="o">.</span><span class="n">ndb</span><span class="o">.</span><span class="n">attrname</span>
|
||||
<span class="ow">and</span>
|
||||
<span class="k">del</span> <span class="n">obj</span><span class="o">.</span><span class="n">ndb</span><span class="o">.</span><span class="n">attrname</span>
|
||||
<span class="ow">and</span>
|
||||
<span class="n">all_attr</span> <span class="o">=</span> <span class="n">obj</span><span class="o">.</span><span class="n">ndb</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>What makes this preferable over just assigning properties directly on
|
||||
the object is that Evennia can track caching for these properties and
|
||||
for example avoid wiping objects with set <strong>.ndb</strong> data on cache flushes.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -509,22 +516,27 @@ at/getting information for this object.</p>
|
|||
<em class="property">classmethod </em><code class="sig-name descname">web_get_create_url</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/models.html#TypedObject.web_get_create_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.models.TypedObject.web_get_create_url" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns the URI path for a View that allows users to create new
|
||||
instances of this object.</p>
|
||||
<p>ex. Chargen = ‘/characters/create/’</p>
|
||||
<p>For this to work, the developer must have defined a named view somewhere
|
||||
in urls.py that follows the format ‘modelname-action’, so in this case
|
||||
a named view of ‘character-create’ would be referenced by this method.</p>
|
||||
<p>ex.
|
||||
url(r’characters/create/’, ChargenView.as_view(), name=’character-create’)</p>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can create new objects is the
|
||||
developer’s responsibility.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>path (str)</em> – URI path to object creation page, if defined.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Chargen</span> <span class="o">=</span> <span class="s1">'/characters/create/'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For this to work, the developer must have defined a named view somewhere
|
||||
in urls.py that follows the format ‘modelname-action’, so in this case
|
||||
a named view of ‘character-create’ would be referenced by this method.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">url</span><span class="p">(</span><span class="sa">r</span><span class="s1">'characters/create/'</span><span class="p">,</span> <span class="n">ChargenView</span><span class="o">.</span><span class="n">as_view</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s1">'character-create'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can create new objects is the
|
||||
developer’s responsibility.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -544,12 +556,12 @@ this object.</p>
|
|||
<p>For this to work, the developer must have defined a named view somewhere
|
||||
in urls.py that follows the format ‘modelname-action’, so in this case
|
||||
a named view of ‘character-detail’ would be referenced by this method.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">url</span><span class="p">(</span><span class="sa">r</span><span class="s1">'characters/(?P<slug>[\w\d\-]+)/(?P<pk>[0-9]+)/$'</span><span class="p">,</span>
|
||||
<span class="n">CharDetailView</span><span class="o">.</span><span class="n">as_view</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s1">'character-detail'</span><span class="p">)</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">CharDetailView</span><span class="o">.</span><span class="n">as_view</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s1">'character-detail'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can view this object is the
|
||||
developer’s responsibility.</p>
|
||||
|
|
@ -562,7 +574,7 @@ developer’s responsibility.</p>
|
|||
object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>str</em> – URI path to object puppet page, if defined.</p>
|
||||
<dd class="field-odd"><p><em>path (str)</em> – URI path to object puppet page, if defined.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
|
|
@ -578,6 +590,7 @@ a named view of ‘character-puppet’ would be referenced by this method.</p>
|
|||
</div>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can view this object is the developer’s
|
||||
responsibility.</p>
|
||||
|
|
@ -590,7 +603,7 @@ responsibility.</p>
|
|||
object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>str</em> – URI path to object update page, if defined.</p>
|
||||
<dd class="field-odd"><p><em>path (str)</em> – URI path to object update page, if defined.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
|
|
@ -606,6 +619,7 @@ a named view of ‘character-update’ would be referenced by this method.</p>
|
|||
</div>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can modify objects is the developer’s
|
||||
responsibility.</p>
|
||||
|
|
@ -624,19 +638,19 @@ responsibility.</p>
|
|||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Oscar</span> <span class="p">(</span><span class="n">Character</span><span class="p">)</span> <span class="o">=</span> <span class="s1">'/characters/oscar/1/delete/'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For this to work, the developer must have defined a named view
|
||||
somewhere in urls.py that follows the format ‘modelname-action’, so
|
||||
in this case a named view of ‘character-detail’ would be referenced
|
||||
by this method.</p>
|
||||
<p>For this to work, the developer must have defined a named view somewhere
|
||||
in urls.py that follows the format ‘modelname-action’, so in this case
|
||||
a named view of ‘character-detail’ would be referenced by this method.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">url</span><span class="p">(</span><span class="sa">r</span><span class="s1">'characters/(?P<slug>[\w\d\-]+)/(?P<pk>[0-9]+)/delete/$'</span><span class="p">,</span>
|
||||
<span class="n">CharDeleteView</span><span class="o">.</span><span class="n">as_view</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s1">'character-delete'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If no View has been created and defined in urls.py, returns an HTML
|
||||
anchor.</p>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can delete this object is the
|
||||
developer’s responsibility.</p>
|
||||
the actual view and limiting who can delete this object is the developer’s
|
||||
responsibility.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -662,12 +676,12 @@ this object.</p>
|
|||
<p>For this to work, the developer must have defined a named view somewhere
|
||||
in urls.py that follows the format ‘modelname-action’, so in this case
|
||||
a named view of ‘character-detail’ would be referenced by this method.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">url</span><span class="p">(</span><span class="sa">r</span><span class="s1">'characters/(?P<slug>[\w\d\-]+)/(?P<pk>[0-9]+)/$'</span><span class="p">,</span>
|
||||
<span class="n">CharDetailView</span><span class="o">.</span><span class="n">as_view</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s1">'character-detail'</span><span class="p">)</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">CharDetailView</span><span class="o">.</span><span class="n">as_view</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s1">'character-detail'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If no View has been created and defined in urls.py, returns an
|
||||
HTML anchor.</p>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is naive and simply returns a path. Securing access to
|
||||
the actual view and limiting who can view this object is the
|
||||
developer’s responsibility.</p>
|
||||
|
|
|
|||
|
|
@ -269,33 +269,6 @@ existing Tag object, this will be re-used and no new Tag
|
|||
will be created.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.tags.TagHandler.has">
|
||||
<code class="sig-name descname">has</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">tag</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">return_list</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/tags.html#TagHandler.has"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.tags.TagHandler.has" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks if the given Tag (or list of Tags) exists on the object.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>tag</strong> (<em>str</em><em> or </em><em>iterable</em>) – The Tag key or tags to check for.
|
||||
If <strong>None</strong>, search by category.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) – Limit the check to Tags with this
|
||||
category (note, that <strong>None</strong> is the default category).</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>has_tag (bool or list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>If the Tag exists on this object or not.</dt><dd><p>If <strong>tag</strong> was given as an iterable then the return is a list of booleans.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><p><strong>ValueError</strong> – If neither <strong>tag</strong> nor <strong>category</strong> is given.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.typeclasses.tags.TagHandler.get">
|
||||
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">return_tagobj</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">return_list</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/typeclasses/tags.html#TagHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.typeclasses.tags.TagHandler.get" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -39,25 +39,24 @@
|
|||
<div class="section" id="module-evennia.utils.ansi">
|
||||
<span id="evennia-utils-ansi"></span><h1>evennia.utils.ansi<a class="headerlink" href="#module-evennia.utils.ansi" title="Permalink to this headline">¶</a></h1>
|
||||
<p>ANSI - Gives colour to text.</p>
|
||||
<p>Use the codes defined in ANSIPARSER in your text
|
||||
to apply colour to text according to the ANSI standard.</p>
|
||||
<p>Examples:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s2">"This is |rRed text|n and this is normal again."</span>
|
||||
<p>Use the codes defined in ANSIPARSER in your text to apply colour to text
|
||||
according to the ANSI standard.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">This</span> <span class="ow">is</span> <span class="o">|</span><span class="n">rRed</span> <span class="n">text</span><span class="o">|</span><span class="n">n</span> <span class="ow">and</span> <span class="n">this</span> <span class="ow">is</span> <span class="n">normal</span> <span class="n">again</span><span class="o">.</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Mostly you should not need to call <strong>parse_ansi()</strong> explicitly;
|
||||
it is run by Evennia just before returning data to/from the
|
||||
user. Depreciated example forms are available by extending
|
||||
the ansi mapping.</p>
|
||||
<p>Mostly you should not need to call <strong>parse_ansi()</strong> explicitly; it is run by
|
||||
Evennia just before returning data to/from the user. Depreciated/decativated
|
||||
example forms are available in contribs by extending the ansi mapping</p>
|
||||
<p>This module also contains the <strong>ANSIString</strong> custom string-type, which correctly
|
||||
wraps/manipulates and tracks lengths of strings containing ANSI-markup.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt id="evennia.utils.ansi.ANSIParser">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.utils.ansi.</code><code class="sig-name descname">ANSIParser</code><a class="reference internal" href="../_modules/evennia/utils/ansi.html#ANSIParser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.ansi.ANSIParser" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>A class that parses ANSI markup
|
||||
to ANSI command sequences</p>
|
||||
<p>We also allow to escape colour codes
|
||||
by prepending with a for xterm256,
|
||||
an extra | for Merc-style codes</p>
|
||||
<p>A class that parses ANSI markup to ANSI command sequences</p>
|
||||
<p>We also allow to escape colour codes by prepending with
|
||||
an extra <strong>|</strong>, so <strong>||r</strong> will literally print <strong>|r</strong>.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.ansi.ANSIParser.ansi_map">
|
||||
<code class="sig-name descname">ansi_map</code><em class="property"> = [('|n', '\x1b[0m'), ('|/', '\r\n'), ('|-', '\t'), ('|_', ' '), ('|*', '\x1b[7m'), ('|^', '\x1b[5m'), ('|u', '\x1b[4m'), ('|r', '\x1b[1m\x1b[31m'), ('|g', '\x1b[1m\x1b[32m'), ('|y', '\x1b[1m\x1b[33m'), ('|b', '\x1b[1m\x1b[34m'), ('|m', '\x1b[1m\x1b[35m'), ('|c', '\x1b[1m\x1b[36m'), ('|w', '\x1b[1m\x1b[37m'), ('|x', '\x1b[1m\x1b[30m'), ('|R', '\x1b[22m\x1b[31m'), ('|G', '\x1b[22m\x1b[32m'), ('|Y', '\x1b[22m\x1b[33m'), ('|B', '\x1b[22m\x1b[34m'), ('|M', '\x1b[22m\x1b[35m'), ('|C', '\x1b[22m\x1b[36m'), ('|W', '\x1b[22m\x1b[37m'), ('|X', '\x1b[22m\x1b[30m'), ('|h', '\x1b[1m'), ('|H', '\x1b[22m'), ('|!R', '\x1b[31m'), ('|!G', '\x1b[32m'), ('|!Y', '\x1b[33m'), ('|!B', '\x1b[34m'), ('|!M', '\x1b[35m'), ('|!C', '\x1b[36m'), ('|!W', '\x1b[37m'), ('|!X', '\x1b[30m'), ('|[R', '\x1b[41m'), ('|[G', '\x1b[42m'), ('|[Y', '\x1b[43m'), ('|[B', '\x1b[44m'), ('|[M', '\x1b[45m'), ('|[C', '\x1b[46m'), ('|[W', '\x1b[47m'), ('|[X', '\x1b[40m')]</em><a class="headerlink" href="#evennia.utils.ansi.ANSIParser.ansi_map" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -418,9 +417,15 @@ occurrence of the separator rather than the first.</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>ANSIString</em> – The part of the string before the separator
|
||||
ANSIString: The separator itself
|
||||
ANSIString: The part of the string after the separator.</p>
|
||||
<dd class="field-even"><p><p><em>result (tuple)</em> –</p>
|
||||
<ul class="simple">
|
||||
<li><p>prefix (ANSIString): The part of the string before the
|
||||
separator</p></li>
|
||||
<li><p>sep (ANSIString): The separator itself</p></li>
|
||||
<li><p>postfix (ANSIString): The part of the string after the
|
||||
separator.</p></li>
|
||||
</ul>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
@ -766,15 +771,12 @@ left untouched. Characters mapped to None are deleted.</p>
|
|||
<code class="sig-name descname">join</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">iterable</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/ansi.html#ANSIString.join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.ansi.ANSIString.join" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Joins together strings in an iterable, using this string between each
|
||||
one.</p>
|
||||
<p>NOTE: This should always be used for joining strings when ANSIStrings
|
||||
are involved. Otherwise color information will be discarded by python,
|
||||
due to details in the C implementation of strings.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>iterable</strong> (<em>list of strings</em>) – A list of strings to join together</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>ANSIString</em> –</p>
|
||||
<dd class="field-even"><p><p><em>result (ANSIString)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>A single string with all of the iterable’s</dt><dd><p>contents concatenated, with this string between each.</p>
|
||||
</dd>
|
||||
|
|
@ -783,10 +785,18 @@ due to details in the C implementation of strings.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">ANSIString</span><span class="p">(</span><span class="s1">', '</span><span class="p">)</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="s1">'up'</span><span class="p">,</span> <span class="s1">'right'</span><span class="p">,</span> <span class="s1">'left'</span><span class="p">,</span> <span class="s1">'down'</span><span class="p">])</span>
|
||||
<span class="go">ANSIString('up, right, left, down')</span>
|
||||
<dl class="simple">
|
||||
<dt>::</dt><dd><p>ANSIString(‘, ‘).join([‘up’, ‘right’, ‘left’, ‘down’])</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Would return</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ANSIString</span><span class="p">(</span><span class="s1">'up, right, left, down'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This should always be used for joining strings when ANSIStrings are
|
||||
involved. Otherwise color information will be discarded by python,
|
||||
due to details in the C implementation of strings.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
|
|||
|
|
@ -39,21 +39,23 @@
|
|||
<div class="section" id="module-evennia.utils.batchprocessors">
|
||||
<span id="evennia-utils-batchprocessors"></span><h1>evennia.utils.batchprocessors<a class="headerlink" href="#module-evennia.utils.batchprocessors" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This module contains the core methods for the Batch-command- and
|
||||
Batch-code-processors respectively. In short, these are two different ways to
|
||||
build a game world using a normal text-editor without having to do so ‘on the
|
||||
fly’ in-game. They also serve as an automatic backup so you can quickly
|
||||
recreate a world also after a server reset. The functions in this module is
|
||||
meant to form the backbone of a system called and accessed through game
|
||||
commands.</p>
|
||||
<p>The Batch-command processor is the simplest. It simply runs a list of in-game
|
||||
commands in sequence by reading them from a text file. The advantage of this is
|
||||
that the builder only need to remember the normal in-game commands. They are
|
||||
also executing with full permission checks etc, making it relatively safe for
|
||||
builders to use. The drawback is that in-game there is really a
|
||||
builder-character walking around building things, and it can be important to
|
||||
create rooms and objects in the right order, so the character can move between
|
||||
them. Also objects that affects players (such as mobs, dark rooms etc) will
|
||||
affect the building character too, requiring extra care to turn off/on.</p>
|
||||
Batch-code-processors respectively. In short, these are two different
|
||||
ways to build a game world using a normal text-editor without having
|
||||
to do so ‘on the fly’ in-game. They also serve as an automatic backup
|
||||
so you can quickly recreate a world also after a server reset. The
|
||||
functions in this module is meant to form the backbone of a system
|
||||
called and accessed through game commands.</p>
|
||||
<p>The Batch-command processor is the simplest. It simply runs a list of
|
||||
in-game commands in sequence by reading them from a text file. The
|
||||
advantage of this is that the builder only need to remember the normal
|
||||
in-game commands. They are also executing with full permission checks
|
||||
etc, making it relatively safe for builders to use. The drawback is
|
||||
that in-game there is really a builder-character walking around
|
||||
building things, and it can be important to create rooms and objects
|
||||
in the right order, so the character can move between them. Also
|
||||
objects that affects players (such as mobs, dark rooms etc) will
|
||||
affect the building character too, requiring extra care to turn
|
||||
off/on.</p>
|
||||
<p>The Batch-code processor is a more advanced system that accepts full
|
||||
Python code, executing in chunks. The advantage of this is much more
|
||||
power; practically anything imaginable can be coded and handled using
|
||||
|
|
@ -66,38 +68,33 @@ etc. You also need to know Python and Evennia’s API. Hence it’s
|
|||
recommended that the batch-code processor is limited only to
|
||||
superusers or highly trusted staff.</p>
|
||||
<div class="section" id="batch-command-processor-file-syntax">
|
||||
<h2>Batch-command processor file syntax<a class="headerlink" href="#batch-command-processor-file-syntax" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Batch-Command processor file syntax<a class="headerlink" href="#batch-command-processor-file-syntax" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The batch-command processor accepts ‘batchcommand files’ e.g
|
||||
<strong>batch.ev</strong>, containing a sequence of valid Evennia commands in a
|
||||
simple format. The engine runs each command in sequence, as if they
|
||||
had been run at the game prompt.</p>
|
||||
<p>Each Evennia command must be delimited by a line comment to mark its
|
||||
end.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">look</span>
|
||||
<span class="c1"># delimiting comment</span>
|
||||
<span class="n">create</span><span class="o">/</span><span class="n">drop</span> <span class="n">box</span>
|
||||
<span class="c1"># another required comment</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>One can also inject another batchcmdfile:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#INSERT path.batchcmdfile</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This way entire game worlds can be created and planned offline; it is
|
||||
end. This way entire game worlds can be created and planned offline; it is
|
||||
especially useful in order to create long room descriptions where a
|
||||
real offline text editor is often much better than any online text
|
||||
editor or prompt.</p>
|
||||
<div class="section" id="example-of-batch-ev-file">
|
||||
<h3>Example of batch.ev file:<a class="headerlink" href="#example-of-batch-ev-file" title="Permalink to this headline">¶</a></h3>
|
||||
<p>There is only one batchcommand-specific entry to use in a batch-command
|
||||
files (all others are just like in-game commands):</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>#INSERT path.batchcmdfile</strong> - this as the first entry on a line will
|
||||
import and run a batch.ev file in this position, as if it was
|
||||
written in this file.</p></li>
|
||||
</ul>
|
||||
<p>Example of batch.ev file:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># batch file</span>
|
||||
<span class="c1"># all lines starting with # are comments; they also indicate</span>
|
||||
<span class="c1"># that a command definition is over.</span>
|
||||
|
||||
<span class="n">create</span> <span class="n">box</span>
|
||||
<span class="nd">@create</span> <span class="n">box</span>
|
||||
|
||||
<span class="c1"># this comment ends the @create command.</span>
|
||||
|
||||
<span class="nb">set</span> <span class="n">box</span><span class="o">/</span><span class="n">desc</span> <span class="o">=</span> <span class="n">A</span> <span class="n">large</span> <span class="n">box</span><span class="o">.</span>
|
||||
<span class="nd">@set</span> <span class="n">box</span><span class="o">/</span><span class="n">desc</span> <span class="o">=</span> <span class="n">A</span> <span class="n">large</span> <span class="n">box</span><span class="o">.</span>
|
||||
|
||||
<span class="n">Inside</span> <span class="n">are</span> <span class="n">some</span> <span class="n">scattered</span> <span class="n">piles</span> <span class="n">of</span> <span class="n">clothing</span><span class="o">.</span>
|
||||
|
||||
|
|
@ -110,25 +107,24 @@ editor or prompt.</p>
|
|||
|
||||
<span class="c1"># (so two empty lines becomes a new paragraph).</span>
|
||||
|
||||
<span class="n">teleport</span> <span class="c1">#221</span>
|
||||
<span class="nd">@teleport</span> <span class="c1">#221</span>
|
||||
|
||||
<span class="c1"># (Assuming #221 is a warehouse or something.)</span>
|
||||
<span class="c1"># (remember, this comment ends the @teleport command! Don'f forget it)</span>
|
||||
|
||||
<span class="c1"># Example of importing another file at this point.</span>
|
||||
<span class="c1">#IMPORT examples.batch</span>
|
||||
<span class="c1">#INSERT examples.batch</span>
|
||||
|
||||
<span class="n">drop</span> <span class="n">box</span>
|
||||
<span class="nd">@drop</span> <span class="n">box</span>
|
||||
|
||||
<span class="c1"># Done, the box is in the warehouse! (this last comment is not necessary to</span>
|
||||
<span class="c1"># close the drop command since it's the end of the file)</span>
|
||||
<span class="c1"># close the @drop command since it's the end of the file)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An example batch file is <strong>contrib/examples/batch_example.ev</strong>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="batch-code-processor-file-syntax">
|
||||
<h2>Batch-code processor file syntax<a class="headerlink" href="#batch-code-processor-file-syntax" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Batch-Code processor file syntax<a class="headerlink" href="#batch-code-processor-file-syntax" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The Batch-code processor accepts full python modules (e.g. <strong>batch.py</strong>)
|
||||
that looks identical to normal Python files. The difference from
|
||||
importing and running any Python module is that the batch-code module
|
||||
|
|
@ -159,17 +155,13 @@ this file.</p></li>
|
|||
<p>Importing works as normal. The following variables are automatically
|
||||
made available in the script namespace.</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>caller</strong> - The object executing the batchscript</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt><strong>DEBUG</strong> - This is a boolean marking if the batchprocessor is running</dt><dd><p>in debug mode. It can be checked to e.g. delete created objects
|
||||
<li><p><strong>caller</strong> - The object executing the batchscript</p></li>
|
||||
<li><p><strong>DEBUG</strong> - This is a boolean marking if the batchprocessor is running
|
||||
in debug mode. It can be checked to e.g. delete created objects
|
||||
when running a CODE block multiple times during testing.
|
||||
(avoids creating a slew of same-named db objects)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
(avoids creating a slew of same-named db objects)</p></li>
|
||||
</ul>
|
||||
<div class="section" id="example-batch-py-file">
|
||||
<h3>Example batch.py file<a class="headerlink" href="#example-batch-py-file" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Example batch.py file:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#HEADER</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="k">import</span> <span class="n">settings</span>
|
||||
|
|
@ -197,6 +189,7 @@ when running a CODE block multiple times during testing.
|
|||
<span class="n">script</span> <span class="o">=</span> <span class="n">create</span><span class="o">.</span><span class="n">create_script</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<hr class="docutils" />
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.batchprocessors.read_batchfile">
|
||||
<code class="sig-prename descclassname">evennia.utils.batchprocessors.</code><code class="sig-name descname">read_batchfile</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pythonpath</span></em>, <em class="sig-param"><span class="n">file_ending</span><span class="o">=</span><span class="default_value">'.py'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/batchprocessors.html#read_batchfile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.batchprocessors.read_batchfile" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -213,7 +206,7 @@ or .py). The ending should not be included in the python path.</p>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>text (str)</em> – The text content of the batch file.</p>
|
||||
<dd class="field-even"><p><em>str</em> – The text content of the batch file.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><p><strong>IOError</strong> – If problems reading file.</p>
|
||||
|
|
@ -229,22 +222,13 @@ or .py). The ending should not be included in the python path.</p>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.utils.batchprocessors.BatchCommandProcessor.parse_file">
|
||||
<code class="sig-name descname">parse_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pythonpath</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/batchprocessors.html#BatchCommandProcessor.parse_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.batchprocessors.BatchCommandProcessor.parse_file" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This parses the lines of a batch-command-file.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>pythonpath</strong> (<em>str</em>) – The dot-python path to the file.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>list</em> – A list of all parsed commands with arguments, as strings.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>Parsing follows the following rules:</p>
|
||||
<dd><p>This parses the lines of a batchfile according to the following
|
||||
rules:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>A <strong>#</strong> at the beginning of a line marks the end of the command before
|
||||
<li><p><strong>#</strong> at the beginning of a line marks the end of the command before
|
||||
it. It is also a comment and any number of # can exist on
|
||||
subsequent lines (but not inside comments).</p></li>
|
||||
<li><p>#INSERT at the beginning of a line imports another
|
||||
<li><p><strong>#INSERT</strong> at the beginning of a line imports another
|
||||
batch-cmd file file and pastes it into the batch file as if
|
||||
it was written there.</p></li>
|
||||
<li><p>Commands are placed alone at the beginning of a line and their
|
||||
|
|
@ -279,28 +263,30 @@ a newline (so two empty lines is a paragraph).</p></li>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.utils.batchprocessors.BatchCodeProcessor.parse_file">
|
||||
<code class="sig-name descname">parse_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pythonpath</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/batchprocessors.html#BatchCodeProcessor.parse_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.batchprocessors.BatchCodeProcessor.parse_file" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This parses the lines of a batch-code file</p>
|
||||
<dd><p>This parses the lines of a batchfile according to the following
|
||||
rules:</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>pythonpath</strong> (<em>str</em>) – The dot-python path to the file.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>list</em> –</p>
|
||||
<dd class="field-even"><p><p><em>codeblocks (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>A list of all <strong>#CODE</strong> blocks, each with</dt><dd><p>prepended <strong>#HEADER</strong> block data. If no <strong>#CODE</strong>
|
||||
blocks were found, this will be a list of one element
|
||||
containing all code in the file (so a normal Python file).</p>
|
||||
<dt>A list of all #CODE blocks, each with</dt><dd><p>prepended #HEADER data. If no #CODE blocks were found,
|
||||
this will be a list of one element.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>Parsing is done according to the following rules:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Code before a #CODE/HEADER block are considered part of
|
||||
the first code/header block or is the ONLY block if no
|
||||
<strong>#CODE/HEADER</strong> blocks are defined.</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>Code before a #CODE/HEADER block are considered part of</dt><dd><p>the first code/header block or is the ONLY block if no
|
||||
#CODE/HEADER blocks are defined.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>Lines starting with #HEADER starts a header block (ends other blocks)</p></li>
|
||||
<li><p>Lines starting with #CODE begins a code block (ends other blocks)</p></li>
|
||||
<li><p>Lines starting with #INSERT are on form #INSERT filename. Code from
|
||||
|
|
@ -333,7 +319,6 @@ namespace.</p></li>
|
|||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -360,14 +345,8 @@ namespace.</p></li>
|
|||
<p><h3><a href="../index.html">Table of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">evennia.utils.batchprocessors</a><ul>
|
||||
<li><a class="reference internal" href="#batch-command-processor-file-syntax">Batch-command processor file syntax</a><ul>
|
||||
<li><a class="reference internal" href="#example-of-batch-ev-file">Example of batch.ev file:</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#batch-code-processor-file-syntax">Batch-code processor file syntax</a><ul>
|
||||
<li><a class="reference internal" href="#example-batch-py-file">Example batch.py file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#batch-command-processor-file-syntax">Batch-Command processor file syntax</a></li>
|
||||
<li><a class="reference internal" href="#batch-code-processor-file-syntax">Batch-Code processor file syntax</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -38,15 +38,25 @@
|
|||
|
||||
<div class="section" id="module-evennia.utils.create">
|
||||
<span id="evennia-utils-create"></span><h1>evennia.utils.create<a class="headerlink" href="#module-evennia.utils.create" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This module gathers all the essential database-creation functions for the game
|
||||
engine’s various object types.</p>
|
||||
<p>Only objects created ‘stand-alone’ are in here. E.g. object Attributes are
|
||||
always created through their respective objects handlers.</p>
|
||||
<p>Each <strong>creation_*</strong> function also has an alias named for the entity being created,
|
||||
such as create_object() and object(). This is for consistency with the
|
||||
utils.search module and allows you to do the shorter <strong>create.object()</strong>.</p>
|
||||
<p>The respective object managers hold more methods for manipulating and searching
|
||||
objects already existing in the database.</p>
|
||||
<p>This module gathers all the essential database-creation
|
||||
functions for the game engine’s various object types.</p>
|
||||
<p>Only objects created ‘stand-alone’ are in here, e.g. object Attributes
|
||||
are always created directly through their respective objects.</p>
|
||||
<p>Each creation_* function also has an alias named for the entity being
|
||||
created, such as create_object() and object(). This is for
|
||||
consistency with the utils.search module and allows you to do the
|
||||
shorter “create.object()”.</p>
|
||||
<p>The respective object managers hold more methods for manipulating and
|
||||
searching objects already existing in the database.</p>
|
||||
<dl class="simple">
|
||||
<dt>Models covered:</dt><dd><p>Objects
|
||||
Scripts
|
||||
Help
|
||||
Message
|
||||
Channel
|
||||
Accounts</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.create.create_object">
|
||||
<code class="sig-prename descclassname">evennia.utils.create.</code><code class="sig-name descname">create_object</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">location</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">home</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">permissions</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">locks</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">aliases</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">destination</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">report_to</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nohome</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">attributes</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">nattributes</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/create.html#create_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.create.create_object" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -56,14 +66,15 @@ objects already existing in the database.</p>
|
|||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>typeclass</strong> (<em>class</em><em> or </em><em>str</em>) – Class or python path to a typeclass.</p></li>
|
||||
<li><p><strong>key</strong> (<em>str</em>) – Name of the new object. If not set, a name of
|
||||
<strong>#dbref</strong> will be set.</p></li>
|
||||
#dbref will be set.</p></li>
|
||||
<li><p><strong>home</strong> (<em>Object</em><em> or </em><em>str</em>) – Obj or #dbref to use as the object’s
|
||||
home location.</p></li>
|
||||
<li><p><strong>permissions</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – A list of permission strings or tuples (permstring, category).</p></li>
|
||||
<li><p><strong>locks</strong> (<em>str</em>) – one or more lockstrings, separated by semicolons.</p></li>
|
||||
<li><p><strong>aliases</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – A list of alternative keys or tuples (aliasstring, category).</p></li>
|
||||
<li><p><strong>tags</strong> (<a class="reference internal" href="evennia.contrib.barter.html#evennia.contrib.barter.TradeHandler.list" title="evennia.contrib.barter.TradeHandler.list"><em>list</em></a>) – List of tag keys or tuples (tagkey, category) or (tagkey, category, data).</p></li>
|
||||
<li><p><strong>destination</strong> (<em>Object</em><em> or </em><em>str</em>) – Obj or #dbref to use as an Exit’s target.</p></li>
|
||||
<li><p><strong>destination</strong> (<em>Object</em><em> or </em><em>str</em>) – Obj or #dbref to use as an Exit’s
|
||||
target.</p></li>
|
||||
<li><p><strong>report_to</strong> (<em>Object</em>) – The object to return error messages to.</p></li>
|
||||
<li><p><strong>nohome</strong> (<em>bool</em>) – This allows the creation of objects without a
|
||||
default home location; only used when creating the default
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ will save to when they update. It must have a ‘value’ property
|
|||
that saves assigned data to the database. Skip if not
|
||||
serializing onto a given object. If db_obj is given, this
|
||||
function will convert lists, dicts and sets to their
|
||||
_SaverList, _SaverDict and _SaverSet counterparts.</p></li>
|
||||
<strong>_SaverList</strong>, <strong>_SaverDict</strong> and <strong>_SaverSet</strong> counterparts.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
|
|
|
|||
|
|
@ -39,39 +39,47 @@
|
|||
<div class="section" id="module-evennia.utils.eveditor">
|
||||
<span id="evennia-utils-eveditor"></span><h1>evennia.utils.eveditor<a class="headerlink" href="#module-evennia.utils.eveditor" title="Permalink to this headline">¶</a></h1>
|
||||
<p>EvEditor (Evennia Line Editor)</p>
|
||||
<p>This implements an advanced line editor for editing longer texts in-game. The
|
||||
editor mimics the command mechanisms of the “VI” editor (a famous line-by-line
|
||||
editor) as far as reasonable.</p>
|
||||
<p>This implements an advanced line editor for editing longer texts
|
||||
in-game. The editor mimics the command mechanisms of the “VI” editor
|
||||
(a famous line-by-line editor) as far as reasonable.</p>
|
||||
<p>Features of the editor:</p>
|
||||
<ul class="simple">
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><p>undo/redo.</p></li>
|
||||
<li><p>edit/replace on any line of the buffer.</p></li>
|
||||
<li><p>search&replace text anywhere in buffer.</p></li>
|
||||
<li><p>formatting of buffer, or selection, to certain width + indentations.</p></li>
|
||||
<li><p>allow to echo the input or not, depending on your client.</p></li>
|
||||
<li><p>in-built help</p></li>
|
||||
</ul>
|
||||
<p>To use the editor, just import EvEditor from this module and initialize it:</p>
|
||||
</div></blockquote>
|
||||
<p>To use the editor, just import EvEditor from this module
|
||||
and initialize it:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia.utils.eveditor</span> <span class="k">import</span> <span class="n">EvEditor</span>
|
||||
|
||||
<span class="c1"># set up an editor to edit the caller's 'desc' Attribute</span>
|
||||
<span class="k">def</span> <span class="nf">_loadfunc</span><span class="p">(</span><span class="n">caller</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">caller</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">desc</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_savefunc</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">buffer</span><span class="p">):</span>
|
||||
<span class="n">caller</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">desc</span> <span class="o">=</span> <span class="n">buffer</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
|
||||
<span class="k">return</span> <span class="kc">True</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_quitfunc</span><span class="p">(</span><span class="n">caller</span><span class="p">):</span>
|
||||
<span class="n">caller</span><span class="o">.</span><span class="n">msg</span><span class="p">(</span><span class="s2">"Custom quit message"</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># start the editor</span>
|
||||
<span class="n">EvEditor</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">loadfunc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">savefunc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">quitfunc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">""</span><span class="p">,</span>
|
||||
<span class="n">persistent</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">code</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="n">EvEditor</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">loadfunc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">savefunc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">quitfunc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s2">""</span><span class="p">,</span> <span class="n">persistent</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The editor can also be used to format Python code and be made to
|
||||
survive a reload. See the <strong>EvEditor</strong> class for more details.</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>caller</strong> is the user of the editor, the one to see all feedback.</p></li>
|
||||
<li><p><strong>loadfunc(caller)</strong> is called when the editor is first launched; the
|
||||
return from this function is loaded as the starting buffer in the
|
||||
editor.</p></li>
|
||||
<li><p><strong>safefunc(caller, buffer)</strong> is called with the current buffer when
|
||||
saving in the editor. The function should return True/False depending
|
||||
on if the saving was successful or not.</p></li>
|
||||
<li><p><strong>quitfunc(caller)</strong> is called when the editor exits. If this is given,
|
||||
no automatic quit messages will be given.</p></li>
|
||||
<li><p><strong>key</strong> is an optional identifier for the editing session, to be
|
||||
displayed in the editor.</p></li>
|
||||
<li><p><strong>persistent</strong> means the editor state will be saved to the database making it
|
||||
survive a server reload. Note that using this mode, the load- save-
|
||||
and quit-funcs must all be possible to pickle - notable unusable
|
||||
callables are class methods and functions defined inside other
|
||||
functions. With persistent=False, no such restriction exists.</p></li>
|
||||
<li><p><strong>code</strong> set to True activates features on the EvEditor to enter Python code.</p></li>
|
||||
</ul>
|
||||
<p>In addition, the EvEditor can be used to enter Python source code,
|
||||
and offers basic handling of indentation.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt id="evennia.utils.eveditor.CmdSaveYesNo">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.utils.eveditor.</code><code class="sig-name descname">CmdSaveYesNo</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/eveditor.html#CmdSaveYesNo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.eveditor.CmdSaveYesNo" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -115,11 +123,6 @@ command was given specifically as “no” or “n”.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.utils.eveditor.CmdSaveYesNo.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdSaveYesNo.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '__noinput_command', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': '\n Save the editor state on quit. This catches\n nomatches (defaults to Yes), and avoid saves only if\n command was given specifically as "no" or "n".\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdSaveYesNo.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -178,19 +181,17 @@ command was given specifically as “no” or “n”.</p>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorBase.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/utils/eveditor.html#CmdEditorBase.parse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorBase.parse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Handles pre-parsing. Editor commands are on the form</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">:</span><span class="n">cmd</span> <span class="p">[</span><span class="n">li</span><span class="p">]</span> <span class="p">[</span><span class="n">w</span><span class="p">]</span> <span class="p">[</span><span class="n">txt</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Where all arguments are optional.</p>
|
||||
<ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt><strong>li</strong> - line number (int), starting from 1. This could also</dt><dd><p>be a range given as <l>:<l>.</p>
|
||||
<dd><p>Handles pre-parsing</p>
|
||||
<dl class="simple">
|
||||
<dt>Usage:</dt><dd><p>:cmd [li] [w] [txt]</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p><strong>w</strong> - word(s) (string), could be encased in quotes.</p></li>
|
||||
<li><p><strong>txt</strong> - extra text (string), could be encased in quotes.</p></li>
|
||||
<p>Where all arguments are optional.</p>
|
||||
<ul class="simple">
|
||||
<li><p>li - line number (int), starting from 1. This could also
|
||||
be a range given as <l>:<l>.</p></li>
|
||||
<li><p>w - word(s) (string), could be encased in quotes.</p></li>
|
||||
<li><p>txt - extra text (string), could be encased in quotes.</p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
|
|
@ -214,11 +215,6 @@ command was given specifically as “no” or “n”.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorBase.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorBase.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n Base parent for editor commands\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorBase.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -254,11 +250,6 @@ indentation.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.utils.eveditor.CmdLineInput.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdLineInput.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '__noinput_command', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': '\n No command match - Inputs line of text into buffer.\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdLineInput.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -273,7 +264,7 @@ indentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':i', ':q', '::', ':fi', ':dd', ':S', ':echo', ':DD', ':A', ':>', ':dw', ':wq', ':y', ':uu', ':=', ':u', ':p', ':fd', ':', ':s', ':::', ':q!', ':I', ':j', ':UU', ':x', ':<', ':f', ':w', ':!', ':r', ':h']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':', ':I', '::', ':fi', ':::', ':j', ':!', ':=', ':fd', ':x', ':wq', ':echo', ':f', ':<', ':u', ':i', ':dw', ':UU', ':h', ':uu', ':q!', ':s', ':DD', ':>', ':p', ':q', ':S', ':r', ':A', ':w', ':y', ':dd']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -299,11 +290,6 @@ efficient presentation.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':i :q :: :fi :dd :S :echo :DD :A :> :dw :wq :y :uu := :u :p :fd : :s ::: :q! :I :j :UU :x :< :f :w :! :r :h', 'category': 'general', 'key': ':editor_command_group', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ object when displaying the form.</p>
|
|||
<span class="s1">| cccccccc | cccccccccccccccccBccccccccccccccccc |</span>
|
||||
<span class="s1">| | |</span>
|
||||
<span class="s1">-------------------------------------------------</span>
|
||||
<span class="s1">'''</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The first line of the <strong>FORM</strong> string is ignored. The forms and table
|
||||
|
|
@ -163,16 +162,16 @@ EvCell or Tables.</p>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.utils.evform.EvForm.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">filename</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">cells</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tables</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">form</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/evform.html#EvForm.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evform.EvForm.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Initiate the form</p>
|
||||
<dd><p>Initiate the form.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>filename</strong> (<em>str</em>) – Path to template file.</p></li>
|
||||
<li><p><strong>cells</strong> (<em>dict</em>) – A dictionary mapping <strong>{id: text}</strong></p></li>
|
||||
<li><p><strong>tables</strong> (<em>dict</em>) – A dictionary mapping <strong>{id: EvTable}</strong>.</p></li>
|
||||
<li><p><strong>form</strong> (<em>dict</em>) – A dictionary
|
||||
<li><p><strong>cells</strong> (<em>dict</em>) – A dictionary mapping of <strong>{id:text}</strong>.</p></li>
|
||||
<li><p><strong>tables</strong> (<em>dict</em>) – A dictionary mapping of <strong>{id:EvTable}</strong>.</p></li>
|
||||
<li><p><strong>form</strong> (<em>dict</em>) – A dictionary of
|
||||
<strong>{“FORMCHAR”:char, “TABLECHAR”:char, “FORM”:templatestring}</strong>.
|
||||
If this is given, filename is not read.</p></li>
|
||||
if this is given, filename is not read.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
|
|||
|
|
@ -38,10 +38,9 @@
|
|||
|
||||
<div class="section" id="module-evennia.utils.evmenu">
|
||||
<span id="evennia-utils-evmenu"></span><h1>evennia.utils.evmenu<a class="headerlink" href="#module-evennia.utils.evmenu" title="Permalink to this headline">¶</a></h1>
|
||||
<p>EvMenu</p>
|
||||
<p>This implements a full menu system for Evennia.</p>
|
||||
<p>To start the menu, just import the EvMenu class from this module.
|
||||
Example usage:</p>
|
||||
<p>The EvMenu is a full in-game menu system for Evennia.</p>
|
||||
<p>To start the menu, just import the EvMenu class from this module.</p>
|
||||
<p>Example usage:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia.utils.evmenu</span> <span class="k">import</span> <span class="n">EvMenu</span>
|
||||
|
||||
<span class="n">EvMenu</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">menu_module_path</span><span class="p">,</span>
|
||||
|
|
@ -51,8 +50,8 @@ Example usage:</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
<p>Where <strong>caller</strong> is the Object to use the menu on - it will get a new
|
||||
cmdset while using the Menu. The menu_module_path is the python path
|
||||
to a python module containing function definitions. By adjusting the
|
||||
cmdset while using the Menu. The <strong>menu_module_path</strong> is the python path
|
||||
to a python module containing function definitions. By adjusting the
|
||||
keyword options of the Menu() initialization call you can start the
|
||||
menu at different places in the menu definition file, adjust if the
|
||||
menu command should overload the normal commands or not, etc.</p>
|
||||
|
|
@ -78,7 +77,7 @@ command definition too) with function definitions:</p>
|
|||
<span class="k">return</span> <span class="n">text</span><span class="p">,</span> <span class="n">options</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Where caller is the object using the menu and input_string is the
|
||||
<p>Where <strong>caller</strong> is the object using the menu and input_string is the
|
||||
command entered by the user on the <em>previous</em> node (the command
|
||||
entered to get to this node). The node function code will only be
|
||||
executed once per node-visit and the system will accept nodes with
|
||||
|
|
@ -92,43 +91,50 @@ deleted when the menu is exited.</p>
|
|||
returned as None as well. If the options are returned as None, the
|
||||
menu is immediately exited and the default “look” command is called.</p>
|
||||
<ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt><strong>text</strong> (str, tuple or None): Text shown at this node. If a tuple, the</dt><dd><p>second element in the tuple is a help text to display at this
|
||||
node when the user enters the menu help command there.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p><strong>text</strong> (str, tuple or None): Text shown at this node. If a tuple, the
|
||||
second element in the tuple is a help text to display at this
|
||||
node when the user enters the menu help command there.</p></li>
|
||||
<li><p><strong>options</strong> (tuple, dict or None): If <strong>None</strong>, this exits the menu.
|
||||
If a single dict, this is a single-option node. If a tuple,
|
||||
it should be a tuple of option dictionaries. Option dicts have the following keys:</p>
|
||||
it should be a tuple of option dictionaries. Option dicts have
|
||||
the following keys:</p>
|
||||
<ul>
|
||||
<li><p><strong>key</strong> (str or tuple, optional): What to enter to choose this option.
|
||||
If a tuple, it must be a tuple of strings, where the first string is the
|
||||
<li><dl class="simple">
|
||||
<dt><strong>key</strong> (str or tuple, optional): What to enter to choose this option.</dt><dd><p>If a tuple, it must be a tuple of strings, where the first string is the
|
||||
key which will be shown to the user and the others are aliases.
|
||||
If unset, the options’ number will be used. The special key <strong>_default</strong>
|
||||
marks this option as the default fallback when no other option matches
|
||||
the user input. There can only be one <strong>_default</strong> option per node. It
|
||||
will not be displayed in the list.</p></li>
|
||||
will not be displayed in the list.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p><strong>desc</strong> (str, optional): This describes what choosing the option will do.</p></li>
|
||||
<li><p><strong>goto</strong> (str, tuple or callable): If string, should be the name of node to go to
|
||||
when this option is selected. If a callable, it has the signature
|
||||
<li><dl class="simple">
|
||||
<dt><strong>goto</strong> (str, tuple or callable): If string, should be the name of node to go to</dt><dd><p>when this option is selected. If a callable, it has the signature
|
||||
<strong>callable(caller[,raw_input][,**kwargs])</strong>. If a tuple, the first element
|
||||
is the callable and the second is a dict with the <strong>**kwargs</strong> to pass to
|
||||
is the callable and the second is a dict with the kwargs to pass to
|
||||
the callable. Those kwargs will also be passed into the next node if possible.
|
||||
Such a callable should return either a str or a (str, dict), where the
|
||||
string is the name of the next node to go to and the dict is the new,
|
||||
(possibly modified) kwarg to pass into the next node. If the callable returns
|
||||
None or the empty string, the current node will be revisited.</p></li>
|
||||
<li><p><strong>exec</strong> (str, callable or tuple, optional): This takes the same input as <strong>goto</strong> above
|
||||
and runs before it. If given a node name, the node will be executed but will not
|
||||
None or the empty string, the current node will be revisited.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="simple">
|
||||
<dt><strong>exec</strong> (str, callable or tuple, optional): This takes the same input as <strong>goto</strong> above</dt><dd><p>and runs before it. If given a node name, the node will be executed but will not
|
||||
be considered the next node. If node/callback returns str or (str, dict), these will
|
||||
replace the <strong>goto</strong> step (<strong>goto</strong> callbacks will not fire), with the string being the
|
||||
next node name and the optional dict acting as the kwargs-input for the next node.
|
||||
If an exec callable returns the empty string (only), the current node is re-run.</p></li>
|
||||
If an exec callable returns <strong>None</strong>, the current node is re-run.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>If <strong>key</strong> is not given, the option will automatically be identified by
|
||||
<p>If key is not given, the option will automatically be identified by
|
||||
its number 1..N.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># in menu_module.py</span>
|
||||
|
|
@ -182,9 +188,9 @@ same Using <strong>help</strong> will show the help text, otherwise a list of
|
|||
available commands while in menu mode.</p>
|
||||
<p>The menu tree is exited either by using the in-menu quit command or by
|
||||
reaching a node without any options.</p>
|
||||
<p>For a menu demo, import <strong>CmdTestMenu</strong> from this module and add it to
|
||||
your default cmdset. Run it with this module, like <strong>testmenu evennia.utils.evmenu</strong>.</p>
|
||||
<hr class="docutils" />
|
||||
<p>For a menu demo, import CmdTestMenu from this module and add it to
|
||||
your default cmdset. Run it with this module, like <strong>testmenu
|
||||
evennia.utils.evmenu</strong>.</p>
|
||||
<div class="section" id="menu-generation-from-template-string">
|
||||
<h2>Menu generation from template string<a class="headerlink" href="#menu-generation-from-template-string" title="Permalink to this headline">¶</a></h2>
|
||||
<p>In evmenu.py is a helper function <strong>parse_menu_template</strong> that parses a
|
||||
|
|
@ -274,9 +280,10 @@ allowed, these will be added to the <strong>**kwargs</strong> going into the cal
|
|||
strings is only needed if wanting to pass strippable spaces, otherwise the
|
||||
key:values will be converted to strings/numbers with literal_eval before passed
|
||||
into the callable.</p>
|
||||
<p>The <a href="#id1"><span class="problematic" id="id2">**</span></a>> ** option takes a glob or regex to perform different actions depending on user
|
||||
<p>The “> ” option takes a glob or regex to perform different actions depending on user
|
||||
input. Make sure to sort these in increasing order of generality since they
|
||||
will be tested in sequence.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py exception">
|
||||
<dt id="evennia.utils.evmenu.EvMenuError">
|
||||
<em class="property">exception </em><code class="sig-prename descclassname">evennia.utils.evmenu.</code><code class="sig-name descname">EvMenuError</code><a class="reference internal" href="../_modules/evennia/utils/evmenu.html#EvMenuError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evmenu.EvMenuError" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -358,11 +365,6 @@ commands the caller can use.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all()'</em><a class="headerlink" href="#evennia.utils.evmenu.CmdEvMenuNode.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdEvMenuNode.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '__nomatch_command', 'category': 'menu', 'key': '__noinput_command', 'tags': '', 'text': '\n Menu options.\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdEvMenuNode.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -494,12 +496,14 @@ menu will <em>not</em> be using this same session anymore after a reload.</p></l
|
|||
by default in all nodes of the menu. This will print out the current state of
|
||||
the menu. Deactivate for production use! When the debug flag is active, the
|
||||
<strong>persistent</strong> flag is deactivated.</p></li>
|
||||
<li><p><strong>**kwargs</strong> – All kwargs will become initialization variables on <strong>caller.ndb._menutree</strong>,
|
||||
to be available at run.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p><a class="reference internal" href="#evennia.utils.evmenu.EvMenuError" title="evennia.utils.evmenu.EvMenuError"><strong>EvMenuError</strong></a> – If the start/end node is not found in menu tree.</p>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>any</strong> (<em>any</em>) – All kwargs will become initialization variables on <strong>caller.ndb._evmenu</strong>,
|
||||
to be available at run.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><p><a class="reference internal" href="#evennia.utils.evmenu.EvMenuError" title="evennia.utils.evmenu.EvMenuError"><strong>EvMenuError</strong></a> – If the start/end node is not found in menu tree.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
|
|
@ -599,9 +603,11 @@ a (“nodename”, kwargs) tuple.</p></li>
|
|||
<li><p><strong>raw_string</strong> (<em>str</em>) – The raw default string entered on the
|
||||
previous node (only used if the node accepts it as an
|
||||
argument)</p></li>
|
||||
<li><p><strong>**kwargs</strong> – Extra arguments to goto callables.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><p><strong>any</strong> – Extra arguments to goto callables.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
|
|
@ -746,29 +752,34 @@ prepending those options added in the node.</p>
|
|||
<li><p><strong>option_generator</strong> (<em>callable</em><em> or </em><em>list</em>) – A list of strings indicating the options, or a callable
|
||||
that is called as option_generator(caller) to produce such a list.</p></li>
|
||||
<li><p><strong>select</strong> (<em>callable</em><em> or </em><em>str</em><em>, </em><em>optional</em>) – Node to redirect a selection to. Its <strong>**kwargs</strong> will
|
||||
contain the <strong>available_choices</strong> list and <strong>selection</strong> will hold one of the elements in
|
||||
that list. If a callable, it will be called as
|
||||
<strong>select(caller, menuchoice, **kwargs)</strong> where menuchoice is the chosen option as a
|
||||
string and <strong>available_choices</strong> is a kwarg mapping the option keys to the choices
|
||||
offered by the option_generator. The callable whould return the name of the target node
|
||||
to goto after this selection (or None to repeat the list-node). Note that if this is not
|
||||
given, the decorated node must itself provide a way to continue from the node!</p></li>
|
||||
contain the <strong>available_choices</strong> list and <strong>selection</strong> will hold one
|
||||
of the elements in that list. If a callable, it will be called as
|
||||
<strong>select(caller, menuchoice, **kwargs)</strong> where menuchoice is the
|
||||
chosen option as a string and <strong>available_choices</strong> is the list of available
|
||||
options offered by the option_generator. The callable whould return
|
||||
the name of the target node to goto after this selection (or None to repeat the
|
||||
list-node). Note that if this is not given, the decorated node
|
||||
must itself provide a way to continue from the node!</p></li>
|
||||
<li><p><strong>pagesize</strong> (<em>int</em>) – How many options to show per page.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Example</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">list_node</span><span class="p">([</span><span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'bar'</span><span class="p">],</span> <span class="n">select</span><span class="p">)</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">_selectfunc</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">menuchoice</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||
<span class="c1"># menuchoice would be either 'foo' or 'bar' here</span>
|
||||
<span class="c1"># kwargs['available_choices'] would be the list ['foo', 'bar']</span>
|
||||
<span class="k">return</span> <span class="s2">"the_next_node_to_go_to"</span>
|
||||
|
||||
<span class="nd">@list_node</span><span class="p">([</span><span class="s1">'foo'</span><span class="p">,</span> <span class="s1">'bar'</span><span class="p">],</span> <span class="n">_selectfunc</span><span class="p">)</span>
|
||||
<span class="k">def</span> <span class="nf">node_index</span><span class="p">(</span><span class="n">caller</span><span class="p">):</span>
|
||||
<span class="n">text</span> <span class="o">=</span> <span class="s2">"describing the list"</span>
|
||||
<span class="k">return</span> <span class="n">text</span><span class="p">,</span> <span class="p">[]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>All normal <strong>goto</strong> or <strong>exec</strong> callables returned from the decorated nodes
|
||||
will, if they accept <strong>**kwargs</strong>, get a new kwarg ‘available_choices’
|
||||
injected. These are the ordered list of named options (descs) visible
|
||||
on the current node page.</p>
|
||||
<p>All normal <strong>goto</strong> or <strong>exec</strong> callables returned from the decorated nodes will, if they accept
|
||||
<strong>**kwargs</strong>, get a new kwarg <strong>available_choices</strong> injected. This is the ordered list of named
|
||||
options (descs) visible on the current node page.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -802,11 +813,6 @@ on the current node page.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.utils.evmenu.CmdGetInput.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdGetInput.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '__noinput_command', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': '\n Enter your data and press return.\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdGetInput.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -860,29 +866,44 @@ on the current node page.</p>
|
|||
<dl class="py function">
|
||||
<dt id="evennia.utils.evmenu.get_input">
|
||||
<code class="sig-prename descclassname">evennia.utils.evmenu.</code><code class="sig-name descname">get_input</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">caller</span></em>, <em class="sig-param"><span class="n">prompt</span></em>, <em class="sig-param"><span class="n">callback</span></em>, <em class="sig-param"><span class="n">session</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/evmenu.html#get_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evmenu.get_input" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This is a helper function for easily request input from the caller.</p>
|
||||
<dd><p>This is a helper function for easily request input from
|
||||
the caller.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) – The entity being asked the question. This
|
||||
should usually be an object controlled by a user.</p></li>
|
||||
<li><p><strong>prompt</strong> (<em>str</em>) – This text will be shown to the user, in order to let them
|
||||
know their input is needed.</p></li>
|
||||
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) – The entity being asked
|
||||
the question. This should usually be an object
|
||||
controlled by a user.</p></li>
|
||||
<li><p><strong>prompt</strong> (<em>str</em>) – This text will be shown to the user,
|
||||
in order to let them know their input is needed.</p></li>
|
||||
<li><p><strong>callback</strong> (<em>callable</em>) – A function that will be called
|
||||
when the user enters a reply. It must take three arguments: the
|
||||
<strong>caller</strong>, the <strong>prompt</strong> text and the <strong>result</strong> of the input given by
|
||||
the user. If the callback doesn’t return anything or return False,
|
||||
the input prompt will be cleaned up and exited. If returning True,
|
||||
the prompt will remain and continue to accept input.</p></li>
|
||||
when the user enters a reply. It must take three
|
||||
arguments: the <strong>caller</strong>, the <strong>prompt</strong> text and the
|
||||
<strong>result</strong> of the input given by the user. If the
|
||||
callback doesn’t return anything or return False,
|
||||
the input prompt will be cleaned up and exited. If
|
||||
returning True, the prompt will remain and continue to
|
||||
accept input.</p></li>
|
||||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – This allows to specify the
|
||||
session to send the prompt to. It’s usually only needed if <strong>caller</strong>
|
||||
is an Account in multisession modes greater than 2. The session is
|
||||
then updated by the command and is available (for example in
|
||||
callbacks) through <strong>caller.ndb.getinput._session</strong>.</p></li>
|
||||
<li><p><strong>*args</strong> (<em>any</em>) – Extra arguments to pass to <strong>callback</strong>. To utilise <strong>*args</strong>
|
||||
(and <strong>**kwargs</strong>), a value for the <strong>session</strong> argument must also be
|
||||
provided.</p></li>
|
||||
<li><p><strong>**kwargs</strong> (<em>any</em>) – Extra kwargs to pass to <strong>callback</strong>.</p></li>
|
||||
session to send the prompt to. It’s usually only
|
||||
needed if <strong>caller</strong> is an Account in multisession modes
|
||||
greater than 2. The session is then updated by the
|
||||
command and is available (for example in callbacks)
|
||||
through <strong>caller.ndb.getinput._session</strong>.</p></li>
|
||||
<li><p><strong>args</strong> (<em>optional</em>) – Extra arguments will be
|
||||
passed to the fall back function as a list ‘args’
|
||||
and all keyword arguments as a dictionary ‘kwargs’.
|
||||
To utilise <strong>*args</strong> and <strong>**kwargs</strong>, a value for the
|
||||
session argument must be provided (None by default)
|
||||
and the callback function must take <strong>*args</strong> and
|
||||
<strong>**kwargs</strong> as arguments.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>optional</em>) – Extra arguments will be
|
||||
passed to the fall back function as a list ‘args’
|
||||
and all keyword arguments as a dictionary ‘kwargs’.
|
||||
To utilise <strong>*args</strong> and <strong>**kwargs</strong>, a value for the
|
||||
session argument must be provided (None by default)
|
||||
and the callback function must take <strong>*args</strong> and
|
||||
<strong>**kwargs</strong> as arguments.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
|
|
@ -890,21 +911,23 @@ provided.</p></li>
|
|||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>The result value sent to the callback is raw and not processed in any
|
||||
way. This means that you will get the ending line return character from
|
||||
most types of client inputs. So make sure to strip that before doing a
|
||||
comparison.</p>
|
||||
<p>When the prompt is running, a temporary object <strong>caller.ndb._getinput</strong>
|
||||
is stored; this will be removed when the prompt finishes.</p>
|
||||
<p>If you need the specific Session of the caller (which may not be easy
|
||||
to get if caller is an account in higher multisession modes), then it
|
||||
is available in the callback through <strong>caller.ndb._getinput._session</strong>.
|
||||
This is why the <strong>session</strong> is required as input.</p>
|
||||
<p>It’s not recommended to ‘chain’ <strong>get_input</strong> into a sequence of
|
||||
questions. This will result in the caller stacking ever more instances
|
||||
of InputCmdSets. While they will all be cleared on concluding the
|
||||
get_input chain, EvMenu should be considered for anything beyond a
|
||||
single question.</p>
|
||||
<p>The result value sent to the callback is raw and not
|
||||
processed in any way. This means that you will get
|
||||
the ending line return character from most types of
|
||||
client inputs. So make sure to strip that before
|
||||
doing a comparison.</p>
|
||||
<p>When the prompt is running, a temporary object
|
||||
<strong>caller.ndb._getinput</strong> is stored; this will be removed
|
||||
when the prompt finishes.
|
||||
If you need the specific Session of the caller (which
|
||||
may not be easy to get if caller is an account in higher
|
||||
multisession modes), then it is available in the
|
||||
callback through <strong>caller.ndb._getinput._session</strong>.</p>
|
||||
<p>Chaining get_input functions will result in the caller
|
||||
stacking ever more instances of InputCmdSets. Whilst
|
||||
they will all be cleared on concluding the get_input
|
||||
chain, EvMenu should be considered for anything beyond
|
||||
a single question.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@
|
|||
<div class="section" id="module-evennia.utils.evmore">
|
||||
<span id="evennia-utils-evmore"></span><h1>evennia.utils.evmore<a class="headerlink" href="#module-evennia.utils.evmore" title="Permalink to this headline">¶</a></h1>
|
||||
<p>EvMore - pager mechanism</p>
|
||||
<p>This is a pager for displaying long texts and allows stepping up and down in
|
||||
the text (the name comes from the traditional ‘more’ unix command).</p>
|
||||
<p>This is a pager for displaying long texts and allows stepping up and
|
||||
down in the text (the name comes from the traditional ‘more’ unix
|
||||
command).</p>
|
||||
<p>To use, simply pass the text through the EvMore object:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia.utils.evmore</span> <span class="k">import</span> <span class="n">EvMore</span>
|
||||
|
||||
|
|
@ -48,17 +49,16 @@ the text (the name comes from the traditional ‘more’ unix command).</p>
|
|||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">text</span><span class="p">,</span> <span class="n">always_page</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">session</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">justify_kwargs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>One can also use the convenience function <strong>msg</strong> from this module to avoid
|
||||
having to set up the <strong>EvMenu</strong> object manually:</p>
|
||||
<p>One can also use the convenience function msg from this module:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="k">import</span> <span class="n">evmore</span>
|
||||
|
||||
<span class="n">text</span> <span class="o">=</span> <span class="n">some_long_text_output</span><span class="p">()</span>
|
||||
<span class="n">evmore</span><span class="o">.</span><span class="n">msg</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">text</span><span class="p">,</span> <span class="n">always_page</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">session</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">justify_kwargs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <strong>always_page</strong> argument decides if the pager is used also if the text is not long
|
||||
enough to need to scroll, <strong>session</strong> is used to determine which session to relay
|
||||
to and <strong>justify_kwargs</strong> are kwargs to pass to utils.utils.justify in order to
|
||||
<p>Where always_page decides if the pager is used also if the text is not long
|
||||
enough to need to scroll, session is used to determine which session to relay
|
||||
to and <strong>justify_kwargs</strong> are kwargs to pass to <strong>utils.utils.justify</strong> in order to
|
||||
change the formatting of the text. The remaining <strong>**kwargs</strong> will be passed on to
|
||||
the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
||||
<hr class="docutils" />
|
||||
|
|
@ -74,7 +74,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['n', 'top', 'a', 'q', 'next', 'end', 'quit', 'back', 'e', 'b', 't', 'abort']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['t', 'next', 'e', 'end', 'q', 'abort', 'n', 'top', 'b', 'a', 'back', 'quit']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -98,11 +98,6 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'n top a q next end quit back e b t abort', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n Manipulate the text paging\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -141,11 +136,6 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
<code class="sig-name descname">lock_storage</code><em class="property"> = 'cmd:all();'</em><a class="headerlink" href="#evennia.utils.evmore.CmdMoreLook.lock_storage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMoreLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'l', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n Override look to display window and prevent OOCLook from firing\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMoreLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -187,93 +177,90 @@ self.add().</p>
|
|||
<dt id="evennia.utils.evmore.EvMore">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.utils.evmore.</code><code class="sig-name descname">EvMore</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">inp</em>, <em class="sig-param">always_page=False</em>, <em class="sig-param">session=None</em>, <em class="sig-param">justify=False</em>, <em class="sig-param">justify_kwargs=None</em>, <em class="sig-param">exit_on_lastpage=False</em>, <em class="sig-param">exit_cmd=None</em>, <em class="sig-param">page_formatter=<class 'str'></em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/evmore.html#EvMore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evmore.EvMore" 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 main pager object</p>
|
||||
<p>The main pager object.</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.utils.evmore.EvMore.__init__">
|
||||
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">caller</em>, <em class="sig-param">inp</em>, <em class="sig-param">always_page=False</em>, <em class="sig-param">session=None</em>, <em class="sig-param">justify=False</em>, <em class="sig-param">justify_kwargs=None</em>, <em class="sig-param">exit_on_lastpage=False</em>, <em class="sig-param">exit_cmd=None</em>, <em class="sig-param">page_formatter=<class 'str'></em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/evmore.html#EvMore.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evmore.EvMore.__init__" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><blockquote>
|
||||
<div><p>Initialization of the EvMore pager</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>caller (Object or Account): Entity reading the text.
|
||||
inp (str, EvTable, Paginator or iterator): The text or data to put under paging.</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt>If a string, paginage normally. If this text contains</dt><dd><p>one or more **</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<dd><p>Initialization of the Evmore input handler.</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>) – Entity reading the text.</p></li>
|
||||
<li><p><strong>inp</strong> (<em>str</em><em>, </em><a class="reference internal" href="evennia.utils.evtable.html#evennia.utils.evtable.EvTable" title="evennia.utils.evtable.EvTable"><em>EvTable</em></a><em>, </em><em>Paginator</em><em> or </em><em>iterator</em>) – <p>The text or data to put under paging.</p>
|
||||
<ul>
|
||||
<li><p>If a string, paginage normally. If this text contains
|
||||
one or more \f (backslash + f) format symbols, automatic
|
||||
pagination and justification are force-disabled and
|
||||
page-breaks will only happen after each \f.</p></li>
|
||||
<li><p>If <strong>EvTable</strong>, the EvTable will be paginated with the same
|
||||
setting on each page if it is too long. The table
|
||||
decorations will be considered in the size of the page.</p></li>
|
||||
<li><p>Otherwise <strong>inp</strong> is converted to an iterator, where each step is
|
||||
expected to be a line in the final display. Each line
|
||||
will be run through <strong>iter_callable</strong>.</p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<dl>
|
||||
<dt>** format symbol, automatic pagination and justification</dt><dd><p>are force-disabled and page-breaks will only happen after each **</p>
|
||||
</dd>
|
||||
<dt><a href="#id1"><span class="problematic" id="id2">**</span></a>.</dt><dd><blockquote>
|
||||
<div><blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt>If <strong>EvTable</strong>, the EvTable will be paginated with the same</dt><dd><p>setting on each page if it is too long. The table
|
||||
decorations will be considered in the size of the page.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="simple">
|
||||
<dt>Otherwise <strong>inp</strong> is converted to an iterator, where each step is</dt><dd><p>expected to be a line in the final display. Each line
|
||||
will be run through <strong>iter_callable</strong>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>always_page (bool, optional): If <strong>False</strong>, the</dt><dd><p>pager will only kick in if <strong>inp</strong> is too big
|
||||
to fit the screen.</p>
|
||||
</dd>
|
||||
<dt>session (Session, optional): If given, this session will be used</dt><dd><p>to determine the screen width and will receive all output.</p>
|
||||
</dd>
|
||||
<dt>justify (bool, optional): If set, auto-justify long lines. This must be turned</dt><dd><p>off for fixed-width or formatted output, like tables. It’s force-disabled
|
||||
if <strong>inp</strong> is an EvTable.</p>
|
||||
</dd>
|
||||
<dt>justify_kwargs (dict, optional): Keywords for the justifiy function. Used only</dt><dd><p>if <strong>justify</strong> is True. If this is not set, default arguments will be used.</p>
|
||||
</dd>
|
||||
<dt>exit_on_lastpage (bool, optional): If reaching the last page without the</dt><dd><p>page being completely filled, exit pager immediately. If unset,
|
||||
</p></li>
|
||||
<li><p><strong>always_page</strong> (<em>bool</em><em>, </em><em>optional</em>) – If <strong>False</strong>, the pager will only kick
|
||||
in if <strong>inp</strong> is too big to fit the screen.</p></li>
|
||||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – If given, this session will be used
|
||||
to determine the screen width and will receive all output.</p></li>
|
||||
<li><p><strong>justify</strong> (<em>bool</em><em>, </em><em>optional</em>) – If set, auto-justify long lines. This must be turned
|
||||
off for fixed-width or formatted output, like tables. It’s force-disabled
|
||||
if <strong>inp</strong> is an EvTable.</p></li>
|
||||
<li><p><strong>justify_kwargs</strong> (<em>dict</em><em>, </em><em>optional</em>) – Keywords for the justifiy function. Used only
|
||||
if <strong>justify</strong> is True. If this is not set, default arguments will be used.</p></li>
|
||||
<li><p><strong>exit_on_lastpage</strong> (<em>bool</em><em>, </em><em>optional</em>) – If reaching the last page without the
|
||||
page being completely filled, exit pager immediately. If unset,
|
||||
another move forward is required to exit. If set, the pager
|
||||
exit message will not be shown.</p>
|
||||
</dd>
|
||||
<dt>exit_cmd (str, optional): If given, this command-string will be executed on</dt><dd><p>the caller when the more page exits. Note that this will be using whatever
|
||||
exit message will not be shown.</p></li>
|
||||
<li><p><strong>exit_cmd</strong> (<em>str</em><em>, </em><em>optional</em>) – If given, this command-string will be executed on
|
||||
the caller when the more page exits. Note that this will be using whatever
|
||||
cmdset the user had <em>before</em> the evmore pager was activated (so none of
|
||||
the evmore commands will be available when this is run).</p>
|
||||
the evmore commands will be available when this is run).</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>any</em><em>, </em><em>any</em>) – These will be passed on to the <strong>caller.msg</strong> method.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>kwargs (any, optional): These will be passed on to the <strong>caller.msg</strong> method.</p>
|
||||
</div></blockquote>
|
||||
<p>Examples:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">super_long_text</span> <span class="o">=</span> <span class="s2">" ... "</span>
|
||||
<p class="rubric">Examples</p>
|
||||
<p>Basic use:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">super_long_text</span> <span class="o">=</span> <span class="s2">" ... "</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">super_long_text</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Paginator</p>
|
||||
<p>Paginated query data - this is an optimization to avoid fetching
|
||||
database data until it’s actually paged to.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.core.paginator</span> <span class="k">import</span> <span class="n">Paginator</span>
|
||||
|
||||
<span class="n">query</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
|
||||
<span class="n">pages</span> <span class="o">=</span> <span class="n">Paginator</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span> <span class="c1"># 10 objs per page</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">pages</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Every page an EvTable</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia</span> <span class="k">import</span> <span class="n">EvTable</span>
|
||||
<span class="k">def</span> <span class="nf">_to_evtable</span><span class="p">(</span><span class="n">page</span><span class="p">):</span>
|
||||
<span class="n">table</span> <span class="o">=</span> <span class="o">...</span> <span class="c1"># convert page to a table</span>
|
||||
<span class="k">return</span> <span class="n">EvTable</span><span class="p">(</span><span class="o">*</span><span class="n">headers</span><span class="p">,</span> <span class="n">table</span><span class="o">=</span><span class="n">table</span><span class="p">,</span> <span class="o">...</span><span class="p">)</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">pages</span><span class="p">,</span> <span class="n">page_formatter</span><span class="o">=</span><span class="n">_to_evtable</span><span class="p">)</span>
|
||||
<p>Automatic split EvTable over multiple EvMore pages</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">EvMore</span><span class="p">(</span><span class="o">*</span><span class="n">header</span><span class="p">,</span> <span class="n">table</span><span class="o">=</span><span class="n">tabledata</span><span class="p">)</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">table</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Every page a separate EvTable (optimization for very large data sets)</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia</span> <span class="k">import</span> <span class="n">EvTable</span><span class="p">,</span> <span class="n">EvMore</span>
|
||||
|
||||
<span class="k">class</span> <span class="nc">TableEvMore</span><span class="p">(</span><span class="n">EvMore</span><span class="p">):</span>
|
||||
<span class="k">def</span> <span class="nf">init_pages</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
|
||||
<span class="n">pages</span> <span class="o">=</span> <span class="c1"># depends on data type</span>
|
||||
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">init_pages</span><span class="p">(</span><span class="n">pages</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">page_formatter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">page</span><span class="p">):</span>
|
||||
<span class="n">table</span> <span class="o">=</span> <span class="n">EvTable</span><span class="p">()</span>
|
||||
|
||||
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">page</span><span class="p">:</span>
|
||||
<span class="n">cols</span> <span class="o">=</span> <span class="c1"># split raw line into columns</span>
|
||||
<span class="n">table</span><span class="o">.</span><span class="n">add_row</span><span class="p">(</span><span class="o">*</span><span class="n">cols</span><span class="p">)</span>
|
||||
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
|
||||
|
||||
<span class="n">TableEvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">pages</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -365,14 +352,9 @@ querysets); to avoid fetching all objects at the same time.</p>
|
|||
<dl class="py method">
|
||||
<dt id="evennia.utils.evmore.EvMore.init_f_str">
|
||||
<code class="sig-name descname">init_f_str</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">text</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/evmore.html#EvMore.init_f_str"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evmore.EvMore.init_f_str" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The input contains <strong>f</strong> markers. We use <strong>f</strong> to indicate the user wants to
|
||||
enforce their line breaks on their own. If so, we do no automatic
|
||||
line-breaking/justification at all.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>text</strong> (<em>str</em>) – The string to format with f-markers.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dd><p>The input contains \f (backslash + f) markers. We use \f to indicate
|
||||
the user wants to enforce their line breaks on their own. If so, we do
|
||||
no automatic line-breaking/justification at all.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -393,21 +375,18 @@ strings, querysets, django.Paginator, EvTables and any iterables with strings.</
|
|||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>If overridden, this method must perform the following actions:
|
||||
- read and re-store <strong>self._data</strong> (the incoming data set) if needed for pagination to work.
|
||||
- set <strong>self._npages</strong> to the total number of pages. Default is 1.
|
||||
- set <strong>self._paginator</strong> to a callable that will take a page number 1…N and return</p>
|
||||
<blockquote>
|
||||
<div><p>the data to display on that page (not any decorations or next/prev buttons). If only
|
||||
wanting to change the paginator, override <strong>self.paginator</strong> instead.</p>
|
||||
</div></blockquote>
|
||||
<p>If overridden, this method must perform the following actions:</p>
|
||||
<ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt>set <strong>self._page_formatter</strong> to a callable that will receive the page from <strong>self._paginator</strong></dt><dd><p>and format it with one element per line. Default is <strong>str</strong>. Or override <strong>self.page_formatter</strong>
|
||||
directly instead.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>read and re-store <strong>self._data</strong> (the incoming data set) if needed
|
||||
for pagination to work.</p></li>
|
||||
<li><p>set <strong>self._npages</strong> to the total number of pages. Default is 1.</p></li>
|
||||
<li><p>set <strong>self._paginator</strong> to a callable that will take a page number 1…N and return
|
||||
the data to display on that page (not any decorations or next/prev buttons). If only
|
||||
wanting to change the paginator, override <strong>self.paginator</strong> instead.</p></li>
|
||||
<li><p>set <strong>self._page_formatter</strong> to a callable that will receive the
|
||||
page from <strong>self._paginator</strong> and format it with one element per
|
||||
line. Default is <strong>str</strong>. Or override <strong>self.page_formatter</strong>
|
||||
directly instead.</p></li>
|
||||
</ul>
|
||||
<p>By default, helper methods are called that perform these actions
|
||||
depending on supported inputs.</p>
|
||||
|
|
@ -459,85 +438,46 @@ EvTable across many pages and feed it into EvMore all at once).</p>
|
|||
<dl class="py function">
|
||||
<dt id="evennia.utils.evmore.msg">
|
||||
<code class="sig-prename descclassname">evennia.utils.evmore.</code><code class="sig-name descname">msg</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">caller</span></em>, <em class="sig-param"><span class="n">text</span><span class="o">=</span><span class="default_value">''</span></em>, <em class="sig-param"><span class="n">always_page</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">session</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">justify</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">justify_kwargs</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exit_on_lastpage</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/evmore.html#msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.evmore.msg" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><blockquote>
|
||||
<div><p>EvMore-supported version of msg, mimicking the normal msg method.</p>
|
||||
</div></blockquote>
|
||||
<p>Initialization of the EvMore pager</p>
|
||||
<dd><p>EvMore-supported version of msg, mimicking the normal msg method.</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>) – Entity reading the text.</p></li>
|
||||
<li><p><strong>inp</strong> (<em>str</em><em>, </em><a class="reference internal" href="evennia.utils.evtable.html#evennia.utils.evtable.EvTable" title="evennia.utils.evtable.EvTable"><em>EvTable</em></a><em>, </em><em>Paginator</em><em> or </em><em>iterator</em>) – <p>The text or data to put under paging.
|
||||
- If a string, paginage normally. If this text contains</p>
|
||||
<blockquote>
|
||||
<div><p>one or more **</p>
|
||||
</div></blockquote>
|
||||
<li><p><strong>text</strong> (<em>str</em><em>, </em><a class="reference internal" href="evennia.utils.evtable.html#evennia.utils.evtable.EvTable" title="evennia.utils.evtable.EvTable"><em>EvTable</em></a><em> or </em><em>iterator</em>) – <p>The text or data to put under paging.</p>
|
||||
<ul>
|
||||
<li><p>If a string, paginage normally. If this text contains
|
||||
one or more \f (backslash + f) format symbol, automatic pagination is disabled
|
||||
and page-breaks will only happen after each \f.</p></li>
|
||||
<li><p>If <strong>EvTable</strong>, the EvTable will be paginated with the same
|
||||
setting on each page if it is too long. The table
|
||||
decorations will be considered in the size of the page.</p></li>
|
||||
<li><p>Otherwise <strong>text</strong> is converted to an iterator, where each step is
|
||||
is expected to be a line in the final display, and each line
|
||||
will be run through repr().</p></li>
|
||||
</ul>
|
||||
</p></li>
|
||||
<li><p><strong>always_page</strong> (<em>bool</em><em>, </em><em>optional</em>) – If <strong>False</strong>, the
|
||||
pager will only kick in if <strong>text</strong> is too big
|
||||
to fit the screen.</p></li>
|
||||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – If given, this session will be used
|
||||
to determine the screen width and will receive all output.</p></li>
|
||||
<li><p><strong>justify</strong> (<em>bool</em><em>, </em><em>optional</em>) – If set, justify long lines in output. Disable for
|
||||
fixed-format output, like tables.</p></li>
|
||||
<li><p><strong>justify_kwargs</strong> (<em>dict</em><em>, </em><em>bool</em><em> or </em><em>None</em><em>, </em><em>optional</em>) – If given, this should
|
||||
be valid keyword arguments to the utils.justify() function. If False,
|
||||
no justification will be done.</p></li>
|
||||
<li><p><strong>exit_on_lastpage</strong> (<em>bool</em><em>, </em><em>optional</em>) – Immediately exit pager when reaching the last page.</p></li>
|
||||
<li><p><strong>use_evtable</strong> (<em>bool</em><em>, </em><em>optional</em>) – If True, each page will be rendered as an
|
||||
EvTable. For this to work, <strong>text</strong> must be an iterable, where each element
|
||||
is the table (list of list) to render on that page.</p></li>
|
||||
<li><p><strong>evtable_args</strong> (<em>tuple</em><em>, </em><em>optional</em>) – The args to use for EvTable on each page.</p></li>
|
||||
<li><p><strong>evtable_kwargs</strong> (<em>dict</em><em>, </em><em>optional</em>) – The kwargs to use for EvTable on each
|
||||
page (except <strong>table</strong>, which is supplied by EvMore per-page).</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – These will be passed on
|
||||
to the <strong>caller.msg</strong> method.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>** format symbol, automatic pagination and justification</dt><dd><p>are force-disabled and page-breaks will only happen after each **</p>
|
||||
</dd>
|
||||
<dt><a href="#id3"><span class="problematic" id="id4">**</span></a>.</dt><dd><blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt>If <strong>EvTable</strong>, the EvTable will be paginated with the same</dt><dd><p>setting on each page if it is too long. The table
|
||||
decorations will be considered in the size of the page.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="simple">
|
||||
<dt>Otherwise <strong>inp</strong> is converted to an iterator, where each step is</dt><dd><p>expected to be a line in the final display. Each line
|
||||
will be run through <strong>iter_callable</strong>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>always_page (bool, optional): If <strong>False</strong>, the</dt><dd><p>pager will only kick in if <strong>inp</strong> is too big
|
||||
to fit the screen.</p>
|
||||
</dd>
|
||||
<dt>session (Session, optional): If given, this session will be used</dt><dd><p>to determine the screen width and will receive all output.</p>
|
||||
</dd>
|
||||
<dt>justify (bool, optional): If set, auto-justify long lines. This must be turned</dt><dd><p>off for fixed-width or formatted output, like tables. It’s force-disabled
|
||||
if <strong>inp</strong> is an EvTable.</p>
|
||||
</dd>
|
||||
<dt>justify_kwargs (dict, optional): Keywords for the justifiy function. Used only</dt><dd><p>if <strong>justify</strong> is True. If this is not set, default arguments will be used.</p>
|
||||
</dd>
|
||||
<dt>exit_on_lastpage (bool, optional): If reaching the last page without the</dt><dd><p>page being completely filled, exit pager immediately. If unset,
|
||||
another move forward is required to exit. If set, the pager
|
||||
exit message will not be shown.</p>
|
||||
</dd>
|
||||
<dt>exit_cmd (str, optional): If given, this command-string will be executed on</dt><dd><p>the caller when the more page exits. Note that this will be using whatever
|
||||
cmdset the user had <em>before</em> the evmore pager was activated (so none of
|
||||
the evmore commands will be available when this is run).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>kwargs (any, optional): These will be passed on to the <strong>caller.msg</strong> method.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">super_long_text</span> <span class="o">=</span> <span class="s2">" ... "</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">super_long_text</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Paginator</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.core.paginator</span> <span class="k">import</span> <span class="n">Paginator</span>
|
||||
<span class="n">query</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
|
||||
<span class="n">pages</span> <span class="o">=</span> <span class="n">Paginator</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span> <span class="c1"># 10 objs per page</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">pages</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Every page an EvTable</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia</span> <span class="k">import</span> <span class="n">EvTable</span>
|
||||
<span class="k">def</span> <span class="nf">_to_evtable</span><span class="p">(</span><span class="n">page</span><span class="p">):</span>
|
||||
<span class="n">table</span> <span class="o">=</span> <span class="o">...</span> <span class="c1"># convert page to a table</span>
|
||||
<span class="k">return</span> <span class="n">EvTable</span><span class="p">(</span><span class="o">*</span><span class="n">headers</span><span class="p">,</span> <span class="n">table</span><span class="o">=</span><span class="n">table</span><span class="p">,</span> <span class="o">...</span><span class="p">)</span>
|
||||
<span class="n">EvMore</span><span class="p">(</span><span class="n">caller</span><span class="p">,</span> <span class="n">pages</span><span class="p">,</span> <span class="n">page_formatter</span><span class="o">=</span><span class="n">_to_evtable</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,15 +38,13 @@
|
|||
|
||||
<div class="section" id="module-evennia.utils.evtable">
|
||||
<span id="evennia-utils-evtable"></span><h1>evennia.utils.evtable<a class="headerlink" href="#module-evennia.utils.evtable" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This is an advanced ASCII table creator. It was inspired by Prettytable
|
||||
(<a class="reference external" href="https://code.google.com/p/prettytable/">https://code.google.com/p/prettytable/</a>) but shares no code and is considerably
|
||||
more advanced, supporting auto-balancing of incomplete tables and ANSI colors among
|
||||
other things.</p>
|
||||
<p>This is an advanced ASCII table creator. It was inspired by
|
||||
[prettytable](<a class="reference external" href="https://code.google.com/p/prettytable/">https://code.google.com/p/prettytable/</a>) but shares no code.</p>
|
||||
<p>Example usage:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="k">import</span> <span class="n">evtable</span>
|
||||
|
||||
<span class="n">table</span> <span class="o">=</span> <span class="n">evtable</span><span class="o">.</span><span class="n">EvTable</span><span class="p">(</span><span class="s2">"Heading1"</span><span class="p">,</span> <span class="s2">"Heading2"</span><span class="p">,</span>
|
||||
<span class="n">table</span><span class="o">=</span><span class="p">[[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">],[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">]],</span> <span class="n">border</span><span class="o">=</span><span class="s2">"cells"</span><span class="p">)</span>
|
||||
<span class="n">table</span><span class="o">=</span><span class="p">[[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">],[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">]],</span> <span class="n">border</span><span class="o">=</span><span class="s2">"cells"</span><span class="p">)</span>
|
||||
<span class="n">table</span><span class="o">.</span><span class="n">add_column</span><span class="p">(</span><span class="s2">"This is long data"</span><span class="p">,</span> <span class="s2">"This is even longer data"</span><span class="p">)</span>
|
||||
<span class="n">table</span><span class="o">.</span><span class="n">add_row</span><span class="p">(</span><span class="s2">"This is a single row"</span><span class="p">)</span>
|
||||
<span class="nb">print</span> <span class="n">table</span>
|
||||
|
|
@ -100,9 +98,8 @@ Here we change the width and alignment of the column at index 3
|
|||
(Python starts from 0):</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">table</span><span class="o">.</span><span class="n">reformat_column</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">width</span><span class="o">=</span><span class="mi">30</span><span class="p">,</span> <span class="n">align</span><span class="o">=</span><span class="s2">"r"</span><span class="p">)</span>
|
||||
<span class="nb">print</span> <span class="n">table</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">+-----------+-------+-----+-----------------------------+---------+</span>
|
||||
|
||||
<span class="o">+-----------+-------+-----+-----------------------------+---------+</span>
|
||||
<span class="o">|</span> <span class="n">Heading1</span> <span class="o">|</span> <span class="n">Headi</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
|
||||
<span class="o">|</span> <span class="o">|</span> <span class="n">ng2</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span> <span class="o">|</span>
|
||||
<span class="o">+~~~~~~~~~~~+~~~~~~~+~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~+</span>
|
||||
|
|
@ -123,13 +120,14 @@ Here we change the width and alignment of the column at index 3
|
|||
<p>If the height is restricted, cells will be restricted from expanding
|
||||
vertically. This will lead to text contents being cropped. Each cell
|
||||
can only shrink to a minimum width and height of 1.</p>
|
||||
<p><strong>EvTable</strong> is intended to be used with <strong>ANSIString</strong> for supporting ANSI-coloured
|
||||
string types.</p>
|
||||
<p>When a cell is auto-wrapped across multiple lines, ANSI-reset sequences will be
|
||||
put at the end of each wrapped line. This means that the colour of a wrapped
|
||||
cell will not “bleed”, but it also means that eventual colour outside the table
|
||||
will not transfer “across” a table, you need to re-set the color to have it
|
||||
appear on both sides of the table string.</p>
|
||||
<p><strong>EvTable</strong> is intended to be used with [ANSIString](evennia.utils.ansi#ansistring)
|
||||
for supporting ANSI-coloured string types.</p>
|
||||
<p>When a cell is auto-wrapped across multiple lines, ANSI-reset
|
||||
sequences will be put at the end of each wrapped line. This means that
|
||||
the colour of a wrapped cell will not “bleed”, but it also means that
|
||||
eventual colour outside the table will not transfer “across” a table,
|
||||
you need to re-set the color to have it appear on both sides of the
|
||||
table string.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt id="evennia.utils.evtable.ANSITextWrapper">
|
||||
|
|
|
|||
|
|
@ -45,14 +45,8 @@ functionality.</p>
|
|||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.utils.ansi.html">evennia.utils.ansi</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.utils.batchprocessors.html">evennia.utils.batchprocessors</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-command-processor-file-syntax">Batch-command processor file syntax</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html#example-of-batch-ev-file">Example of batch.ev file:</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-code-processor-file-syntax">Batch-code processor file syntax</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="evennia.utils.batchprocessors.html#example-batch-py-file">Example batch.py file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-command-processor-file-syntax">Batch-Command processor file syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="evennia.utils.batchprocessors.html#batch-code-processor-file-syntax">Batch-Code processor file syntax</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="evennia.utils.containers.html">evennia.utils.containers</a></li>
|
||||
|
|
|
|||
|
|
@ -43,15 +43,14 @@
|
|||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$funcname(arg, arg, ...)
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>embedded in any text where any arg can be another <strong>**$funcname()**</strong> call.
|
||||
<p>embedded in any text where any arg can be another <strong>$funcname{}</strong> call.
|
||||
This functionality is turned off by default - to activate,
|
||||
<strong>settings.INLINEFUNC_ENABLED</strong> must be set to <strong>True</strong>.</p>
|
||||
<p>Each token starts with <strong>$funcname(</strong> where there must be no space
|
||||
between the <strong>$funcname</strong> and <strong>“(“</strong>. The inlinefunc ends with a matched ending parentesis.
|
||||
<strong>“)”</strong>.</p>
|
||||
<p>Inside the inlinefunc definition, one can use <strong>** to escape. This is
|
||||
<p>Each token starts with <strong>$funcname(</strong> where there must be no space between the
|
||||
$funcname and “(“. It ends with a matched ending parentesis “)”.</p>
|
||||
<p>Inside the inlinefunc definition, one can use \ to escape. This is
|
||||
mainly needed for escaping commas in flowing text (which would
|
||||
otherwise be interpreted as an argument separator), or to escape **)</strong>
|
||||
otherwise be interpreted as an argument separator), or to escape <strong>}</strong>
|
||||
when not intended to close the function block. Enclosing text in
|
||||
matched <strong>“””</strong> (triple quotes) or <strong>‘’’</strong> (triple single-quotes) will
|
||||
also escape <em>everything</em> within without needing to escape individual
|
||||
|
|
@ -61,7 +60,7 @@ modules defined by <strong>settings.INLINEFUNC_MODULES</strong>. They are identi
|
|||
by their function name (and ignored if this name starts with <strong>_</strong>). They
|
||||
should be on the following form:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">funcname</span> <span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||
<span class="c1"># ...</span>
|
||||
<span class="c1"># ...</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Here, the arguments given to <strong>$funcname(arg1,arg2)</strong> will appear as the
|
||||
|
|
@ -85,9 +84,8 @@ When this happens, the original parsed string is returned and the result of
|
|||
the <strong>stackfull</strong> inlinefunc is appended to the end. By default this is an
|
||||
error message.</p></li>
|
||||
</ul>
|
||||
<p>Syntax errors, notably failing to completely closing all inlinefunc
|
||||
blocks, will lead to the entire string remaining unparsed. Inlineparsing should
|
||||
never traceback.</p>
|
||||
<p>Syntax errors, notably not completely closing all inlinefunc blocks, will lead
|
||||
to the entire string remaining unparsed.</p>
|
||||
<hr class="docutils" />
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.inlinefuncs.random">
|
||||
|
|
@ -111,9 +109,11 @@ never traceback.</p>
|
|||
value will be returned. Otherwise it will be an integer value in the
|
||||
given range.</p>
|
||||
<p class="rubric">Example</p>
|
||||
<p><strong>$random()</strong>
|
||||
<strong>$random(5)</strong>
|
||||
<strong>$random(5, 10)</strong></p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>$random()</strong></p></li>
|
||||
<li><p><strong>$random(5)</strong></p></li>
|
||||
<li><p><strong>$random(5, 10)</strong></p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -296,19 +296,17 @@ it. It is passed to the inlinefunc.</p></li>
|
|||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>in_template</strong> (<em>str</em>) – The template to be used for nick recognition.</p></li>
|
||||
<li><p><strong>out_template</strong> (<em>str</em>) – The template to be used to replace the string
|
||||
matched by the in_template.</p></li>
|
||||
matched by the <strong>in_template</strong>.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>regex (regex)</em> – Regex to match against strings
|
||||
template (str): Template with markers {arg1}, {arg2}, etc for
|
||||
replacement using the standard .format method.</p>
|
||||
<dd class="field-even"><p><em>regex, template (regex, str)</em> – Regex to match against strings and a
|
||||
template with markers <strong>{arg1}</strong>, <strong>{arg2}</strong>, etc for replacement using the
|
||||
standard <strong>.format</strong> method.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><a class="reference internal" href="#evennia.utils.inlinefuncs.NickTemplateInvalid" title="evennia.utils.inlinefuncs.NickTemplateInvalid"><strong>evennia.utils.inlinefuncs.NickTemplateInvalid</strong></a> – If the in/out template</p></li>
|
||||
<li><p><strong>does not have a matching number of $args.</strong> – </p></li>
|
||||
</ul>
|
||||
<dd class="field-odd"><p><a class="reference internal" href="#evennia.utils.inlinefuncs.NickTemplateInvalid" title="evennia.utils.inlinefuncs.NickTemplateInvalid"><strong>inlinefuncs.NickTemplateInvalid</strong></a> – If the in/out template does not have a matching
|
||||
number of $args.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
<div class="section" id="module-evennia.utils.optionclasses">
|
||||
<span id="evennia-utils-optionclasses"></span><h1>evennia.utils.optionclasses<a class="headerlink" href="#module-evennia.utils.optionclasses" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Option classes store user- or server Options in a generic way
|
||||
while also providing validation.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.utils.optionclasses.BaseOption">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.utils.optionclasses.</code><code class="sig-name descname">BaseOption</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">description</span></em>, <em class="sig-param"><span class="n">default</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/optionclasses.html#BaseOption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.optionclasses.BaseOption" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -114,8 +116,8 @@ passing extra instructions into the validator.</p>
|
|||
<dt id="evennia.utils.optionclasses.BaseOption.save">
|
||||
<code class="sig-name descname">save</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/optionclasses.html#BaseOption.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.optionclasses.BaseOption.save" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Stores the current value using <strong>.handler.save_handler(self.key, value, **kwargs)</strong>
|
||||
where <strong>kwargs</strong> are a combination of those passed into this function and
|
||||
the ones specified by the <strong>OptionHandler</strong>.</p>
|
||||
where kwargs are a combination of those passed into this function and the
|
||||
ones specified by the OptionHandler.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Keyword Arguments</dt>
|
||||
<dd class="field-odd"><p><strong>any</strong> (<em>any</em>) – Not used by default. These are passed in from self.set
|
||||
|
|
|
|||
|
|
@ -192,36 +192,6 @@ case sensitive) match.</p></li>
|
|||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.search.search_tag">
|
||||
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tagtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_tag" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Find object based on tag or category.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) – The tag key to search for.</p></li>
|
||||
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) – The category of tag
|
||||
to search for. If not set, uncategorized
|
||||
tags will be searched.</p></li>
|
||||
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) – ‘type’ of Tag, by default
|
||||
this is either <strong>None</strong> (a normal Tag), <strong>alias</strong> or
|
||||
<strong>permission</strong>. This always apply to all queried tags.</p></li>
|
||||
<li><p><strong>kwargs</strong> (<em>any</em>) – Other optional parameter that may be supported
|
||||
by the manager method.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><p><em>matches (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>List of Objects with tags matching</dt><dd><p>the search criteria, or an empty list if no
|
||||
matches were found.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.search.search_script_tag">
|
||||
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_script_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tagtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/search.html#search_script_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.search.search_script_tag" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ should directly give the module pathname to unload.</p>
|
|||
<span class="o">...</span> <span class="c1"># test code using foo.GLOBALTHING, now set to 'mockval'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This allows for mocking constants global to the module, since
|
||||
otherwise those would not be mocked (since a module is only
|
||||
loaded once).</p>
|
||||
|
|
|
|||
|
|
@ -248,16 +248,16 @@ values with double quotes.</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>str</em> – The list represented as a string.</p>
|
||||
<dd class="field-even"><p><em>liststr (str)</em> – The list represented as a string.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">list_to_string</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">endsep</span><span class="o">=</span><span class="s1">''</span><span class="p">)</span>
|
||||
<span class="go">'1, 2, 3'</span>
|
||||
<span class="gp">>>> </span><span class="n">list_to_string</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">ensdep</span><span class="o">=</span><span class="s1">'and'</span><span class="p">)</span>
|
||||
<span class="go">'1, 2 and 3'</span>
|
||||
<span class="gp">>>> </span><span class="n">list_to_string</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">endsep</span><span class="o">=</span><span class="s1">'and'</span><span class="p">,</span> <span class="n">addquote</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="go">'"1", "2" and "3"'</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># no endsep:</span>
|
||||
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="o">-></span> <span class="s1">'1, 2, 3'</span>
|
||||
<span class="c1"># with endsep=='and':</span>
|
||||
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="o">-></span> <span class="s1">'1, 2 and 3'</span>
|
||||
<span class="c1"># with addquote and endsep</span>
|
||||
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="o">-></span> <span class="s1">'"1", "2" and "3"'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
|
@ -281,16 +281,16 @@ values with double quotes.</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>str</em> – The list represented as a string.</p>
|
||||
<dd class="field-even"><p><em>liststr (str)</em> – The list represented as a string.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">list_to_string</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">endsep</span><span class="o">=</span><span class="s1">''</span><span class="p">)</span>
|
||||
<span class="go">'1, 2, 3'</span>
|
||||
<span class="gp">>>> </span><span class="n">list_to_string</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">ensdep</span><span class="o">=</span><span class="s1">'and'</span><span class="p">)</span>
|
||||
<span class="go">'1, 2 and 3'</span>
|
||||
<span class="gp">>>> </span><span class="n">list_to_string</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">endsep</span><span class="o">=</span><span class="s1">'and'</span><span class="p">,</span> <span class="n">addquote</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="go">'"1", "2" and "3"'</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># no endsep:</span>
|
||||
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="o">-></span> <span class="s1">'1, 2, 3'</span>
|
||||
<span class="c1"># with endsep=='and':</span>
|
||||
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="o">-></span> <span class="s1">'1, 2 and 3'</span>
|
||||
<span class="c1"># with addquote and endsep</span>
|
||||
<span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="o">-></span> <span class="s1">'"1", "2" and "3"'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
|
@ -549,8 +549,10 @@ be found, the protocol flag is reset to utf-8. In any case, returns bytes.</p>
|
|||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>If <strong>text</strong> is already bytes, return it as is.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -571,8 +573,10 @@ falling back to settings.ENCODINGS.</p></li>
|
|||
<dd class="field-even"><p><em>decoded_text (str)</em> – The decoded text.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>If <strong>text</strong> is already str, return it as is.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -598,10 +602,9 @@ distance from parent.</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>any</em>) – Object to analyze. This may be either an instance or
|
||||
a class.</p></li>
|
||||
<li><p><strong>parent</strong> (<em>any</em>) – Can be either an instance, a class or the python
|
||||
path to the class.</p></li>
|
||||
<li><p><strong>obj</strong> (<em>any</em>) – Object to analyze. This may be either an instance
|
||||
or a class.</p></li>
|
||||
<li><p><strong>parent</strong> (<em>any</em>) – Can be either instance, class or python path to class.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
|
|
@ -609,8 +612,10 @@ path to the class.</p></li>
|
|||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>What differentiates this function from Python’s <strong>isinstance()</strong> is the
|
||||
flexibility in the types allowed for the object and parent being compared.</p>
|
||||
<p>What differs this function from e.g. <strong>isinstance()</strong> is that <strong>obj</strong>
|
||||
may be both an instance and a class, and parent may be an
|
||||
instance, a class, or the python path to a class (counting from
|
||||
the evennia root directory).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -633,7 +638,10 @@ any results if called from inside the game.</p>
|
|||
shortcut to having to use the full backend name.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>name</strong> (<em>str</em>) – One of ‘sqlite3’, ‘mysql’, ‘postgresql’ or ‘oracle’.</p>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<em>str</em>) – One of ‘sqlite3’, ‘mysql’, ‘postgresql’</p></li>
|
||||
<li><p><strong>'oracle'.</strong> (<em>or</em>) – </p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>uses (bool)</em> – If the given database is used or not.</p>
|
||||
|
|
@ -651,24 +659,30 @@ shortcut to having to use the full backend name.</p>
|
|||
<li><p><strong>timedelay</strong> (<em>int</em><em> or </em><em>float</em>) – The delay in seconds</p></li>
|
||||
<li><p><strong>callback</strong> (<em>callable</em>) – Will be called as <strong>callback(*args, **kwargs)</strong>
|
||||
after <strong>timedelay</strong> seconds.</p></li>
|
||||
<li><p><strong>*args</strong> – Will be used as arguments to callback</p></li>
|
||||
<li><p><strong>args</strong> (<em>any</em><em>, </em><em>optional</em>) – Will be used as arguments to callback</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Keyword Arguments</dt>
|
||||
<dd class="field-even"><ul class="simple">
|
||||
<li><p><strong>persistent</strong> (<em>bool</em>) – Make the delay persistent over a reboot or reload.</p></li>
|
||||
<li><p><strong>any</strong> – Any other keywords will be use as keyword arguments to callback.</p></li>
|
||||
<li><p><strong>persistent</strong> (<em>bool</em><em>, </em><em>optional</em>) – should make the delay persistent
|
||||
over a reboot or reload</p></li>
|
||||
<li><p><strong>any</strong> (<em>any</em>) – Will be used as keyword arguments to callback.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>deferred</em> – Will fire with callback after <strong>timedelay</strong> seconds. Note that
|
||||
if <strong>timedelay()</strong> is used in the
|
||||
<dd class="field-odd"><p><p><em>deferred (deferred)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Will fire with callback after</dt><dd><p><strong>timedelay</strong> seconds. Note that if <strong>timedelay()</strong> is used in the
|
||||
commandhandler callback chain, the callback chain can be
|
||||
defined directly in the command body and don’t need to be
|
||||
specified here.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>The task handler (<strong>evennia.scripts.taskhandler.TASK_HANDLER</strong>) will
|
||||
be called for persistent or non-persistent tasks.
|
||||
If persistent is set to True, the callback, its arguments
|
||||
|
|
@ -676,6 +690,7 @@ and other keyword arguments will be saved in the database,
|
|||
assuming they can be. The callback will be executed even after
|
||||
a server restart/reload, taking into account the specified delay
|
||||
(and server down time).</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -739,7 +754,7 @@ some checks for runtime libraries.</p>
|
|||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.has_parent">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">has_parent</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">basepath</span></em>, <em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#has_parent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.has_parent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks if <strong>basepath</strong> is somewhere in obj’s parent tree.</p>
|
||||
<dd><p>Checks if <strong>basepath</strong> is somewhere in <strong>obj</strong>’s parent tree.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
|
|
@ -1012,11 +1027,15 @@ the value, the more exact a match is required).</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>suggestions (list)</em> – Suggestions from <strong>vocabulary</strong> with a
|
||||
similarity-rating that higher than or equal to <strong>cutoff</strong>.
|
||||
<dd class="field-even"><p><p><em>suggestions (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Suggestions from <strong>vocabulary</strong> with a</dt><dd><p>similarity-rating that higher than or equal to <strong>cutoff</strong>.
|
||||
Could be empty if there are no matches.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
|
|
@ -1047,125 +1066,47 @@ array) instead of strings.</p></li>
|
|||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.format_table">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">format_table</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">table</span></em>, <em class="sig-param"><span class="n">extra_space</span><span class="o">=</span><span class="default_value">1</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#format_table"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.format_table" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Format a 2D array of strings into a multi-column table.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>table</strong> (<em>list</em>) – A list of lists to represent columns in the
|
||||
table: <strong>[[val,val,val,…], [val,val,val,…], …]</strong>, where
|
||||
<dd><p>Note: <strong>evennia.utils.evtable</strong> is more powerful than this, but this function
|
||||
can be useful when the number of columns and rows are unknown and must be
|
||||
calculated on the fly.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args.</dt><dd><dl class="simple">
|
||||
<dt>table (list): A list of lists to represent columns in the</dt><dd><p>table: <strong>[[val,val,val,…], [val,val,val,…], …]</strong>, where
|
||||
each val will be placed on a separate row in the
|
||||
column. All columns must have the same number of rows (some
|
||||
positions may be empty though).</p></li>
|
||||
<li><p><strong>extra_space</strong> (<em>int</em><em>, </em><em>optional</em>) – Sets how much <em>minimum</em> extra
|
||||
padding (in characters) should be left between columns.</p></li>
|
||||
</ul>
|
||||
positions may be empty though).</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>list</em> – A list of lists representing the rows to print out one by one.</p>
|
||||
<dt>extra_space (int, optional): Sets how much <em>minimum</em> extra</dt><dd><p>padding (in characters) should be left between columns.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><p><em>table (list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>A list of lists representing the rows to print</dt><dd><p>out one by one.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>The function formats the columns to be as wide as the widest member
|
||||
of each column.</p>
|
||||
<p><strong>evennia.utils.evtable</strong> is more powerful than this, but this
|
||||
function can be useful when the number of columns and rows are
|
||||
unknown and must be calculated on the fly.</p>
|
||||
<p>Examples:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ftable</span> <span class="o">=</span> <span class="n">format_table</span><span class="p">([[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">]])</span>
|
||||
<span class="n">string</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<p class="rubric">Example</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ftable</span> <span class="o">=</span> <span class="n">format_table</span><span class="p">([[</span><span class="o">...</span><span class="p">],</span> <span class="p">[</span><span class="o">...</span><span class="p">],</span> <span class="o">...</span><span class="p">])</span>
|
||||
<span class="k">for</span> <span class="n">ir</span><span class="p">,</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">enumarate</span><span class="p">(</span><span class="n">ftable</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="n">ir</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
|
||||
<span class="c1"># make first row white</span>
|
||||
<span class="n">string</span> <span class="o">+=</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">|w"</span> <span class="o">+</span> <span class="s2">""</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">row</span><span class="p">)</span> <span class="o">+</span> <span class="s2">"|n"</span>
|
||||
<span class="n">string</span> <span class="o">+=</span> <span class="s2">"</span><span class="se">\\</span><span class="s2">n|w"</span> <span class="o">+</span> <span class="s2">""</span><span class="n">join</span><span class="p">(</span><span class="n">row</span><span class="p">)</span> <span class="o">+</span> <span class="s2">"|n"</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">string</span> <span class="o">+=</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span> <span class="o">+</span> <span class="s2">""</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">row</span><span class="p">)</span>
|
||||
<span class="n">string</span> <span class="o">+=</span> <span class="s2">"</span><span class="se">\\</span><span class="s2">n"</span> <span class="o">+</span> <span class="s2">""</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">row</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">string</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.percent">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">percent</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">minval</span></em>, <em class="sig-param"><span class="n">maxval</span></em>, <em class="sig-param"><span class="n">formatting</span><span class="o">=</span><span class="default_value">'{:3.1f}%'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#percent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get a value in an interval as a percentage of its position
|
||||
in that interval. This also understands negative numbers.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>value</strong> (<em>number</em>) – This should be a value minval<=value<=maxval.</p></li>
|
||||
<li><p><strong>minval</strong> (<em>number</em><em> or </em><em>None</em>) – Smallest value in interval. This could be None
|
||||
for an open interval (then return will always be 100%)</p></li>
|
||||
<li><p><strong>maxval</strong> (<em>number</em><em> or </em><em>None</em>) – Biggest value in interval. This could be None
|
||||
for an open interval (then return will always be 100%)</p></li>
|
||||
<li><p><strong>formatted</strong> (<em>str</em><em>, </em><em>optional</em>) – This is a string that should
|
||||
accept one formatting tag. This will receive the
|
||||
current value as a percentage. If None, the
|
||||
raw float will be returned instead.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>str or float</em> – The formatted value or the raw percentage as a float.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>We try to handle a weird interval gracefully.</p>
|
||||
<ul class="simple">
|
||||
<li><p>If either maxval or minval is None (open interval), we (aribtrarily) assume 100%.</p></li>
|
||||
<li><p>If minval > maxval, we return 0%.</p></li>
|
||||
<li><p>If minval == maxval == value we are looking at a single value match and return 100%.</p></li>
|
||||
<li><p>If minval == maxval != value we return 0%.</p></li>
|
||||
<li><p>If value not in [minval..maxval], we set value to the closest
|
||||
boundary, so the result will be 0% or 100%, respectively.</p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.percentile">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">percentile</code><span class="sig-paren">(</span><em class="sig-param">iterable</em>, <em class="sig-param">percent</em>, <em class="sig-param">key=<function <lambda>></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#percentile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.percentile" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Find the percentile of a list of values.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>iterable</strong> (<em>iterable</em>) – A list of values. Note N MUST BE already sorted.</p></li>
|
||||
<li><p><strong>percent</strong> (<em>float</em>) – A value from 0.0 to 1.0.</p></li>
|
||||
<li><p><strong>key</strong> (<em>callable</em><em>, </em><em>optional</em>) – </p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>float</em> – The percentile of the values</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.format_grid">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">format_grid</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">elements</span></em>, <em class="sig-param"><span class="n">width</span><span class="o">=</span><span class="default_value">78</span></em>, <em class="sig-param"><span class="n">sep</span><span class="o">=</span><span class="default_value">' '</span></em>, <em class="sig-param"><span class="n">verbatim_elements</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#format_grid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.format_grid" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This helper function makes a ‘grid’ output, where it distributes the given
|
||||
string-elements as evenly as possible to fill out the given width.
|
||||
will not work well if the variation of length is very big!</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>elements</strong> (<em>iterable</em>) – A 1D list of string elements to put in the grid.</p></li>
|
||||
<li><p><strong>width</strong> (<em>int</em><em>, </em><em>optional</em>) – The width of the grid area to fill.</p></li>
|
||||
<li><p><strong>sep</strong> (<em>str</em><em>, </em><em>optional</em>) – The extra separator to put between words. If
|
||||
set to the empty string, words may run into each other.</p></li>
|
||||
<li><p><strong>verbatim_elements</strong> (<em>list</em><em>, </em><em>optional</em>) – This is a list of indices pointing to
|
||||
specific items in the <strong>elements</strong> list. An element at this index will
|
||||
not be included in the calculation of the slot sizes. It will still
|
||||
be inserted into the grid at the correct position and may be surrounded
|
||||
by padding unless filling the entire line. This is useful for embedding
|
||||
decorations in the grid, such as horizontal bars.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>gridstr</em> – The grid as a list of ready-formatted rows. We return it
|
||||
like this to make it easier to insert decorations between rows, such
|
||||
as horizontal bars.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.get_evennia_pids">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">get_evennia_pids</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#get_evennia_pids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.get_evennia_pids" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -1182,7 +1123,8 @@ Server by trying to access a PID file.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<p>This can be used to determine if we are in a subprocess by</p>
|
||||
<p>This can be used to determine if we are in a subprocess by
|
||||
something like:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">self_pid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getpid</span><span class="p">()</span>
|
||||
<span class="n">server_pid</span><span class="p">,</span> <span class="n">portal_pid</span> <span class="o">=</span> <span class="n">get_evennia_pids</span><span class="p">()</span>
|
||||
<span class="n">is_subprocess</span> <span class="o">=</span> <span class="n">self_pid</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">(</span><span class="n">server_pid</span><span class="p">,</span> <span class="n">portal_pid</span><span class="p">)</span>
|
||||
|
|
@ -1339,12 +1281,16 @@ on errors.</p></li>
|
|||
</ul>
|
||||
</dd>
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>processed_result (Object or None)</em> – This is always a single result
|
||||
or <strong>None</strong>. If <strong>None</strong>, any error reporting/handling should
|
||||
<dd class="field-odd"><p><p><em>processed_result (Object or None)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>This is always a single result</dt><dd><p>or <strong>None</strong>. If <strong>None</strong>, any error reporting/handling should
|
||||
already have happened. The returned object is of the type we are
|
||||
checking multimatches for (e.g. Objects or Commands)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
|
|
@ -1403,11 +1349,11 @@ of the game directory.</p>
|
|||
from this parent.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>dict</em> – On the form <strong>{“typeclass.path”: typeclass, …}</strong></p>
|
||||
<dd class="field-even"><p><em>typeclasses (dict)</em> – On the form {“typeclass.path”: typeclass, …}</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This will dynamically retrieve all abstract django models inheriting at any distance
|
||||
<p>This will dynamicall retrieve all abstract django models inheriting at any distance
|
||||
from the TypedObject base (aka a Typeclass) so it will work fine with any custom
|
||||
classes being added.</p>
|
||||
</dd></dl>
|
||||
|
|
@ -1415,20 +1361,11 @@ classes being added.</p>
|
|||
<dl class="py function">
|
||||
<dt id="evennia.utils.utils.interactive">
|
||||
<code class="sig-prename descclassname">evennia.utils.utils.</code><code class="sig-name descname">interactive</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">func</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/utils.html#interactive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.utils.interactive" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Decorator to make a method pausable with <strong>yield(seconds)</strong>
|
||||
and able to ask for user-input with <strong>response=yield(question)</strong>.
|
||||
For the question-asking to work, one of the args or kwargs to the
|
||||
decorated function must be named ‘caller’.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>ValueError</strong> – If asking an interactive question but the decorated
|
||||
function has no arg or kwarg named ‘caller’.</p></li>
|
||||
<li><p><strong>ValueError</strong> – If passing non int/float to yield using for pausing.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Examples</p>
|
||||
<dd><p>Decorator to make a method pausable with yield(seconds) and able to ask for
|
||||
user-input with <strong>response=yield(question)</strong>. For the question-asking to
|
||||
work, ‘caller’ must the name of an argument or kwarg to the decorated
|
||||
function.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@interactive</span>
|
||||
<span class="k">def</span> <span class="nf">myfunc</span><span class="p">(</span><span class="n">caller</span><span class="p">):</span>
|
||||
<span class="n">caller</span><span class="o">.</span><span class="n">msg</span><span class="p">(</span><span class="s2">"This is a test"</span><span class="p">)</span>
|
||||
|
|
@ -1443,7 +1380,7 @@ function has no arg or kwarg named ‘caller’.</p></li>
|
|||
</pre></div>
|
||||
</div>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This turns the decorated function or method into a generator.</p>
|
||||
<p>This turns the method into a generator!</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ inputer’s timezone. Always returns a result in UTC.</p>
|
|||
<li><p><strong>account</strong> (<a class="reference internal" href="evennia.accounts.models.html#evennia.accounts.models.AccountDB" title="evennia.accounts.models.AccountDB"><em>AccountDB</em></a>) – The Account performing this lookup. Unless <strong>from_tz</strong> is provided,
|
||||
the account’s timezone option will be used.</p></li>
|
||||
<li><p><strong>from_tz</strong> (<em>pytz.timezone</em>) – An instance of a pytz timezone object from the
|
||||
user. If not provided, tries to use the timezone option of <strong>account</strong>.
|
||||
user. If not provided, tries to use the timezone option of the <strong>account</strong>.
|
||||
If neither one is provided, defaults to UTC.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -36,202 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.web.api.filters">
|
||||
<span id="evennia-web-api-filters"></span><h1>evennia.web.api.filters<a class="headerlink" href="#module-evennia.web.api.filters" title="Permalink to this headline">¶</a></h1>
|
||||
<p>FilterSets allow clients to specify querystrings that will determine the data
|
||||
that is retrieved in GET requests. By default, Django Rest Framework uses the
|
||||
‘django-filter’ package as its backend. Django-filter also has a section in its
|
||||
documentation specifically regarding DRF integration.</p>
|
||||
<p><a class="reference external" href="https://django-filter.readthedocs.io/en/latest/guide/rest_framework.html">https://django-filter.readthedocs.io/en/latest/guide/rest_framework.html</a></p>
|
||||
<dl class="py function">
|
||||
<dt id="evennia.web.api.filters.get_tag_query">
|
||||
<code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">get_tag_query</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">tag_type</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>str<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">key</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> → django.db.models.query_utils.Q<a class="reference internal" href="../_modules/evennia/web/api/filters.html#get_tag_query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.get_tag_query" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a Q object for searching by tag names for typeclasses
|
||||
:param tag_type: The type of tag (None, ‘alias’, etc)
|
||||
:type tag_type: str or None
|
||||
:param key: The name of the tag
|
||||
:type key: str</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>A Q object that for searching by this tag type and name</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.TagTypeFilter">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">TagTypeFilter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">field_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">lookup_expr</span><span class="o">=</span><span class="default_value">'exact'</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">method</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">distinct</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#TagTypeFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.TagTypeFilter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django_filters.filters.CharFilter</span></code></p>
|
||||
<p>This class lets you create different filters for tags of a specified db_tagtype.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.TagTypeFilter.tag_type">
|
||||
<code class="sig-name descname">tag_type</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.filters.TagTypeFilter.tag_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.filters.TagTypeFilter.filter">
|
||||
<code class="sig-name descname">filter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">qs</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#TagTypeFilter.filter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.TagTypeFilter.filter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.AliasFilter">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">AliasFilter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">field_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">lookup_expr</span><span class="o">=</span><span class="default_value">'exact'</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">method</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">distinct</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#AliasFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.AliasFilter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.filters.TagTypeFilter" title="evennia.web.api.filters.TagTypeFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.TagTypeFilter</span></code></a></p>
|
||||
<p>A filter for objects by their aliases (tags with a tagtype of ‘alias’</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.AliasFilter.tag_type">
|
||||
<code class="sig-name descname">tag_type</code><em class="property"> = 'alias'</em><a class="headerlink" href="#evennia.web.api.filters.AliasFilter.tag_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.PermissionFilter">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">PermissionFilter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">field_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">lookup_expr</span><span class="o">=</span><span class="default_value">'exact'</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">method</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">distinct</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">exclude</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#PermissionFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.PermissionFilter" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.filters.TagTypeFilter" title="evennia.web.api.filters.TagTypeFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.TagTypeFilter</span></code></a></p>
|
||||
<p>A filter for objects by their permissions (tags with a tagtype of ‘permission’</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.PermissionFilter.tag_type">
|
||||
<code class="sig-name descname">tag_type</code><em class="property"> = 'permission'</em><a class="headerlink" href="#evennia.web.api.filters.PermissionFilter.tag_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.BaseTypeclassFilterSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">BaseTypeclassFilterSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">queryset</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">request</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prefix</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#BaseTypeclassFilterSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.BaseTypeclassFilterSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django_filters.rest_framework.filterset.FilterSet</span></code></p>
|
||||
<p>A parent class with filters for aliases and permissions</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.filters.BaseTypeclassFilterSet.filter_name">
|
||||
<em class="property">static </em><code class="sig-name descname">filter_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">queryset</span></em>, <em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#BaseTypeclassFilterSet.filter_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.BaseTypeclassFilterSet.filter_name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Filters a queryset by aliases or the key of the typeclass
|
||||
:param queryset: The queryset being filtered
|
||||
:param name: The name of the field
|
||||
:param value: The value passed in from GET params</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>The filtered queryset</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.BaseTypeclassFilterSet.base_filters">
|
||||
<code class="sig-name descname">base_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.BaseTypeclassFilterSet.base_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.BaseTypeclassFilterSet.declared_filters">
|
||||
<code class="sig-name descname">declared_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.BaseTypeclassFilterSet.declared_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.ObjectDBFilterSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">ObjectDBFilterSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">queryset</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">request</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prefix</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#ObjectDBFilterSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.ObjectDBFilterSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.filters.BaseTypeclassFilterSet" title="evennia.web.api.filters.BaseTypeclassFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.BaseTypeclassFilterSet</span></code></a></p>
|
||||
<p>This adds filters for ObjectDB instances - characters, rooms, exits, etc</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.ObjectDBFilterSet.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/filters.html#ObjectDBFilterSet.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.ObjectDBFilterSet.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ObjectDBFilterSet.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.filters.ObjectDBFilterSet.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.objects.models.html#evennia.objects.models.ObjectDB" title="evennia.objects.models.ObjectDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.models.ObjectDB</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ObjectDBFilterSet.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_key', 'db_typeclass_path', 'db_tags__db_key', 'db_tags__db_category', 'db_location__db_key', 'db_home__db_key', 'db_location__id', 'db_home__id']</em><a class="headerlink" href="#evennia.web.api.filters.ObjectDBFilterSet.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ObjectDBFilterSet.base_filters">
|
||||
<code class="sig-name descname">base_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'db_home__db_key': <django_filters.filters.CharFilter object>, 'db_home__id': <django_filters.filters.NumberFilter object>, 'db_key': <django_filters.filters.CharFilter object>, 'db_location__db_key': <django_filters.filters.CharFilter object>, 'db_location__id': <django_filters.filters.NumberFilter object>, 'db_tags__db_category': <django_filters.filters.CharFilter object>, 'db_tags__db_key': <django_filters.filters.CharFilter object>, 'db_typeclass_path': <django_filters.filters.CharFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.ObjectDBFilterSet.base_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ObjectDBFilterSet.declared_filters">
|
||||
<code class="sig-name descname">declared_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.ObjectDBFilterSet.declared_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.AccountDBFilterSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">AccountDBFilterSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">queryset</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">request</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prefix</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#AccountDBFilterSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.AccountDBFilterSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.filters.BaseTypeclassFilterSet" title="evennia.web.api.filters.BaseTypeclassFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.BaseTypeclassFilterSet</span></code></a></p>
|
||||
<p>This adds filters for Account objects</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.AccountDBFilterSet.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/filters.html#AccountDBFilterSet.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.AccountDBFilterSet.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.AccountDBFilterSet.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.filters.AccountDBFilterSet.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.accounts.models.html#evennia.accounts.models.AccountDB" title="evennia.accounts.models.AccountDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.accounts.models.AccountDB</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.AccountDBFilterSet.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_key', 'db_typeclass_path', 'db_tags__db_key', 'db_tags__db_category', 'username', 'db_is_connected', 'db_is_bot']</em><a class="headerlink" href="#evennia.web.api.filters.AccountDBFilterSet.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.AccountDBFilterSet.base_filters">
|
||||
<code class="sig-name descname">base_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'db_is_bot': <django_filters.rest_framework.filters.BooleanFilter object>, 'db_is_connected': <django_filters.rest_framework.filters.BooleanFilter object>, 'db_key': <django_filters.filters.CharFilter object>, 'db_tags__db_category': <django_filters.filters.CharFilter object>, 'db_tags__db_key': <django_filters.filters.CharFilter object>, 'db_typeclass_path': <django_filters.filters.CharFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>, 'username': <django_filters.filters.CharFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.AccountDBFilterSet.base_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.AccountDBFilterSet.declared_filters">
|
||||
<code class="sig-name descname">declared_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.AccountDBFilterSet.declared_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.ScriptDBFilterSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.filters.</code><code class="sig-name descname">ScriptDBFilterSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">queryset</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">request</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">prefix</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/filters.html#ScriptDBFilterSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.ScriptDBFilterSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.filters.BaseTypeclassFilterSet" title="evennia.web.api.filters.BaseTypeclassFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.BaseTypeclassFilterSet</span></code></a></p>
|
||||
<p>This adds filters for Script objects</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.filters.ScriptDBFilterSet.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/filters.html#ScriptDBFilterSet.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.filters.ScriptDBFilterSet.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ScriptDBFilterSet.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.filters.ScriptDBFilterSet.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.scripts.models.html#evennia.scripts.models.ScriptDB" title="evennia.scripts.models.ScriptDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.models.ScriptDB</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ScriptDBFilterSet.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_key', 'db_typeclass_path', 'db_tags__db_key', 'db_tags__db_category', 'db_desc', 'db_obj__db_key', 'db_obj__id', 'db_account__id', 'db_account__username', 'db_is_active', 'db_persistent', 'db_interval']</em><a class="headerlink" href="#evennia.web.api.filters.ScriptDBFilterSet.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ScriptDBFilterSet.base_filters">
|
||||
<code class="sig-name descname">base_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'db_account__id': <django_filters.filters.NumberFilter object>, 'db_account__username': <django_filters.filters.CharFilter object>, 'db_desc': <django_filters.filters.CharFilter object>, 'db_interval': <django_filters.filters.NumberFilter object>, 'db_is_active': <django_filters.rest_framework.filters.BooleanFilter object>, 'db_key': <django_filters.filters.CharFilter object>, 'db_obj__db_key': <django_filters.filters.CharFilter object>, 'db_obj__id': <django_filters.filters.NumberFilter object>, 'db_persistent': <django_filters.rest_framework.filters.BooleanFilter object>, 'db_tags__db_category': <django_filters.filters.CharFilter object>, 'db_tags__db_key': <django_filters.filters.CharFilter object>, 'db_typeclass_path': <django_filters.filters.CharFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.ScriptDBFilterSet.base_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.filters.ScriptDBFilterSet.declared_filters">
|
||||
<code class="sig-name descname">declared_filters</code><em class="property"> = {'alias': <evennia.web.api.filters.AliasFilter object>, 'name': <django_filters.filters.CharFilter object>, 'permission': <evennia.web.api.filters.PermissionFilter object>}</em><a class="headerlink" href="#evennia.web.api.filters.ScriptDBFilterSet.declared_filters" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-web-api-filters">
|
||||
<h1>evennia.web.api.filters<a class="headerlink" href="#evennia-web-api-filters" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,103 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.web.api.permissions">
|
||||
<span id="evennia-web-api-permissions"></span><h1>evennia.web.api.permissions<a class="headerlink" href="#module-evennia.web.api.permissions" title="Permalink to this headline">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.permissions.</code><code class="sig-name descname">EvenniaPermission</code><a class="reference internal" href="../_modules/evennia/web/api/permissions.html#EvenniaPermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.permissions.BasePermission</span></code></p>
|
||||
<p>A Django Rest Framework permission class that allows us to use
|
||||
Evennia’s permission structure. Based on the action in a given
|
||||
view, we’ll check a corresponding Evennia access/lock check.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.MINIMUM_LIST_PERMISSION">
|
||||
<code class="sig-name descname">MINIMUM_LIST_PERMISSION</code><em class="property"> = 'builder'</em><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.MINIMUM_LIST_PERMISSION" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.MINIMUM_CREATE_PERMISSION">
|
||||
<code class="sig-name descname">MINIMUM_CREATE_PERMISSION</code><em class="property"> = 'builder'</em><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.MINIMUM_CREATE_PERMISSION" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.view_locks">
|
||||
<code class="sig-name descname">view_locks</code><em class="property"> = ['examine']</em><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.view_locks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.destroy_locks">
|
||||
<code class="sig-name descname">destroy_locks</code><em class="property"> = ['delete']</em><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.destroy_locks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.update_locks">
|
||||
<code class="sig-name descname">update_locks</code><em class="property"> = ['control', 'edit']</em><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.update_locks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.has_permission">
|
||||
<code class="sig-name descname">has_permission</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">request</span></em>, <em class="sig-param"><span class="n">view</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/permissions.html#EvenniaPermission.has_permission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.has_permission" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks for permissions</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>request</strong> (<em>Request</em>) – The incoming request object.</p></li>
|
||||
<li><p><strong>view</strong> (<em>View</em>) – The django view we are checking permission for.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>bool</em> – If permission is granted or not. If we return False here, a PermissionDenied
|
||||
error will be raised from the view.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method is a check that always happens first. If there’s an object involved,
|
||||
such as with retrieve, update, or delete, then the has_object_permission method
|
||||
is called after this, assuming this returns <strong>True</strong>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.check_locks">
|
||||
<em class="property">static </em><code class="sig-name descname">check_locks</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">user</span></em>, <em class="sig-param"><span class="n">locks</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/permissions.html#EvenniaPermission.check_locks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.check_locks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks access for user for object with given locks
|
||||
:param obj: Object instance we’re checking
|
||||
:param user: User who we’re checking permissions
|
||||
:type user: Account
|
||||
:param locks: list of lockstrings
|
||||
:type locks: list</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><em>bool</em> – True if they have access, False if they don’t</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.permissions.EvenniaPermission.has_object_permission">
|
||||
<code class="sig-name descname">has_object_permission</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">request</span></em>, <em class="sig-param"><span class="n">view</span></em>, <em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/permissions.html#EvenniaPermission.has_object_permission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.permissions.EvenniaPermission.has_object_permission" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks object-level permissions after has_permission</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>request</strong> (<em>Request</em>) – The incoming request object.</p></li>
|
||||
<li><p><strong>view</strong> (<em>View</em>) – The django view we are checking permission for.</p></li>
|
||||
<li><p><strong>obj</strong> – Object we’re checking object-level permissions for</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p><em>bool</em> – If permission is granted or not. If we return False here, a PermissionDenied
|
||||
error will be raised from the view.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p class="rubric">Notes</p>
|
||||
<p>This method assumes that has_permission has already returned True. We check
|
||||
equivalent Evennia permissions in the request.user to determine if they can
|
||||
complete the action.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-web-api-permissions">
|
||||
<h1>evennia.web.api.permissions<a class="headerlink" href="#evennia-web-api-permissions" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,296 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.web.api.serializers">
|
||||
<span id="evennia-web-api-serializers"></span><h1>evennia.web.api.serializers<a class="headerlink" href="#module-evennia.web.api.serializers" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Serializers in the Django Rest Framework are similar to Forms in normal django.
|
||||
They’re used for transmitting and validating data, both going to clients and
|
||||
coming to the server. However, where forms often contained presentation logic,
|
||||
such as specifying widgets to use for selection, serializers typically leave
|
||||
those decisions in the hands of clients, and are more focused on converting
|
||||
data from the server to JSON (serialization) for a response, and validating
|
||||
and converting JSON data sent from clients to our enpoints into python objects,
|
||||
often django model instances, that we can use (deserialization).</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.AttributeSerializer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">AttributeSerializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#AttributeSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.AttributeSerializer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.serializers.ModelSerializer</span></code></p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.AttributeSerializer.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#AttributeSerializer.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.AttributeSerializer.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.AttributeSerializer.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.serializers.AttributeSerializer.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.typeclasses.attributes.html#evennia.typeclasses.attributes.Attribute" title="evennia.typeclasses.attributes.Attribute"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.attributes.Attribute</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.AttributeSerializer.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_key', 'db_category', 'db_attrtype', 'value_display', 'db_value']</em><a class="headerlink" href="#evennia.web.api.serializers.AttributeSerializer.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.AttributeSerializer.get_value_display">
|
||||
<em class="property">static </em><code class="sig-name descname">get_value_display</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span><span class="p">:</span> <span class="n"><a class="reference internal" href="evennia.typeclasses.attributes.html#evennia.typeclasses.attributes.Attribute" title="evennia.typeclasses.attributes.Attribute">evennia.typeclasses.attributes.Attribute</a></span></em><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/evennia/web/api/serializers.html#AttributeSerializer.get_value_display"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.AttributeSerializer.get_value_display" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Gets the string display of an Attribute’s value for serialization
|
||||
:param obj: Attribute being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>The Attribute’s value in string format</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.TagSerializer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">TagSerializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TagSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TagSerializer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.serializers.ModelSerializer</span></code></p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.TagSerializer.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TagSerializer.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TagSerializer.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.TagSerializer.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.serializers.TagSerializer.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.typeclasses.tags.html#evennia.typeclasses.tags.Tag" title="evennia.typeclasses.tags.Tag"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.tags.Tag</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.TagSerializer.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_key', 'db_category', 'db_data', 'db_tagtype']</em><a class="headerlink" href="#evennia.web.api.serializers.TagSerializer.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.SimpleObjectDBSerializer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">SimpleObjectDBSerializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#SimpleObjectDBSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.SimpleObjectDBSerializer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.serializers.ModelSerializer</span></code></p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.SimpleObjectDBSerializer.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#SimpleObjectDBSerializer.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.SimpleObjectDBSerializer.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.SimpleObjectDBSerializer.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.serializers.SimpleObjectDBSerializer.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.SimpleObjectDBSerializer.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['id', 'db_key']</em><a class="headerlink" href="#evennia.web.api.serializers.SimpleObjectDBSerializer.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">TypeclassSerializerMixin</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TypeclassSerializerMixin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin" 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>Mixin that contains types shared by typeclasses. A note about tags, aliases, and permissions. You
|
||||
might note that the methods and fields are defined here, but they’re included explicitly in each child
|
||||
class. What gives? It’s a DRF error: serializer method fields which are inherited do not resolve correctly
|
||||
in child classes, and as of this current version (3.11) you must have them in the child classes explicitly
|
||||
to avoid field errors. Similarly, the child classes must contain the attribute serializer explicitly to
|
||||
not have them render PK-related fields.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin.shared_fields">
|
||||
<code class="sig-name descname">shared_fields</code><em class="property"> = ['id', 'db_key', 'attributes', 'db_typeclass_path', 'aliases', 'tags', 'permissions']</em><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin.shared_fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin.get_tags">
|
||||
<em class="property">static </em><code class="sig-name descname">get_tags</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TypeclassSerializerMixin.get_tags"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin.get_tags" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Serializes tags from the object’s Tagshandler
|
||||
:param obj: Typeclassed object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of TagSerializer data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin.get_aliases">
|
||||
<em class="property">static </em><code class="sig-name descname">get_aliases</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TypeclassSerializerMixin.get_aliases"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin.get_aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Serializes tags from the object’s Aliashandler
|
||||
:param obj: Typeclassed object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of TagSerializer data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin.get_permissions">
|
||||
<em class="property">static </em><code class="sig-name descname">get_permissions</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TypeclassSerializerMixin.get_permissions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin.get_permissions" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Serializes tags from the object’s Permissionshandler
|
||||
:param obj: Typeclassed object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of TagSerializer data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin.get_attributes">
|
||||
<em class="property">static </em><code class="sig-name descname">get_attributes</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TypeclassSerializerMixin.get_attributes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin.get_attributes" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Serializes attributes from the object’s AttributeHandler
|
||||
:param obj: Typeclassed object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of AttributeSerializer data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.TypeclassSerializerMixin.get_nicks">
|
||||
<em class="property">static </em><code class="sig-name descname">get_nicks</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#TypeclassSerializerMixin.get_nicks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.TypeclassSerializerMixin.get_nicks" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Serializes attributes from the object’s NicksHandler
|
||||
:param obj: Typeclassed object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of AttributeSerializer data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">ObjectDBSerializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#ObjectDBSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.serializers.TypeclassSerializerMixin" title="evennia.web.api.serializers.TypeclassSerializerMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.serializers.TypeclassSerializerMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.serializers.ModelSerializer</span></code></p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#ObjectDBSerializer.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultObject" title="evennia.objects.objects.DefaultObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultObject</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_location', 'db_home', 'contents', 'exits', 'nicks', 'id', 'db_key', 'attributes', 'db_typeclass_path', 'aliases', 'tags', 'permissions']</em><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer.Meta.read_only_fields">
|
||||
<code class="sig-name descname">read_only_fields</code><em class="property"> = ['id']</em><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer.Meta.read_only_fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer.get_exits">
|
||||
<em class="property">static </em><code class="sig-name descname">get_exits</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#ObjectDBSerializer.get_exits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer.get_exits" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Gets exits for the object
|
||||
:param obj: Object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of data from SimpleObjectDBSerializer</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.ObjectDBSerializer.get_contents">
|
||||
<em class="property">static </em><code class="sig-name descname">get_contents</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#ObjectDBSerializer.get_contents"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.ObjectDBSerializer.get_contents" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Gets non-exits for the object
|
||||
:param obj: Object being serialized</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of data from SimpleObjectDBSerializer</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.AccountSerializer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">AccountSerializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#AccountSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.AccountSerializer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.serializers.TypeclassSerializerMixin" title="evennia.web.api.serializers.TypeclassSerializerMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.serializers.TypeclassSerializerMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.serializers.ModelSerializer</span></code></p>
|
||||
<p>This uses the DefaultAccount object to have access to the sessions property</p>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.serializers.AccountSerializer.get_session_ids">
|
||||
<em class="property">static </em><code class="sig-name descname">get_session_ids</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#AccountSerializer.get_session_ids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.AccountSerializer.get_session_ids" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Gets a list of session IDs connected to this Account
|
||||
:param obj: Account we’re grabbing sessions from
|
||||
:type obj: DefaultAccount</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>List of session IDs</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.AccountSerializer.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#AccountSerializer.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.AccountSerializer.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.AccountSerializer.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.serializers.AccountSerializer.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.accounts.accounts.html#evennia.accounts.accounts.DefaultAccount" title="evennia.accounts.accounts.DefaultAccount"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.accounts.accounts.DefaultAccount</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.AccountSerializer.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['username', 'session_ids', 'nicks', 'id', 'db_key', 'attributes', 'db_typeclass_path', 'aliases', 'tags', 'permissions']</em><a class="headerlink" href="#evennia.web.api.serializers.AccountSerializer.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.AccountSerializer.Meta.read_only_fields">
|
||||
<code class="sig-name descname">read_only_fields</code><em class="property"> = ['id']</em><a class="headerlink" href="#evennia.web.api.serializers.AccountSerializer.Meta.read_only_fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.ScriptDBSerializer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.serializers.</code><code class="sig-name descname">ScriptDBSerializer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#ScriptDBSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.ScriptDBSerializer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.serializers.TypeclassSerializerMixin" title="evennia.web.api.serializers.TypeclassSerializerMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.serializers.TypeclassSerializerMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.serializers.ModelSerializer</span></code></p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.serializers.ScriptDBSerializer.Meta">
|
||||
<em class="property">class </em><code class="sig-name descname">Meta</code><a class="reference internal" href="../_modules/evennia/web/api/serializers.html#ScriptDBSerializer.Meta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.serializers.ScriptDBSerializer.Meta" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.ScriptDBSerializer.Meta.model">
|
||||
<code class="sig-name descname">model</code><a class="headerlink" href="#evennia.web.api.serializers.ScriptDBSerializer.Meta.model" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.scripts.models.html#evennia.scripts.models.ScriptDB" title="evennia.scripts.models.ScriptDB"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.models.ScriptDB</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.ScriptDBSerializer.Meta.fields">
|
||||
<code class="sig-name descname">fields</code><em class="property"> = ['db_interval', 'db_persistent', 'db_start_delay', 'db_is_active', 'db_repeats', 'id', 'db_key', 'attributes', 'db_typeclass_path', 'aliases', 'tags', 'permissions']</em><a class="headerlink" href="#evennia.web.api.serializers.ScriptDBSerializer.Meta.fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.serializers.ScriptDBSerializer.Meta.read_only_fields">
|
||||
<code class="sig-name descname">read_only_fields</code><em class="property"> = ['id']</em><a class="headerlink" href="#evennia.web.api.serializers.ScriptDBSerializer.Meta.read_only_fields" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-web-api-serializers">
|
||||
<h1>evennia.web.api.serializers<a class="headerlink" href="#evennia-web-api-serializers" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,74 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.web.api.tests">
|
||||
<span id="evennia-web-api-tests"></span><h1>evennia.web.api.tests<a class="headerlink" href="#module-evennia.web.api.tests" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Tests for the REST API</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.tests.</code><code class="sig-name descname">TestEvenniaRESTApi</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">methodName</span><span class="o">=</span><span class="default_value">'runTest'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="evennia.utils.test_resources.html#evennia.utils.test_resources.EvenniaTest" title="evennia.utils.test_resources.EvenniaTest"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.utils.test_resources.EvenniaTest</span></code></a></p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.client_class">
|
||||
<code class="sig-name descname">client_class</code><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.client_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.test.APIClient</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.maxDiff">
|
||||
<code class="sig-name descname">maxDiff</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.maxDiff" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.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/web/api/tests.html#TestEvenniaRESTApi.setUp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Sets up testing environment</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.tearDown">
|
||||
<code class="sig-name descname">tearDown</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.tearDown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.tearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.get_view_details">
|
||||
<code class="sig-name descname">get_view_details</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">action</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.get_view_details"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.get_view_details" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Helper function for generating list of named tuples</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.test_retrieve">
|
||||
<code class="sig-name descname">test_retrieve</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.test_retrieve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.test_retrieve" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.test_update">
|
||||
<code class="sig-name descname">test_update</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.test_update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.test_update" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.test_delete">
|
||||
<code class="sig-name descname">test_delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.test_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.test_delete" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.test_list">
|
||||
<code class="sig-name descname">test_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.test_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.test_list" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.test_create">
|
||||
<code class="sig-name descname">test_create</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.test_create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.test_create" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.tests.TestEvenniaRESTApi.test_set_attribute">
|
||||
<code class="sig-name descname">test_set_attribute</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/tests.html#TestEvenniaRESTApi.test_set_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.tests.TestEvenniaRESTApi.test_set_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-web-api-tests">
|
||||
<h1>evennia.web.api.tests<a class="headerlink" href="#evennia-web-api-tests" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,22 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.web.api.urls">
|
||||
<span id="evennia-web-api-urls"></span><h1>evennia.web.api.urls<a class="headerlink" href="#module-evennia.web.api.urls" title="Permalink to this headline">¶</a></h1>
|
||||
<p>The Django Rest Framework provides a way of generating urls for different
|
||||
views that implement standard CRUD operations in a quick way, using ‘routers’
|
||||
and ‘viewsets’. A viewset implements standard CRUD actions and any custom actions
|
||||
that you want, and then a router will automatically generate URLs based on the
|
||||
actions that it detects for a viewset. For example, below we create a DefaultRouter.
|
||||
We then register ObjectDBViewSet, a viewset for CRUD operations for ObjectDB
|
||||
instances, to the ‘objects’ base endpoint. That will generate a number of URLs
|
||||
like the following:
|
||||
list objects: action: GET, url: /objects/, view name: object-list
|
||||
create object: action: POST, url: /objects/, view name: object-list
|
||||
retrieve object: action: GET, url: /objects/<:pk>, view name: object-detail
|
||||
update object: action: POST, url: /objects/<:pk>, view name: object-detail
|
||||
delete object: action: DELETE, url: /objects/<:pk>, view name: object-detail
|
||||
set attribute: action: POST, url: /objects/<:pk>/set-attribute, view name: object-set-attribute</p>
|
||||
<div class="section" id="evennia-web-api-urls">
|
||||
<h1>evennia.web.api.urls<a class="headerlink" href="#evennia-web-api-urls" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,304 +36,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-evennia.web.api.views">
|
||||
<span id="evennia-web-api-views"></span><h1>evennia.web.api.views<a class="headerlink" href="#module-evennia.web.api.views" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Views are the functions that are called by different url endpoints.
|
||||
The Django Rest Framework provides collections called ‘ViewSets’, which
|
||||
can generate a number of views for the common CRUD operations.</p>
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.TypeclassViewSetMixin">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">TypeclassViewSetMixin</code><a class="reference internal" href="../_modules/evennia/web/api/views.html#TypeclassViewSetMixin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.TypeclassViewSetMixin" 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 mixin adds some shared functionality to each viewset of a typeclass. They all use the same
|
||||
permission classes and filter backend. You can override any of these in your own viewsets.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.TypeclassViewSetMixin.permission_classes">
|
||||
<code class="sig-name descname">permission_classes</code><em class="property"> = [<class 'evennia.web.api.permissions.EvenniaPermission'>]</em><a class="headerlink" href="#evennia.web.api.views.TypeclassViewSetMixin.permission_classes" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.TypeclassViewSetMixin.filter_backends">
|
||||
<code class="sig-name descname">filter_backends</code><em class="property"> = [<class 'django_filters.rest_framework.backends.DjangoFilterBackend'>]</em><a class="headerlink" href="#evennia.web.api.views.TypeclassViewSetMixin.filter_backends" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="evennia.web.api.views.TypeclassViewSetMixin.set_attribute">
|
||||
<code class="sig-name descname">set_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">request</span></em>, <em class="sig-param"><span class="n">pk</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#TypeclassViewSetMixin.set_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.TypeclassViewSetMixin.set_attribute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This is an example of a custom action added to a viewset. Based on the name of the
|
||||
method, it will create a default url_name (used for reversing) and url_path.
|
||||
The ‘pk’ argument is automatically passed to this action because it has a url path
|
||||
of the format <object type>/:pk/set-attribute. The get_object method is automatically
|
||||
set in the expected viewset classes that will inherit this, using the pk that’s
|
||||
passed along to retrieve the object.</p>
|
||||
<p>This action will set an attribute if the db_value is defined, or remove it
|
||||
if no db_value is provided.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">ObjectDBViewSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#ObjectDBViewSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.views.TypeclassViewSetMixin" title="evennia.web.api.views.TypeclassViewSetMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.views.TypeclassViewSetMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.viewsets.ModelViewSet</span></code></p>
|
||||
<p>An example of a basic viewset for all ObjectDB instances. It declares the
|
||||
serializer to use for both retrieving and changing/creating/deleting
|
||||
instances. Serializers are similar to django forms, used for the
|
||||
transmitting of data (typically json).</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.serializer_class">
|
||||
<code class="sig-name descname">serializer_class</code><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.serializer_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.web.api.serializers.html#evennia.web.api.serializers.ObjectDBSerializer" title="evennia.web.api.serializers.ObjectDBSerializer"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.serializers.ObjectDBSerializer</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.queryset">
|
||||
<code class="sig-name descname">queryset</code><em class="property"> = <QuerySet [Dummy, Limbo, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, Red button, '...(remaining elements truncated)...']></em><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.queryset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.filterset_class">
|
||||
<code class="sig-name descname">filterset_class</code><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.filterset_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.web.api.filters.html#evennia.web.api.filters.ObjectDBFilterSet" title="evennia.web.api.filters.ObjectDBFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.ObjectDBFilterSet</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.basename">
|
||||
<code class="sig-name descname">basename</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.basename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.description">
|
||||
<code class="sig-name descname">description</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.description" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.detail">
|
||||
<code class="sig-name descname">detail</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.detail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.name">
|
||||
<code class="sig-name descname">name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ObjectDBViewSet.suffix">
|
||||
<code class="sig-name descname">suffix</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ObjectDBViewSet.suffix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">CharacterViewSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#CharacterViewSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.views.ObjectDBViewSet" title="evennia.web.api.views.ObjectDBViewSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.views.ObjectDBViewSet</span></code></a></p>
|
||||
<p>This overrides the queryset to only retrieve Character objects
|
||||
based on your DefaultCharacter typeclass path.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet.queryset">
|
||||
<code class="sig-name descname">queryset</code><em class="property"> = <QuerySet [Dummy]></em><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet.queryset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet.basename">
|
||||
<code class="sig-name descname">basename</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet.basename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet.description">
|
||||
<code class="sig-name descname">description</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet.description" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet.detail">
|
||||
<code class="sig-name descname">detail</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet.detail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet.name">
|
||||
<code class="sig-name descname">name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.CharacterViewSet.suffix">
|
||||
<code class="sig-name descname">suffix</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.CharacterViewSet.suffix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.RoomViewSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">RoomViewSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#RoomViewSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.RoomViewSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.views.ObjectDBViewSet" title="evennia.web.api.views.ObjectDBViewSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.views.ObjectDBViewSet</span></code></a></p>
|
||||
<p>Viewset for Room objects</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.RoomViewSet.queryset">
|
||||
<code class="sig-name descname">queryset</code><em class="property"> = <QuerySet [Limbo]></em><a class="headerlink" href="#evennia.web.api.views.RoomViewSet.queryset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.RoomViewSet.basename">
|
||||
<code class="sig-name descname">basename</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.RoomViewSet.basename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.RoomViewSet.description">
|
||||
<code class="sig-name descname">description</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.RoomViewSet.description" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.RoomViewSet.detail">
|
||||
<code class="sig-name descname">detail</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.RoomViewSet.detail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.RoomViewSet.name">
|
||||
<code class="sig-name descname">name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.RoomViewSet.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.RoomViewSet.suffix">
|
||||
<code class="sig-name descname">suffix</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.RoomViewSet.suffix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.ExitViewSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">ExitViewSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#ExitViewSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.ExitViewSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.views.ObjectDBViewSet" title="evennia.web.api.views.ObjectDBViewSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.views.ObjectDBViewSet</span></code></a></p>
|
||||
<p>Viewset for Exit objects</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ExitViewSet.queryset">
|
||||
<code class="sig-name descname">queryset</code><em class="property"> = <QuerySet []></em><a class="headerlink" href="#evennia.web.api.views.ExitViewSet.queryset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ExitViewSet.basename">
|
||||
<code class="sig-name descname">basename</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ExitViewSet.basename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ExitViewSet.description">
|
||||
<code class="sig-name descname">description</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ExitViewSet.description" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ExitViewSet.detail">
|
||||
<code class="sig-name descname">detail</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ExitViewSet.detail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ExitViewSet.name">
|
||||
<code class="sig-name descname">name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ExitViewSet.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ExitViewSet.suffix">
|
||||
<code class="sig-name descname">suffix</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ExitViewSet.suffix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">AccountDBViewSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#AccountDBViewSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.views.TypeclassViewSetMixin" title="evennia.web.api.views.TypeclassViewSetMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.views.TypeclassViewSetMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.viewsets.ModelViewSet</span></code></p>
|
||||
<p>Viewset for Account objects</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.serializer_class">
|
||||
<code class="sig-name descname">serializer_class</code><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.serializer_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.web.api.serializers.html#evennia.web.api.serializers.AccountSerializer" title="evennia.web.api.serializers.AccountSerializer"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.serializers.AccountSerializer</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.queryset">
|
||||
<code class="sig-name descname">queryset</code><em class="property"> = <QuerySet [Dummy(account#1)]></em><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.queryset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.filterset_class">
|
||||
<code class="sig-name descname">filterset_class</code><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.filterset_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.web.api.filters.html#evennia.web.api.filters.AccountDBFilterSet" title="evennia.web.api.filters.AccountDBFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.AccountDBFilterSet</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.basename">
|
||||
<code class="sig-name descname">basename</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.basename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.description">
|
||||
<code class="sig-name descname">description</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.description" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.detail">
|
||||
<code class="sig-name descname">detail</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.detail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.name">
|
||||
<code class="sig-name descname">name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.AccountDBViewSet.suffix">
|
||||
<code class="sig-name descname">suffix</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.AccountDBViewSet.suffix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">evennia.web.api.views.</code><code class="sig-name descname">ScriptDBViewSet</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/web/api/views.html#ScriptDBViewSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#evennia.web.api.views.TypeclassViewSetMixin" title="evennia.web.api.views.TypeclassViewSetMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.views.TypeclassViewSetMixin</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">rest_framework.viewsets.ModelViewSet</span></code></p>
|
||||
<p>Viewset for Script objects</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.serializer_class">
|
||||
<code class="sig-name descname">serializer_class</code><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.serializer_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.web.api.serializers.html#evennia.web.api.serializers.ScriptDBSerializer" title="evennia.web.api.serializers.ScriptDBSerializer"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.serializers.ScriptDBSerializer</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.queryset">
|
||||
<code class="sig-name descname">queryset</code><em class="property"> = <QuerySet [<ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, <ClosedLidState closed_lid_script>, <BlinkButtonEvent blink_button>, '...(remaining elements truncated)...']></em><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.queryset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.filterset_class">
|
||||
<code class="sig-name descname">filterset_class</code><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.filterset_class" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <a class="reference internal" href="evennia.web.api.filters.html#evennia.web.api.filters.ScriptDBFilterSet" title="evennia.web.api.filters.ScriptDBFilterSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.web.api.filters.ScriptDBFilterSet</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.basename">
|
||||
<code class="sig-name descname">basename</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.basename" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.description">
|
||||
<code class="sig-name descname">description</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.description" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.detail">
|
||||
<code class="sig-name descname">detail</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.detail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.name">
|
||||
<code class="sig-name descname">name</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.web.api.views.ScriptDBViewSet.suffix">
|
||||
<code class="sig-name descname">suffix</code><em class="property"> = None</em><a class="headerlink" href="#evennia.web.api.views.ScriptDBViewSet.suffix" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="evennia-web-api-views">
|
||||
<h1>evennia.web.api.views<a class="headerlink" href="#evennia-web-api-views" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue