<spanid="evennia-contrib-building-menu"></span><h1>evennia.contrib.building_menu<aclass="headerlink"href="#module-evennia.contrib.building_menu"title="Permalink to this headline">¶</a></h1>
<p>Module containing the building menu system.</p>
<p>Evennia contributor: vincent-lg 2018</p>
<p>Building menus are in-game menus, not unlike <strong>EvMenu</strong> though using a
different approach. Building menus have been specifically designed to edit
information as a builder. Creating a building menu in a command allows
builders quick-editing of a given object, like a room. If you follow the
steps below to add the contrib, you will have access to an <strong>@edit</strong> command
that will edit any default object offering to change its key and description.</p>
<olclass="arabic">
<li><p>Import the <strong>GenericBuildingCmd</strong> class from this contrib in your <strong>mygame/commands/default_cmdset.py</strong> file:</p>
<li><p>Below, add the command in the <strong>CharacterCmdSet</strong>:</p>
<blockquote>
<div><divclass="highlight-default notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># ... These lines should exist in the file</span>
<p>The <strong>@edit</strong> command will allow you to edit any object. You will need to
specify the object name or ID as an argument. For instance: <strong>@edit here</strong>
will edit the current room. However, building menus can perform much more
than this very simple example, read on for more details.</p>
<p>Building menus can be set to edit about anything. Here is an example of
output you could obtain when editing the room:</p>
<blockquote>
<div><p>Editing the room: Limbo(#2)</p>
<p>[T]itle: the limbo room
[D]escription</p>
<blockquote>
<div><p>This is the limbo room. You can easily change this default description,
either by using the <ahref="#id1"><spanclass="problematic"id="id2">|</span></a><aclass="reference external"href="mailto:y%40desc/edit|n">y<span>@</span>desc/edit|n</a> command, or simply by entering this
menu (enter <ahref="#id3"><spanclass="problematic"id="id4">|</span></a>yd|n).</p>
</div></blockquote>
<dlclass="simple">
<dt>[E]xits:</dt><dd><p>north to A parking(#4)</p>
</dd>
</dl>
<p>[Q]uit this menu</p>
</div></blockquote>
<p>From there, you can open the title choice by pressing t. You can then
change the room title by simply entering text, and go back to the
main menu entering @ (all this is customizable). Press q to quit this menu.</p>
<p>The first thing to do is to create a new module and place a class
inheriting from <strong>BuildingMenu</strong> in it.</p>
<p>This is a very short introduction. For more details, see the online tutorial
(<aclass="reference external"href="https://github.com/evennia/evennia/wiki/Building-menus">https://github.com/evennia/evennia/wiki/Building-menus</a>) or read the
<codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">menu_setattr</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">menu</span></em>, <emclass="sig-param"><spanclass="n">choice</span></em>, <emclass="sig-param"><spanclass="n">obj</span></em>, <emclass="sig-param"><spanclass="n">string</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#menu_setattr"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.menu_setattr"title="Permalink to this definition">¶</a></dt>
<dd><p>Set the value at the specified attribute.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>menu</strong> (<aclass="reference internal"href="#evennia.contrib.building_menu.BuildingMenu"title="evennia.contrib.building_menu.BuildingMenu"><em>BuildingMenu</em></a>) – the menu object.</p></li>
<li><p><strong>choice</strong> (<em>Chocie</em>) – the specific choice.</p></li>
<li><p><strong>obj</strong> (<em>Object</em>) – the object to modify.</p></li>
<li><p><strong>string</strong> (<em>str</em>) – the string with the new value.</p></li>
</ul>
</dd>
</dl>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>This function is supposed to be used as a default to
<strong>BuildingMenu.add_choice</strong>, when an attribute name is specified
(in the <strong>attr</strong> argument) but no function <strong>on_nomatch</strong> is defined.</p>
<codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">menu_quit</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">caller</span></em>, <emclass="sig-param"><spanclass="n">menu</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#menu_quit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.menu_quit"title="Permalink to this definition">¶</a></dt>
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em>) – the caller.</p></li>
<li><p><strong>menu</strong> (<aclass="reference internal"href="#evennia.contrib.building_menu.BuildingMenu"title="evennia.contrib.building_menu.BuildingMenu"><em>BuildingMenu</em></a>) – the building menu to close.</p></li>
</ul>
</dd>
</dl>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>This callback is used by default when using the
<strong>BuildingMenu.add_choice_quit</strong> method. This method is called
<codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">menu_edit</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">caller</span></em>, <emclass="sig-param"><spanclass="n">choice</span></em>, <emclass="sig-param"><spanclass="n">obj</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#menu_edit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.menu_edit"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">CmdNoInput</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#CmdNoInput"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '__noinput_command'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">locks</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">__init__</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#CmdNoInput.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.__init__"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#CmdNoInput.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.func"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': 'No input has been found.'}</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoInput.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">CmdNoMatch</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#CmdNoMatch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '__nomatch_command'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">locks</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">__init__</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#CmdNoMatch.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.__init__"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#CmdNoMatch.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.func"title="Permalink to this definition">¶</a></dt>
<dd><p>Call the proper menu or redirect to nomatch.</p>
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': 'No input has been found.'}</em><aclass="headerlink"href="#evennia.contrib.building_menu.CmdNoMatch.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">BuildingMenuCmdSet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">cmdsetobj</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">key</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenuCmdSet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenuCmdSet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'building_menu'</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenuCmdSet.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">priority</code><emclass="property"> = 5</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenuCmdSet.priority"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_cmdset_creation</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenuCmdSet.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenuCmdSet.at_cmdset_creation"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.contrib.building_menu.BuildingMenuCmdSet'</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenuCmdSet.path"title="Permalink to this definition">¶</a></dt>
<li><p><strong>title</strong> (<em>str</em>) – the choice’s title.</p></li>
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) – the key of the letters to type to access
the choice. If not set, try to guess it based on the title.</p></li>
<li><p><strong>aliases</strong> (<em>list of str</em><em>, </em><em>optional</em>) – the allowed aliases for this choice.</p></li>
<li><p><strong>attr</strong> (<em>str</em><em>, </em><em>optional</em>) – the name of the attribute of ‘obj’ to set.</p></li>
<li><p><strong>text</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) – a text to be displayed for this
choice. It can be a callable.</p></li>
<li><p><strong>glance</strong> (<em>str</em><em> or </em><em>callable</em><em>, </em><em>optional</em>) – an at-a-glance summary of the
sub-menu shown in the main menu. It can be set to
display the current value of the attribute in the
main menu itself.</p></li>
<li><p><strong>menu</strong> (<aclass="reference internal"href="#evennia.contrib.building_menu.BuildingMenu"title="evennia.contrib.building_menu.BuildingMenu"><em>BuildingMenu</em></a><em>, </em><em>optional</em>) – the parent building menu.</p></li>
<li><p><strong>on_enter</strong> (<em>callable</em><em>, </em><em>optional</em>) – a callable to call when the
caller enters into the choice.</p></li>
<li><p><strong>on_nomatch</strong> (<em>callable</em><em>, </em><em>optional</em>) – a callable to call when no
match is entered in the choice.</p></li>
<li><p><strong>on_leave</strong> (<em>callable</em><em>, </em><em>optional</em>) – a callable to call when the caller
leaves the choice.</p></li>
<li><p><strong>caller</strong> (<em>Account</em><em> or </em><em>Object</em><em>, </em><em>optional</em>) – the caller.</p></li>
<li><p><strong>obj</strong> (<em>Object</em><em>, </em><em>optional</em>) – the object to edit.</p></li>
<emclass="property">property </em><codeclass="sig-name descname">keys</code><aclass="headerlink"href="#evennia.contrib.building_menu.Choice.keys"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a tuple of keys separated by <strong>sep_keys</strong>.</p>
<codeclass="sig-name descname">format_text</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#Choice.format_text"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.Choice.format_text"title="Permalink to this definition">¶</a></dt>
<dd><p>Format the choice text and return it, or an empty string.</p>
<codeclass="sig-name descname">enter</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">string</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#Choice.enter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.Choice.enter"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">nomatch</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">string</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#Choice.nomatch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.Choice.nomatch"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">leave</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">string</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#Choice.leave"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.Choice.leave"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">keys_go_back</code><emclass="property"> = ['@']</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.keys_go_back"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">sep_keys</code><emclass="property"> = '.'</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.sep_keys"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">joker_key</code><emclass="property"> = '*'</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.joker_key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">min_shortcut</code><emclass="property"> = 1</em><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.min_shortcut"title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="sig-name descname">current_choice</code><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.current_choice"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current choice or None.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p><em>choice (Choice)</em>– the current choice or None.</p>
</dd>
</dl>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>We use the menu keys to identify the current position of
the caller in the menu. The menu <strong>keys</strong> hold a list of
<emclass="property">property </em><codeclass="sig-name descname">relevant_choices</code><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.relevant_choices"title="Permalink to this definition">¶</a></dt>
<dd><p>Only return the relevant choices according to the current meny key.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p><em>relevant (list of Choice object)</em>– the relevant choices.</p>
</dd>
</dl>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>We use the menu keys to identify the current position of
the caller in the menu. The menu <strong>keys</strong> hold a list of
<codeclass="sig-name descname">init</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">obj</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.init"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.init"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">add_choice_quit</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">title</span><spanclass="o">=</span><spanclass="default_value">'quit the menu'</span></em>, <emclass="sig-param"><spanclass="n">key</span><spanclass="o">=</span><spanclass="default_value">'q'</span></em>, <emclass="sig-param"><spanclass="n">aliases</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">on_enter</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.add_choice_quit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.add_choice_quit"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">open</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.open"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.open"title="Permalink to this definition">¶</a></dt>
<dd><p>Open the building menu for the caller.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>This method should be called once when the building menu
has been instanciated. From there, the building menu will
be re-created automatically when the server
reloads/restarts, assuming <strong>persistent</strong> is set to <strong>True</strong>.</p>
<codeclass="sig-name descname">open_parent_menu</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.open_parent_menu"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.open_parent_menu"title="Permalink to this definition">¶</a></dt>
<dd><p>Open the parent menu, using <strong>self.parents</strong>.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>You probably don’t need to call this method directly,
since the caller can go back to the parent menu using the
<codeclass="sig-name descname">open_submenu</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">submenu_class</span></em>, <emclass="sig-param"><spanclass="n">submenu_obj</span></em>, <emclass="sig-param"><spanclass="n">parent_keys</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.open_submenu"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.open_submenu"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">move</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">back</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <emclass="sig-param"><spanclass="n">quiet</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <emclass="sig-param"><spanclass="n">string</span><spanclass="o">=</span><spanclass="default_value">''</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.move"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.move"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">close</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.close"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.close"title="Permalink to this definition">¶</a></dt>
<dd><p>Close the building menu, removing the CmdSet.</p>
<codeclass="sig-name descname">display_title</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.display_title"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.display_title"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">display_choice</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">choice</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.display_choice"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.display_choice"title="Permalink to this definition">¶</a></dt>
<ddclass="field-odd"><p><strong>choice</strong> (<aclass="reference internal"href="#evennia.contrib.building_menu.Choice"title="evennia.contrib.building_menu.Choice"><em>Choice</em></a>) – the menu choice.</p>
<codeclass="sig-name descname">display</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.display"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.display"title="Permalink to this definition">¶</a></dt>
<dd><p>Display the entire menu or a single choice, depending on the keys.</p>
<emclass="property">static </em><codeclass="sig-name descname">restore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">caller</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#BuildingMenu.restore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.BuildingMenu.restore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">init</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">obj</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#GenericBuildingMenu.init"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingMenu.init"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.building_menu.</code><codeclass="sig-name descname">GenericBuildingCmd</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#GenericBuildingCmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '@edit'</em><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/building_menu.html#GenericBuildingCmd.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd.func"title="Permalink to this definition">¶</a></dt>
<dd><p>This is the actual executing part of the command. It is
called directly after self.parse(). See the docstring of this
module for which object properties are available (beyond those
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all();'</em><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="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><aclass="headerlink"href="#evennia.contrib.building_menu.GenericBuildingCmd.search_index_entry"title="Permalink to this definition">¶</a></dt>