<spanid="evennia-contrib-grid-extended-room-extended-room"></span><h1>evennia.contrib.grid.extended_room.extended_room<aclass="headerlink"href="#module-evennia.contrib.grid.extended_room.extended_room"title="Permalink to this headline">¶</a></h1>
<codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">func_state</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">roomstate</span></em>, <emclass="sig-param"><spanclass="o">*</span><spanclass="n">args</span></em>, <emclass="sig-param"><spanclass="n">looker</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">room</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#func_state"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.func_state"title="Permalink to this definition">¶</a></dt>
<dd><p>Usage: $state(roomstate, text)</p>
<p>Funcparser callable for ExtendedRoom. This is called by the FuncParser when it
returns the description of the room. Use ‘default’ for a default text when no
other states are set.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>roomstate</strong> (<em>str</em>) – A roomstate, like “morning”, “raining”. This is case insensitive.</p></li>
<li><p><strong>*args</strong>– All these will be combined into one string separated by commas.</p></li>
</ul>
</dd>
<dtclass="field-even">Keyword Arguments</dt>
<ddclass="field-even"><ulclass="simple">
<li><p><strong>looker</strong> (<em>Object</em>) – The object looking at the room. Unused by default.</p></li>
<li><p><strong>room</strong> (<aclass="reference internal"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom"title="evennia.contrib.grid.extended_room.extended_room.ExtendedRoom"><em>ExtendedRoom</em></a>) – The room being looked at.</p></li>
</ul>
</dd>
</dl>
<pclass="rubric">Example</p>
<p>$state(morning, It is a beautiful morning!)</p>
<pclass="rubric">Notes</p>
<p>We try to merge all args into one text, since this function doesn’t require more than one
argument. That way, one may be able to get away without using quotes.</p>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">ExtendedRoom</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">*</span><spanclass="n">args</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">fallback_desc</code><emclass="property"> = 'You see nothing special.'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.fallback_desc"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">room_state_tag_category</code><emclass="property"> = 'room_state'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.room_state_tag_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">months_per_year</code><emclass="property"> = 12</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.months_per_year"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">hours_per_day</code><emclass="property"> = 24</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.hours_per_day"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">desc_spring</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.desc_spring"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">desc_summer</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.desc_summer"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">desc_autumn</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.desc_autumn"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">desc_winter</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.desc_winter"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">desc</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.desc"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">details</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.details"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">room_message_rate</code><emclass="property"> = 0</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.room_message_rate"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">room_messages</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.room_messages"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_init</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.at_init"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.at_init"title="Permalink to this definition">¶</a></dt>
<dd><p>Evennia hook. Start up repeating function whenever object loads into memory.</p>
<codeclass="sig-name descname">start_repeat_broadcast_messages</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.start_repeat_broadcast_messages"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.start_repeat_broadcast_messages"title="Permalink to this definition">¶</a></dt>
<dd><p>Start repeating the broadcast messages. Only needs to be called if adding messages
<codeclass="sig-name descname">repeat_broadcast_message_to_room</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.repeat_broadcast_message_to_room"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.repeat_broadcast_message_to_room"title="Permalink to this definition">¶</a></dt>
<dd><p>Send a message to the room at room_message_rate. By default
<codeclass="sig-name descname">get_time_of_day</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.get_time_of_day"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.get_time_of_day"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the current time of day.</p>
<p>Override to customize.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p><em>str</em>– The time of day, such as ‘morning’, ‘afternoon’, ‘evening’ or ‘night’.</p>
<codeclass="sig-name descname">get_season</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.get_season"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.get_season"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the current season.</p>
<p>Override to customize.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p><em>str</em>– The season, such as ‘spring’, ‘summer’, ‘autumn’ or ‘winter’.</p>
<emclass="property">property </em><codeclass="sig-name descname">room_states</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.room_states"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">add_room_state</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">*</span><spanclass="n">room_states</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.add_room_state"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.add_room_state"title="Permalink to this definition">¶</a></dt>
<dd><p>Set a room-state or room-states to the room.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>*room_state</strong> (<em>str</em>) – A room state like ‘on_fire’ or ‘flooded’. This will affect
what <strong>desc_*</strong> and <strong>roomstate_*</strong> descriptions/inlines are used. You can add
more than one at a time.</p>
</dd>
</dl>
<pclass="rubric">Notes</p>
<p>You can also set time-based room_states this way, like ‘morning’ or ‘spring’. This
can be useful to force a particular description, but while this state is
set this way, that state will be unaffected by the passage of time. Remove
the state to let the current game time determine this type of states.</p>
<codeclass="sig-name descname">remove_room_state</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">*</span><spanclass="n">room_states</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.remove_room_state"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.remove_room_state"title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a roomstate from the room.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>*room_state</strong> (<em>str</em>) – A roomstate like ‘on_fire’ or ‘flooded’. If the</p></li>
<li><p><strong>did not have this state</strong> (<em>room</em>) –</p></li>
<li><p><strong>happens.You can remove more than one at a time.</strong> (<em>nothing</em>) –</p></li>
<codeclass="sig-name descname">clear_room_state</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.clear_room_state"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.clear_room_state"title="Permalink to this definition">¶</a></dt>
<dd><p>Clear all room states.</p>
<p>Note that fallback time-of-day and seasonal states are not affected by this, only
custom states added with <strong>.add_room_state()</strong>.</p>
<codeclass="sig-name descname">add_desc</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">desc</span></em>, <emclass="sig-param"><spanclass="n">room_state</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.add_desc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.add_desc"title="Permalink to this definition">¶</a></dt>
<dd><p>Add a custom description, matching a particular room state.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>desc</strong> (<em>str</em>) – The description to use when this roomstate is active.</p></li>
<li><p><strong>roomstate</strong> (<em>str</em><em>, </em><em>None</em>) – The roomstate to match, like ‘on_fire’, ‘flooded’, or “spring”.
If <strong>None</strong>, set the default <strong>desc</strong> fallback.</p></li>
<codeclass="sig-name descname">remove_desc</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">room_state</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.remove_desc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.remove_desc"title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a custom description.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>room_state</strong> (<em>str</em>) – The room-state description to remove.</p>
<codeclass="sig-name descname">all_desc</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.all_desc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.all_desc"title="Permalink to this definition">¶</a></dt>
<dd><p>Get all available descriptions.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p><p><em>dict</em>–</p>
<dlclass="simple">
<dt>A mapping of roomstate to description. The <strong>None</strong> key indicates the</dt><dd><p>base subscription (stored in the <strong>desc</strong> Attribute).</p>
<codeclass="sig-name descname">get_stateful_desc</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.get_stateful_desc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.get_stateful_desc"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the currently active room description based on the current roomstate.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p><em>str</em>– The current description.</p>
</dd>
</dl>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>Only one description can be active at a time. Priority order is as follows:</p>
<p>Priority order is as follows:</p>
<blockquote>
<div><olclass="arabic simple">
<li><p>Room-states set by <strong>add_roomstate()</strong> that are not seasons.
If multiple room_states are set, the first one is used, sorted alphabetically.</p></li>
<li><p>Seasons set by <strong>add_room_state()</strong>. This allows to ‘pin’ a season.</p></li>
<li><p>Time-based seasons based on the current in-game time.</p></li>
<li><p>None, if no seasons are defined in <strong>.seasons_per_year</strong>.</p></li>
</ol>
</div></blockquote>
<p>If either of the above is found, but doesn’t have a matching <strong>desc_<roomstate></strong>
description, we move on to the next priority. If no matches are found, the <strong>desc</strong>
<codeclass="sig-name descname">replace_legacy_time_of_day_markup</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">desc</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.replace_legacy_time_of_day_markup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.replace_legacy_time_of_day_markup"title="Permalink to this definition">¶</a></dt>
<dd><p>Filter description by legacy markup like <strong><morning>…</morning></strong>. Filter
out all such markings that does not match the current time. Supports
‘morning’, ‘afternoon’, ‘evening’ and ‘night’.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>desc</strong> (<em>str</em>) – The unmodified description.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><em>str</em>– A possibly modified description.</p>
</dd>
</dl>
<pclass="rubric">Notes</p>
<p>This is legacy. Use the $state markup for new rooms instead.</p>
<codeclass="sig-name descname">get_display_desc</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">looker</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.get_display_desc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.get_display_desc"title="Permalink to this definition">¶</a></dt>
<dd><p>Evennia standard hook. Dynamically get the ‘desc’ component of the object description. This
is called by the return_appearance method and in turn by the ‘look’ command.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>looker</strong> (<em>Object</em>) – Object doing the looking (unused by default).</p></li>
<li><p><strong>**kwargs</strong>– Arbitrary data for use when overriding.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><em>str</em>– The desc display string.</p>
<codeclass="sig-name descname">add_detail</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">description</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.add_detail"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.add_detail"title="Permalink to this definition">¶</a></dt>
<dd><p>This sets a new detail, using an Attribute “details”.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>detailkey</strong> (<em>str</em>) – The detail identifier to add (for
aliases you need to add multiple keys to the
same description). Case-insensitive.</p></li>
<li><p><strong>description</strong> (<em>str</em>) – The text to return when looking
at the given detailkey. This can contain funcparser directives.</p></li>
<codeclass="sig-name descname">set_detail</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">description</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.set_detail"title="Permalink to this definition">¶</a></dt>
<dd><p>This sets a new detail, using an Attribute “details”.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>detailkey</strong> (<em>str</em>) – The detail identifier to add (for
aliases you need to add multiple keys to the
same description). Case-insensitive.</p></li>
<li><p><strong>description</strong> (<em>str</em>) – The text to return when looking
at the given detailkey. This can contain funcparser directives.</p></li>
<codeclass="sig-name descname">remove_detail</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="o">*</span><spanclass="n">args</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.remove_detail"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.remove_detail"title="Permalink to this definition">¶</a></dt>
<dd><p>Delete a detail.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>key</strong> (<em>str</em>) – the detail to remove (case-insensitive).</p></li>
<codeclass="sig-name descname">del_detail</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="o">*</span><spanclass="n">args</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.del_detail"title="Permalink to this definition">¶</a></dt>
<dd><p>Delete a detail.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>key</strong> (<em>str</em>) – the detail to remove (case-insensitive).</p></li>
<codeclass="sig-name descname">get_detail</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">looker</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#ExtendedRoom.get_detail"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.get_detail"title="Permalink to this definition">¶</a></dt>
<dd><p>This will attempt to match a “detail” to look for in the room.
This will do a lower-case match followed by a startsby match. This
is called by the new <strong>look</strong> Command.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>key</strong> (<em>str</em>) – A detail identifier.</p></li>
<li><p><strong>looker</strong> (<em>Object</em><em>, </em><em>optional</em>) – The one looking.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><em>detail (str or None)</em>– A detail matching the given key, or <strong>None</strong> if
it was not found.</p>
</dd>
</dl>
<pclass="rubric">Notes</p>
<p>A detail is a way to offer more things to look at in a room
without having to add new objects. For this to work, we
require a custom <strong>look</strong> command that allows for <strong>look <detail></strong>
- the look command should defer to this method on
the current location (if it exists) before giving up on
<codeclass="sig-name descname">return_detail</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">looker</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.return_detail"title="Permalink to this definition">¶</a></dt>
<dd><p>This will attempt to match a “detail” to look for in the room.
This will do a lower-case match followed by a startsby match. This
is called by the new <strong>look</strong> Command.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>key</strong> (<em>str</em>) – A detail identifier.</p></li>
<li><p><strong>looker</strong> (<em>Object</em><em>, </em><em>optional</em>) – The one looking.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><em>detail (str or None)</em>– A detail matching the given key, or <strong>None</strong> if
it was not found.</p>
</dd>
</dl>
<pclass="rubric">Notes</p>
<p>A detail is a way to offer more things to look at in a room
without having to add new objects. For this to work, we
require a custom <strong>look</strong> command that allows for <strong>look <detail></strong>
- the look command should defer to this method on
the current location (if it exists) before giving up on
<emclass="property">exception </em><codeclass="sig-name descname">DoesNotExist</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.DoesNotExist"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="sig-name descname">MultipleObjectsReturned</code><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.MultipleObjectsReturned"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.contrib.grid.extended_room.extended_room.ExtendedRoom'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.path"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">typename</code><emclass="property"> = 'ExtendedRoom'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoom.typename"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">CmdExtendedRoomLook</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/grid/extended_room/extended_room.html#CmdExtendedRoomLook"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">look_detail</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomLook.look_detail"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.look_detail"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/grid/extended_room/extended_room.html#CmdExtendedRoomLook.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.func"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">aliases</code><emclass="property"> = ['l', 'ls']</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'look'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'no_prefix': ' l ls', '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><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomLook.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">CmdExtendedRoomDesc</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/grid/extended_room/extended_room.html#CmdExtendedRoomDesc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '@desc'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">switch_options</code><emclass="property"> = None</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.switch_options"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">locks</code><emclass="property"> = 'cmd:perm(desc) or perm(Builder)'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'building'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">parse</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomDesc.parse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.parse"title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called by the cmdhandler once the command name
has been identified. It creates a new set of member variables
that can be later accessed from self.func() (see below)</p>
<p>The following variables are available for our use when entering this
method (from the command definition, and assigned on the fly by the
cmdhandler):</p>
<blockquote>
<div><p>self.key - the name of this command (‘look’)
self.aliases - the aliases of this cmd (‘l’)
self.permissions - permission string for this command
self.help_category - overall category of command</p>
<p>self.caller - the object calling this command
self.cmdstring - the actual command name used to call this</p>
<blockquote>
<div><dlclass="simple">
<dt>(this allows you to know which alias was used,</dt><dd><p>for example)</p>
</dd>
</dl>
</div></blockquote>
<p>self.args - the raw input; everything following self.cmdstring.
self.cmdset - the cmdset from which this command was picked. Not</p>
<blockquote>
<div><p>often used (useful for commands like ‘help’ or to
list all available commands etc)</p>
</div></blockquote>
<dlclass="simple">
<dt>self.obj - the object on which this command was defined. It is often</dt><dd><p>the same as self.caller.</p>
</dd>
</dl>
</div></blockquote>
<p>A MUX command has the following possible syntax:</p>
<blockquote>
<div><p>name[ with several words][/switch[/switch..]] arg1[,arg2,…] [[=|,] arg[,..]]</p>
</div></blockquote>
<p>The ‘name[ with several words]’ part is already dealt with by the
cmdhandler at this point, and stored in self.cmdname (we don’t use
it here). The rest of the command is stored in self.args, which can
start with the switch indicator /.</p>
<dlclass="simple">
<dt>Optional variables to aid in parsing, if set:</dt><dd><dlclass="simple">
<dt>self.switch_options - (tuple of valid /switches expected by this</dt><dd><p>command (without the /))</p>
</dd>
<dt>self.rhs_split - Alternate string delimiter or tuple of strings</dt><dd><p>to separate left/right hand sides. tuple form
gives priority split to first string delimiter.</p>
</dd>
</dl>
</dd>
</dl>
<p>This parser breaks self.args into its constituents and stores them in the
following variables:</p>
<blockquote>
<div><p>self.switches = [list of /switches (without the /)]
self.raw = This is the raw argument input, including switches
self.args = This is re-defined to be everything <em>except</em> the switches
self.lhs = Everything to the left of = (lhs:’left-hand side’). If</p>
<blockquote>
<div><p>no = is found, this is identical to self.args.</p>
</div></blockquote>
<dlclass="simple">
<dt>self.rhs: Everything to the right of = (rhs:’right-hand side’).</dt><dd><p>If no ‘=’ is found, this is None.</p>
</dd>
</dl>
<p>self.lhslist - [self.lhs split into a list by comma]
self.rhslist - [list of self.rhs split into a list by comma]
self.arglist = [list of space-separated args (stripped, including ‘=’ if it exists)]</p>
<p>All args and list members are stripped of excess whitespace around the
<codeclass="sig-name descname">edit_handler</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomDesc.edit_handler"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.edit_handler"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">show_stateful_descriptions</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomDesc.show_stateful_descriptions"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.show_stateful_descriptions"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/grid/extended_room/extended_room.html#CmdExtendedRoomDesc.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.func"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:perm(desc) or perm(Builder)'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'building', 'key': '@desc', 'no_prefix': 'desc ', 'tags': '', 'text': '\n describe an object or the current room.\n\n Usage:\n @desc[/switch] [<obj> =] <description>\n\n Switches:\n edit - Open up a line editor for more advanced editing.\n del - Delete the description of an object. If another state is given, its description\n will be deleted.\n spring|summer|autumn|winter - room description to use in respective in-game season\n <other> - room description to use with an arbitrary room state.\n\n Sets the description an object. If an object is not given,\n describe the current room, potentially showing any additional stateful descriptions. The room\n states only work with rooms.\n\n Examples:\n @desc/winter A cold winter scene.\n @desc/edit/summer\n @desc/burning This room is burning!\n @desc A normal room with no state.\n @desc/del/burning\n\n Rooms will automatically change season as the in-game time changes. You can\n set a specific room-state with the |wroomstate|n command.\n\n '}</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDesc.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">CmdExtendedRoomDetail</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/grid/extended_room/extended_room.html#CmdExtendedRoomDetail"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '@detail'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">locks</code><emclass="property"> = 'cmd:perm(Builder)'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'building'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.help_category"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/grid/extended_room/extended_room.html#CmdExtendedRoomDetail.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.func"title="Permalink to this definition">¶</a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:perm(Builder)'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'building', 'key': '@detail', 'no_prefix': '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><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomDetail.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">CmdExtendedRoomState</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/grid/extended_room/extended_room.html#CmdExtendedRoomState"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = '@roomstate'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">locks</code><emclass="property"> = 'cmd:perm(Builder)'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'building'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">parse</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomState.parse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.parse"title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called by the cmdhandler once the command name
has been identified. It creates a new set of member variables
that can be later accessed from self.func() (see below)</p>
<p>The following variables are available for our use when entering this
method (from the command definition, and assigned on the fly by the
cmdhandler):</p>
<blockquote>
<div><p>self.key - the name of this command (‘look’)
self.aliases - the aliases of this cmd (‘l’)
self.permissions - permission string for this command
self.help_category - overall category of command</p>
<p>self.caller - the object calling this command
self.cmdstring - the actual command name used to call this</p>
<blockquote>
<div><dlclass="simple">
<dt>(this allows you to know which alias was used,</dt><dd><p>for example)</p>
</dd>
</dl>
</div></blockquote>
<p>self.args - the raw input; everything following self.cmdstring.
self.cmdset - the cmdset from which this command was picked. Not</p>
<blockquote>
<div><p>often used (useful for commands like ‘help’ or to
list all available commands etc)</p>
</div></blockquote>
<dlclass="simple">
<dt>self.obj - the object on which this command was defined. It is often</dt><dd><p>the same as self.caller.</p>
</dd>
</dl>
</div></blockquote>
<p>A MUX command has the following possible syntax:</p>
<blockquote>
<div><p>name[ with several words][/switch[/switch..]] arg1[,arg2,…] [[=|,] arg[,..]]</p>
</div></blockquote>
<p>The ‘name[ with several words]’ part is already dealt with by the
cmdhandler at this point, and stored in self.cmdname (we don’t use
it here). The rest of the command is stored in self.args, which can
start with the switch indicator /.</p>
<dlclass="simple">
<dt>Optional variables to aid in parsing, if set:</dt><dd><dlclass="simple">
<dt>self.switch_options - (tuple of valid /switches expected by this</dt><dd><p>command (without the /))</p>
</dd>
<dt>self.rhs_split - Alternate string delimiter or tuple of strings</dt><dd><p>to separate left/right hand sides. tuple form
gives priority split to first string delimiter.</p>
</dd>
</dl>
</dd>
</dl>
<p>This parser breaks self.args into its constituents and stores them in the
following variables:</p>
<blockquote>
<div><p>self.switches = [list of /switches (without the /)]
self.raw = This is the raw argument input, including switches
self.args = This is re-defined to be everything <em>except</em> the switches
self.lhs = Everything to the left of = (lhs:’left-hand side’). If</p>
<blockquote>
<div><p>no = is found, this is identical to self.args.</p>
</div></blockquote>
<dlclass="simple">
<dt>self.rhs: Everything to the right of = (rhs:’right-hand side’).</dt><dd><p>If no ‘=’ is found, this is None.</p>
</dd>
</dl>
<p>self.lhslist - [self.lhs split into a list by comma]
self.rhslist - [list of self.rhs split into a list by comma]
self.arglist = [list of space-separated args (stripped, including ‘=’ if it exists)]</p>
<p>All args and list members are stripped of excess whitespace around the
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomState.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.func"title="Permalink to this definition">¶</a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:perm(Builder)'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'building', 'key': '@roomstate', 'no_prefix': 'roomstate ', 'tags': '', 'text': '\n Toggle and view room state for the current room.\n\n Usage:\n @roomstate [<roomstate>]\n\n Examples:\n @roomstate spring\n @roomstate burning\n @roomstate burning (a second time toggles it off)\n\n If the roomstate was already set, it will be disabled. Use\n without arguments to see the roomstates on the current room.\n\n '}</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomState.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">CmdExtendedRoomGameTime</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/grid/extended_room/extended_room.html#CmdExtendedRoomGameTime"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'time'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">locks</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.locks"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">parse</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomGameTime.parse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.parse"title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called by the cmdhandler once the command name
has been identified. It creates a new set of member variables
that can be later accessed from self.func() (see below)</p>
<p>The following variables are available for our use when entering this
method (from the command definition, and assigned on the fly by the
cmdhandler):</p>
<blockquote>
<div><p>self.key - the name of this command (‘look’)
self.aliases - the aliases of this cmd (‘l’)
self.permissions - permission string for this command
self.help_category - overall category of command</p>
<p>self.caller - the object calling this command
self.cmdstring - the actual command name used to call this</p>
<blockquote>
<div><dlclass="simple">
<dt>(this allows you to know which alias was used,</dt><dd><p>for example)</p>
</dd>
</dl>
</div></blockquote>
<p>self.args - the raw input; everything following self.cmdstring.
self.cmdset - the cmdset from which this command was picked. Not</p>
<blockquote>
<div><p>often used (useful for commands like ‘help’ or to
list all available commands etc)</p>
</div></blockquote>
<dlclass="simple">
<dt>self.obj - the object on which this command was defined. It is often</dt><dd><p>the same as self.caller.</p>
</dd>
</dl>
</div></blockquote>
<p>A MUX command has the following possible syntax:</p>
<blockquote>
<div><p>name[ with several words][/switch[/switch..]] arg1[,arg2,…] [[=|,] arg[,..]]</p>
</div></blockquote>
<p>The ‘name[ with several words]’ part is already dealt with by the
cmdhandler at this point, and stored in self.cmdname (we don’t use
it here). The rest of the command is stored in self.args, which can
start with the switch indicator /.</p>
<dlclass="simple">
<dt>Optional variables to aid in parsing, if set:</dt><dd><dlclass="simple">
<dt>self.switch_options - (tuple of valid /switches expected by this</dt><dd><p>command (without the /))</p>
</dd>
<dt>self.rhs_split - Alternate string delimiter or tuple of strings</dt><dd><p>to separate left/right hand sides. tuple form
gives priority split to first string delimiter.</p>
</dd>
</dl>
</dd>
</dl>
<p>This parser breaks self.args into its constituents and stores them in the
following variables:</p>
<blockquote>
<div><p>self.switches = [list of /switches (without the /)]
self.raw = This is the raw argument input, including switches
self.args = This is re-defined to be everything <em>except</em> the switches
self.lhs = Everything to the left of = (lhs:’left-hand side’). If</p>
<blockquote>
<div><p>no = is found, this is identical to self.args.</p>
</div></blockquote>
<dlclass="simple">
<dt>self.rhs: Everything to the right of = (rhs:’right-hand side’).</dt><dd><p>If no ‘=’ is found, this is None.</p>
</dd>
</dl>
<p>self.lhslist - [self.lhs split into a list by comma]
self.rhslist - [list of self.rhs split into a list by comma]
self.arglist = [list of space-separated args (stripped, including ‘=’ if it exists)]</p>
<p>All args and list members are stripped of excess whitespace around the
<codeclass="sig-name descname">func</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/contrib/grid/extended_room/extended_room.html#CmdExtendedRoomGameTime.func"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.func"title="Permalink to this definition">¶</a></dt>
<dd><p>This is the hook function that actually does all the work. It is called
by the cmdhandler right after self.parser() finishes, and so has access
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all()'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'general', 'key': 'time', 'no_prefix': ' ', 'tags': '', 'text': '\n Check the game time.\n\n Usage:\n time\n\n Shows the current in-game time and season.\n\n '}</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.CmdExtendedRoomGameTime.search_index_entry"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.contrib.grid.extended_room.extended_room.</code><codeclass="sig-name descname">ExtendedRoomCmdSet</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/grid/extended_room/extended_room.html#ExtendedRoomCmdSet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoomCmdSet"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/grid/extended_room/extended_room.html#ExtendedRoomCmdSet.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoomCmdSet.at_cmdset_creation"title="Permalink to this definition">¶</a></dt>
<dd><p>Hook method - this should be overloaded in the inheriting
class, and should take care of populating the cmdset by use of
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.contrib.grid.extended_room.extended_room.ExtendedRoomCmdSet'</em><aclass="headerlink"href="#evennia.contrib.grid.extended_room.extended_room.ExtendedRoomCmdSet.path"title="Permalink to this definition">¶</a></dt>