mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 06:16:31 +01:00
193 lines
No EOL
10 KiB
HTML
193 lines
No EOL
10 KiB
HTML
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
|
|
|
<title>Item Storage — Evennia latest documentation</title>
|
|
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
|
<script src="../_static/jquery.js"></script>
|
|
<script src="../_static/underscore.js"></script>
|
|
<script src="../_static/doctools.js"></script>
|
|
<script src="../_static/language_data.js"></script>
|
|
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
<link rel="next" title="Turn based battle system framework" href="Contrib-Turnbattle.html" />
|
|
<link rel="prev" title="Puzzles System" href="Contrib-Puzzles.html" />
|
|
</head><body>
|
|
|
|
|
|
|
|
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="../py-modindex.html" title="Python Module Index"
|
|
>modules</a> |</li>
|
|
<li class="right" >
|
|
<a href="Contrib-Turnbattle.html" title="Turn based battle system framework"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="Contrib-Puzzles.html" title="Puzzles System"
|
|
accesskey="P">previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Evennia latest</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="Contribs-Overview.html" accesskey="U">Contribs</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Item Storage</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
|
|
<div class="documentwrapper">
|
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
|
<div class="sphinxsidebarwrapper">
|
|
<p class="logo"><a href="../index.html">
|
|
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
|
|
</a></p>
|
|
<div id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script>$('#searchbox').show(0);</script>
|
|
<h3><a href="../index.html">Table of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Item Storage</a><ul>
|
|
<li><a class="reference internal" href="#installation">Installation</a></li>
|
|
<li><a class="reference internal" href="#usage">Usage</a></li>
|
|
<li><a class="reference internal" href="#technical-info">Technical info</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="Contrib-Puzzles.html"
|
|
title="previous chapter">Puzzles System</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="Contrib-Turnbattle.html"
|
|
title="next chapter">Turn based battle system framework</a></p>
|
|
<div role="note" aria-label="source link">
|
|
<!--h3>This Page</h3-->
|
|
<ul class="this-page-menu">
|
|
<li><a href="../_sources/Contribs/Contrib-Storage.md.txt"
|
|
rel="nofollow">Show Page Source</a></li>
|
|
</ul>
|
|
</div><h3>Links</h3>
|
|
<ul>
|
|
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
|
|
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
|
|
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
|
|
<li><a href="http://games.evennia.com">Game Index</a> </li>
|
|
<li>
|
|
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
|
|
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
|
|
<a href="https://evennia.blogspot.com/">Blog</a>
|
|
</li>
|
|
</ul>
|
|
<h3>Doc Versions</h3>
|
|
<ul>
|
|
|
|
<li><a href="Contrib-Storage.html">latest (main branch)</a></li>
|
|
|
|
<li><a href="../4.x/index.html">v4.0.0 branch (outdated)</a></li>
|
|
|
|
<li><a href="../3.x/index.html">v3.0.0 branch (outdated)</a></li>
|
|
|
|
<li><a href="../2.x/index.html">v2.0.0 branch (outdated)</a></li>
|
|
|
|
<li><a href="../1.x/index.html">v1.0.0 branch (outdated)</a></li>
|
|
|
|
<li><a href="../0.x/index.html">v0.9.5 branch (outdated)</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="bodywrapper">
|
|
<div class="body" role="main">
|
|
|
|
<section class="tex2jax_ignore mathjax_ignore" id="item-storage">
|
|
<h1>Item Storage<a class="headerlink" href="#item-storage" title="Permalink to this headline">¶</a></h1>
|
|
<p>Contribution by helpme (2024)</p>
|
|
<p>This module allows certain rooms to be marked as storage locations.</p>
|
|
<p>In those rooms, players can <code class="docutils literal notranslate"><span class="pre">list</span></code>, <code class="docutils literal notranslate"><span class="pre">store</span></code>, and <code class="docutils literal notranslate"><span class="pre">retrieve</span></code> items. Storages can be shared or individual.</p>
|
|
<section id="installation">
|
|
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
|
<p>This utility adds the storage-related commands. Import the module into your commands and add it to your command set to make it available.</p>
|
|
<p>Specifically, in <code class="docutils literal notranslate"><span class="pre">mygame/commands/default_cmdsets.py</span></code>:</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="o">...</span>
|
|
<span class="kn">from</span> <span class="nn">evennia.contrib.game_systems.storage</span> <span class="kn">import</span> <span class="n">StorageCmdSet</span> <span class="c1"># <---</span>
|
|
|
|
<span class="k">class</span> <span class="nc">CharacterCmdset</span><span class="p">(</span><span class="n">default_cmds</span><span class="o">.</span><span class="n">Character_CmdSet</span><span class="p">):</span>
|
|
<span class="o">...</span>
|
|
<span class="k">def</span> <span class="nf">at_cmdset_creation</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
|
<span class="o">...</span>
|
|
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">StorageCmdSet</span><span class="p">)</span> <span class="c1"># <---</span>
|
|
|
|
</pre></div>
|
|
</div>
|
|
<p>Then <code class="docutils literal notranslate"><span class="pre">reload</span></code> to make the <code class="docutils literal notranslate"><span class="pre">list</span></code>, <code class="docutils literal notranslate"><span class="pre">retrieve</span></code>, <code class="docutils literal notranslate"><span class="pre">store</span></code>, and <code class="docutils literal notranslate"><span class="pre">storage</span></code> commands available.</p>
|
|
</section>
|
|
<section id="usage">
|
|
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
|
|
<p>To mark a location as having item storage, use the <code class="docutils literal notranslate"><span class="pre">storage</span></code> command. By default this is a builder-level command. Storage can be shared, which means everyone using the storage can access all items stored there, or individual, which means only the person who stores an item can retrieve it. See <code class="docutils literal notranslate"><span class="pre">help</span> <span class="pre">storage</span></code> for further details.</p>
|
|
</section>
|
|
<section id="technical-info">
|
|
<h2>Technical info<a class="headerlink" href="#technical-info" title="Permalink to this headline">¶</a></h2>
|
|
<p>This is a tag-based system. Rooms set as storage rooms are tagged with an identifier marking them as shared or not. Items stored in those rooms are tagged with the storage room identifier and, if the storage room is not shared, the character identifier, and then they are removed from the grid i.e. their location is set to <code class="docutils literal notranslate"><span class="pre">None</span></code>. Upon retrieval, items are untagged and moved back to character inventories.</p>
|
|
<p>When a room is unmarked as storage with the <code class="docutils literal notranslate"><span class="pre">storage</span></code> command, all stored objects are untagged and dropped to the room. You should use the <code class="docutils literal notranslate"><span class="pre">storage</span></code> command to create and remove storages, as otherwise stored objects may become lost.</p>
|
|
<hr class="docutils" />
|
|
<p><small>This document page is generated from <code class="docutils literal notranslate"><span class="pre">evennia/contrib/game_systems/storage/README.md</span></code>. Changes to this
|
|
file will be overwritten, so edit that file rather than this one.</small></p>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="../py-modindex.html" title="Python Module Index"
|
|
>modules</a> |</li>
|
|
<li class="right" >
|
|
<a href="Contrib-Turnbattle.html" title="Turn based battle system framework"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="Contrib-Puzzles.html" title="Puzzles System"
|
|
>previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Evennia latest</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="Contribs-Overview.html" >Contribs</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Item Storage</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="footer" role="contentinfo">
|
|
© Copyright 2024, The Evennia developer community.
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
|
</div>
|
|
</body>
|
|
</html> |