mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +01:00
Updated HTML docs.
This commit is contained in:
parent
e9f57caf4b
commit
82437dc7a6
55 changed files with 1011 additions and 170 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: d1f9aeb3f72c4af664b14b670c5f7d18
|
||||
config: 71b5d904d0261af11cc8e744e2e72919
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
|||
|
|
@ -247,6 +247,8 @@ template properly (InspectorCaracal)</p></li>
|
|||
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3554">Fix</a>: Fix/readd custom <code class="docutils literal notranslate"><span class="pre">ic</span></code> command to the <code class="docutils literal notranslate"><span class="pre">character_creator</span></code> contrib (InspectorCaracal)</p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/evennia/evennia/pull/3466">Fix</a>: Make sure the <code class="docutils literal notranslate"><span class="pre">website/base.html</span></code> website base is targeted
|
||||
explicitly so it doesn’t get overridden by same file name elsewhere in app (InspectorCaracal)</p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/evennia/evennia/issue/3387">fix</a>: Update all game template doc strings to be more up-to-date
|
||||
(Griatch)</p></li>
|
||||
<li><p>[Docs]: Doc fixes (Griatch, chiizujin, InspectorCaracal, iLPDev)</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -318,7 +318,6 @@
|
|||
<span class="sd"> - user (User, read-only) - django User authorization object</span>
|
||||
<span class="sd"> - obj (Object) - game object controlled by account. 'character' can also</span>
|
||||
<span class="sd"> be used.</span>
|
||||
<span class="sd"> - sessions (list of Sessions) - sessions connected to this account</span>
|
||||
<span class="sd"> - is_superuser (bool, read-only) - if the connected user is a superuser</span>
|
||||
|
||||
<span class="sd"> * Handlers</span>
|
||||
|
|
@ -331,18 +330,47 @@
|
|||
<span class="sd"> - scripts - script-handler. Add new scripts to object with scripts.add()</span>
|
||||
<span class="sd"> - cmdset - cmdset-handler. Use cmdset.add() to add new cmdsets to object</span>
|
||||
<span class="sd"> - nicks - nick-handler. New nicks with nicks.add().</span>
|
||||
<span class="sd"> - sessions - session-handler. Use session.get() to see all sessions connected, if any</span>
|
||||
<span class="sd"> - options - option-handler. Defaults are taken from settings.OPTIONS_ACCOUNT_DEFAULT</span>
|
||||
<span class="sd"> - characters - handler for listing the account's playable characters</span>
|
||||
|
||||
<span class="sd"> * Helper methods</span>
|
||||
<span class="sd"> * Helper methods (check autodocs for full updated listing)</span>
|
||||
|
||||
<span class="sd"> - msg(text=None, from_obj=None, session=None, options=None, **kwargs)</span>
|
||||
<span class="sd"> - execute_cmd(raw_string)</span>
|
||||
<span class="sd"> - search(ostring, global_search=False, attribute_name=None,</span>
|
||||
<span class="sd"> use_nicks=False, location=None,</span>
|
||||
<span class="sd"> ignore_errors=False, account=False)</span>
|
||||
<span class="sd"> - search(searchdata, return_puppet=False, search_object=False, typeclass=None,</span>
|
||||
<span class="sd"> nofound_string=None, multimatch_string=None, use_nicks=True,</span>
|
||||
<span class="sd"> quiet=False, **kwargs)</span>
|
||||
<span class="sd"> - is_typeclass(typeclass, exact=False)</span>
|
||||
<span class="sd"> - swap_typeclass(new_typeclass, clean_attributes=False, no_default=True)</span>
|
||||
<span class="sd"> - access(accessing_obj, access_type='read', default=False, no_superuser_bypass=False)</span>
|
||||
<span class="sd"> - access(accessing_obj, access_type='read', default=False, no_superuser_bypass=False, **kwargs)</span>
|
||||
<span class="sd"> - check_permstring(permstring)</span>
|
||||
<span class="sd"> - get_cmdsets(caller, current, **kwargs)</span>
|
||||
<span class="sd"> - get_cmdset_providers()</span>
|
||||
<span class="sd"> - uses_screenreader(session=None)</span>
|
||||
<span class="sd"> - get_display_name(looker, **kwargs)</span>
|
||||
<span class="sd"> - get_extra_display_name_info(looker, **kwargs)</span>
|
||||
<span class="sd"> - disconnect_session_from_account()</span>
|
||||
<span class="sd"> - puppet_object(session, obj)</span>
|
||||
<span class="sd"> - unpuppet_object(session)</span>
|
||||
<span class="sd"> - unpuppet_all()</span>
|
||||
<span class="sd"> - get_puppet(session)</span>
|
||||
<span class="sd"> - get_all_puppets()</span>
|
||||
<span class="sd"> - is_banned(**kwargs)</span>
|
||||
<span class="sd"> - get_username_validators(validator_config=settings.AUTH_USERNAME_VALIDATORS)</span>
|
||||
<span class="sd"> - authenticate(username, password, ip="", **kwargs)</span>
|
||||
<span class="sd"> - normalize_username(username)</span>
|
||||
<span class="sd"> - validate_username(username)</span>
|
||||
<span class="sd"> - validate_password(password, account=None)</span>
|
||||
<span class="sd"> - set_password(password, **kwargs)</span>
|
||||
<span class="sd"> - get_character_slots()</span>
|
||||
<span class="sd"> - get_available_character_slots()</span>
|
||||
<span class="sd"> - create_character(*args, **kwargs)</span>
|
||||
<span class="sd"> - create(*args, **kwargs)</span>
|
||||
<span class="sd"> - delete(*args, **kwargs)</span>
|
||||
<span class="sd"> - channel_msg(message, channel, senders=None, **kwargs)</span>
|
||||
<span class="sd"> - idle_time()</span>
|
||||
<span class="sd"> - connection_time()</span>
|
||||
|
||||
<span class="sd"> * Hook methods</span>
|
||||
|
||||
|
|
@ -353,15 +381,26 @@
|
|||
<span class="sd"> usually handled on the character level:</span>
|
||||
|
||||
<span class="sd"> - at_init()</span>
|
||||
<span class="sd"> - at_first_save()</span>
|
||||
<span class="sd"> - at_access()</span>
|
||||
<span class="sd"> - at_cmdset_get(**kwargs)</span>
|
||||
<span class="sd"> - at_password_change(**kwargs)</span>
|
||||
<span class="sd"> - at_first_login()</span>
|
||||
<span class="sd"> - at_pre_login()</span>
|
||||
<span class="sd"> - at_post_login(session=None)</span>
|
||||
<span class="sd"> - at_disconnect()</span>
|
||||
<span class="sd"> - at_failed_login(session, **kwargs)</span>
|
||||
<span class="sd"> - at_disconnect(reason=None, **kwargs)</span>
|
||||
<span class="sd"> - at_post_disconnect(**kwargs)</span>
|
||||
<span class="sd"> - at_message_receive()</span>
|
||||
<span class="sd"> - at_message_send()</span>
|
||||
<span class="sd"> - at_server_reload()</span>
|
||||
<span class="sd"> - at_server_shutdown()</span>
|
||||
<span class="sd"> - at_look(target=None, session=None, **kwargs)</span>
|
||||
<span class="sd"> - at_post_create_character(character, **kwargs)</span>
|
||||
<span class="sd"> - at_post_add_character(char)</span>
|
||||
<span class="sd"> - at_post_remove_character(char)</span>
|
||||
<span class="sd"> - at_pre_channel_msg(message, channel, senders=None, **kwargs)</span>
|
||||
<span class="sd"> - at_post_chnnel_msg(message, channel, senders=None, **kwargs)</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">django.db.models</span> <span class="kn">import</span> <span class="n">Q</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.accounts</span> <span class="kn">import</span> <span class="n">bots</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.accounts.models</span> <span class="kn">import</span> <span class="n">AccountDB</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.comms.comms</span> <span class="kn">import</span> <span class="n">DefaultChannel</span>
|
||||
|
|
@ -1504,9 +1505,7 @@
|
|||
<span class="n">message</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">caller</span><span class="o">.</span><span class="n">key</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">message</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s1">':'</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="si">}</span><span class="s2">"</span>
|
||||
|
||||
<span class="c1"># create the persistent message object</span>
|
||||
<span class="n">target_perms</span> <span class="o">=</span> <span class="s2">" or "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
|
||||
<span class="p">[</span><span class="sa">f</span><span class="s2">"id(</span><span class="si">{</span><span class="n">target</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">)"</span> <span class="k">for</span> <span class="n">target</span> <span class="ow">in</span> <span class="n">targets</span> <span class="o">+</span> <span class="p">[</span><span class="n">caller</span><span class="p">]]</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">target_perms</span> <span class="o">=</span> <span class="s2">" or "</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="sa">f</span><span class="s2">"id(</span><span class="si">{</span><span class="n">target</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">)"</span> <span class="k">for</span> <span class="n">target</span> <span class="ow">in</span> <span class="n">targets</span> <span class="o">+</span> <span class="p">[</span><span class="n">caller</span><span class="p">]])</span>
|
||||
<span class="n">create</span><span class="o">.</span><span class="n">create_message</span><span class="p">(</span>
|
||||
<span class="n">caller</span><span class="p">,</span>
|
||||
<span class="n">message</span><span class="p">,</span>
|
||||
|
|
|
|||
|
|
@ -97,10 +97,11 @@
|
|||
|
||||
<span class="kn">import</span> <span class="nn">re</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">evennia</span>
|
||||
<span class="kn">from</span> <span class="nn">django.contrib.contenttypes.models</span> <span class="kn">import</span> <span class="n">ContentType</span>
|
||||
<span class="kn">from</span> <span class="nn">django.urls</span> <span class="kn">import</span> <span class="n">reverse</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils.text</span> <span class="kn">import</span> <span class="n">slugify</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">evennia</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.comms.managers</span> <span class="kn">import</span> <span class="n">ChannelManager</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.comms.models</span> <span class="kn">import</span> <span class="n">ChannelDB</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.models</span> <span class="kn">import</span> <span class="n">TypeclassBase</span>
|
||||
|
|
@ -142,6 +143,70 @@
|
|||
<span class="sd"> the account-level `channel` command is used. If you were to rename that command you must</span>
|
||||
<span class="sd"> tweak the output to something like `yourchannelcommandname {channelname} = $1`.</span>
|
||||
|
||||
<span class="sd"> * Properties:</span>
|
||||
<span class="sd"> mutelist</span>
|
||||
<span class="sd"> banlist</span>
|
||||
<span class="sd"> wholist</span>
|
||||
|
||||
<span class="sd"> * Working methods:</span>
|
||||
<span class="sd"> get_log_filename()</span>
|
||||
<span class="sd"> set_log_filename(filename)</span>
|
||||
<span class="sd"> has_connection(account) - check if the given account listens to this channel</span>
|
||||
<span class="sd"> connect(account) - connect account to this channel</span>
|
||||
<span class="sd"> disconnect(account) - disconnect account from channel</span>
|
||||
<span class="sd"> access(access_obj, access_type='listen', default=False) - check the</span>
|
||||
<span class="sd"> access on this channel (default access_type is listen)</span>
|
||||
<span class="sd"> create(key, creator=None, *args, **kwargs)</span>
|
||||
<span class="sd"> delete() - delete this channel</span>
|
||||
<span class="sd"> message_transform(msg, emit=False, prefix=True,</span>
|
||||
<span class="sd"> sender_strings=None, external=False) - called by</span>
|
||||
<span class="sd"> the comm system and triggers the hooks below</span>
|
||||
<span class="sd"> msg(msgobj, header=None, senders=None, sender_strings=None,</span>
|
||||
<span class="sd"> persistent=None, online=False, emit=False, external=False) - main</span>
|
||||
<span class="sd"> send method, builds and sends a new message to channel.</span>
|
||||
<span class="sd"> tempmsg(msg, header=None, senders=None) - wrapper for sending non-persistent</span>
|
||||
<span class="sd"> messages.</span>
|
||||
<span class="sd"> distribute_message(msg, online=False) - send a message to all</span>
|
||||
<span class="sd"> connected accounts on channel, optionally sending only</span>
|
||||
<span class="sd"> to accounts that are currently online (optimized for very large sends)</span>
|
||||
<span class="sd"> mute(subscriber, **kwargs)</span>
|
||||
<span class="sd"> unmute(subscriber, **kwargs)</span>
|
||||
<span class="sd"> ban(target, **kwargs)</span>
|
||||
<span class="sd"> unban(target, **kwargs)</span>
|
||||
<span class="sd"> add_user_channel_alias(user, alias, **kwargs)</span>
|
||||
<span class="sd"> remove_user_channel_alias(user, alias, **kwargs)</span>
|
||||
|
||||
|
||||
<span class="sd"> Useful hooks:</span>
|
||||
<span class="sd"> at_channel_creation() - called once, when the channel is created</span>
|
||||
<span class="sd"> basetype_setup()</span>
|
||||
<span class="sd"> at_init()</span>
|
||||
<span class="sd"> at_first_save()</span>
|
||||
<span class="sd"> channel_prefix() - how the channel should be</span>
|
||||
<span class="sd"> prefixed when returning to user. Returns a string</span>
|
||||
<span class="sd"> format_senders(senders) - should return how to display multiple</span>
|
||||
<span class="sd"> senders to a channel</span>
|
||||
<span class="sd"> pose_transform(msg, sender_string) - should detect if the</span>
|
||||
<span class="sd"> sender is posing, and if so, modify the string</span>
|
||||
<span class="sd"> format_external(msg, senders, emit=False) - format messages sent</span>
|
||||
<span class="sd"> from outside the game, like from IRC</span>
|
||||
<span class="sd"> format_message(msg, emit=False) - format the message body before</span>
|
||||
<span class="sd"> displaying it to the user. 'emit' generally means that the</span>
|
||||
<span class="sd"> message should not be displayed with the sender's name.</span>
|
||||
<span class="sd"> channel_prefix()</span>
|
||||
|
||||
<span class="sd"> pre_join_channel(joiner) - if returning False, abort join</span>
|
||||
<span class="sd"> post_join_channel(joiner) - called right after successful join</span>
|
||||
<span class="sd"> pre_leave_channel(leaver) - if returning False, abort leave</span>
|
||||
<span class="sd"> post_leave_channel(leaver) - called right after successful leave</span>
|
||||
<span class="sd"> at_pre_msg(message, **kwargs)</span>
|
||||
<span class="sd"> at_post_msg(message, **kwargs)</span>
|
||||
<span class="sd"> web_get_admin_url()</span>
|
||||
<span class="sd"> web_get_create_url()</span>
|
||||
<span class="sd"> web_get_detail_url()</span>
|
||||
<span class="sd"> web_get_update_url()</span>
|
||||
<span class="sd"> web_get_delete_url()</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="n">objects</span> <span class="o">=</span> <span class="n">ChannelManager</span><span class="p">()</span>
|
||||
|
|
@ -948,7 +1013,7 @@
|
|||
<span class="c1"># Used by Django Sites/Admin</span>
|
||||
<span class="n">get_absolute_url</span> <span class="o">=</span> <span class="n">web_get_detail_url</span>
|
||||
|
||||
<span class="c1"># TODO Evennia 1.0+ removed hooks. Remove in 1.1.</span>
|
||||
<span class="c1"># TODO Evennia 1.0+ removed hooks. Remove in 5.0</span>
|
||||
<div class="viewcode-block" id="DefaultChannel.message_transform"><a class="viewcode-back" href="../../../api/evennia.comms.comms.html#evennia.comms.comms.DefaultChannel.message_transform">[docs]</a> <span class="k">def</span> <span class="nf">message_transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span>
|
||||
<span class="s2">"Channel.message_transform is no longer used in 1.0+. "</span>
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@
|
|||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils</span> <span class="kn">import</span> <span class="n">timezone</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.comms</span> <span class="kn">import</span> <span class="n">managers</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.locks.lockhandler</span> <span class="kn">import</span> <span class="n">LockHandler</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.models</span> <span class="kn">import</span> <span class="n">TypedObject</span>
|
||||
|
|
|
|||
|
|
@ -107,16 +107,17 @@
|
|||
<span class="sd"> This is the metaclass for components,</span>
|
||||
<span class="sd"> responsible for registering components to the listing.</span>
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">parents</span><span class="p">,</span> <span class="n">attrs</span><span class="p">):</span>
|
||||
<span class="w"> </span><span class="sd">"""</span>
|
||||
<span class="sd"> Every class that uses this metaclass will be registered</span>
|
||||
<span class="sd"> as a component in the Component Listing using its name.</span>
|
||||
<span class="sd"> All of them require a unique name.</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">attrs_name</span> <span class="o">=</span> <span class="n">attrs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'name'</span><span class="p">)</span>
|
||||
<span class="n">attrs_name</span> <span class="o">=</span> <span class="n">attrs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"name"</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">attrs_name</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">COMPONENT_LISTING</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">attrs_name</span><span class="p">):</span>
|
||||
<span class="n">new_fields</span> <span class="o">=</span> <span class="p">{}</span>
|
||||
<span class="n">attrs</span><span class="p">[</span><span class="s1">'_fields'</span><span class="p">]</span> <span class="o">=</span> <span class="n">new_fields</span>
|
||||
<span class="n">attrs</span><span class="p">[</span><span class="s2">"_fields"</span><span class="p">]</span> <span class="o">=</span> <span class="n">new_fields</span>
|
||||
<span class="k">for</span> <span class="n">parent</span> <span class="ow">in</span> <span class="n">parents</span><span class="p">:</span>
|
||||
<span class="n">_parent_fields</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">parent</span><span class="p">,</span> <span class="s2">"_fields"</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">_parent_fields</span><span class="p">:</span>
|
||||
|
|
|
|||
|
|
@ -179,23 +179,23 @@
|
|||
|
||||
<div class="viewcode-block" id="TestComponents.test_character_components_set_fields_properly"><a class="viewcode-back" href="../../../../../api/evennia.contrib.base_systems.components.tests.html#evennia.contrib.base_systems.components.tests.TestComponents.test_character_components_set_fields_properly">[docs]</a> <span class="k">def</span> <span class="nf">test_character_components_set_fields_properly</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="n">test_a_fields</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">char1</span><span class="o">.</span><span class="n">test_a</span><span class="o">.</span><span class="n">_fields</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_int'</span><span class="p">,</span> <span class="n">test_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_list'</span><span class="p">,</span> <span class="n">test_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_int"</span><span class="p">,</span> <span class="n">test_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_list"</span><span class="p">,</span> <span class="n">test_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">test_a_fields</span><span class="p">),</span> <span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="n">test_b_fields</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">char1</span><span class="o">.</span><span class="n">test_b</span><span class="o">.</span><span class="n">_fields</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_int'</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_list'</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'default_tag'</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'single_tag'</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'multiple_tags'</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'default_single_tag'</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_int"</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_list"</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"default_tag"</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"single_tag"</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"multiple_tags"</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"default_single_tag"</span><span class="p">,</span> <span class="n">test_b_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">test_b_fields</span><span class="p">),</span> <span class="mi">6</span><span class="p">)</span>
|
||||
|
||||
<span class="n">test_ic_a_fields</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">char1</span><span class="o">.</span><span class="n">ic_a</span><span class="o">.</span><span class="n">_fields</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_int'</span><span class="p">,</span> <span class="n">test_ic_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_list'</span><span class="p">,</span> <span class="n">test_ic_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s1">'my_other_int'</span><span class="p">,</span> <span class="n">test_ic_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_int"</span><span class="p">,</span> <span class="n">test_ic_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_list"</span><span class="p">,</span> <span class="n">test_ic_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertIn</span><span class="p">(</span><span class="s2">"my_other_int"</span><span class="p">,</span> <span class="n">test_ic_a_fields</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">test_ic_a_fields</span><span class="p">),</span> <span class="mi">3</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="TestComponents.test_inherited_typeclass_does_not_include_child_class_components"><a class="viewcode-back" href="../../../../../api/evennia.contrib.base_systems.components.tests.html#evennia.contrib.base_systems.components.tests.TestComponents.test_inherited_typeclass_does_not_include_child_class_components">[docs]</a> <span class="k">def</span> <span class="nf">test_inherited_typeclass_does_not_include_child_class_components</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
|
|
|
|||
|
|
@ -142,11 +142,18 @@
|
|||
<span class="sd">"""</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">Counter</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">logger</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">all_from_module</span><span class="p">,</span> <span class="n">is_iter</span><span class="p">,</span> <span class="n">make_iter</span><span class="p">,</span> <span class="n">string_partial_matching</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.evmore</span> <span class="kn">import</span> <span class="n">EvMore</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.default.muxcommand</span> <span class="kn">import</span> <span class="n">MuxCommand</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">logger</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.evmore</span> <span class="kn">import</span> <span class="n">EvMore</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">all_from_module</span><span class="p">,</span>
|
||||
<span class="n">is_iter</span><span class="p">,</span>
|
||||
<span class="n">make_iter</span><span class="p">,</span>
|
||||
<span class="n">string_partial_matching</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="c1"># this is either a string of the attribute name, or a tuple of strings of the attribute name and category</span>
|
||||
<span class="n">_ACHIEVEMENT_ATTR</span> <span class="o">=</span> <span class="n">make_iter</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s2">"ACHIEVEMENT_CONTRIB_ATTRIBUTE"</span><span class="p">,</span> <span class="s2">"achievements"</span><span class="p">))</span>
|
||||
|
|
@ -414,12 +421,12 @@
|
|||
<span class="k">elif</span> <span class="ow">not</span> <span class="n">achievement_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"progress"</span><span class="p">):</span>
|
||||
<span class="n">status</span> <span class="o">=</span> <span class="s2">"|yNot Started|n"</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">count</span> <span class="o">=</span> <span class="n">achievement_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"count"</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
|
||||
<span class="n">count</span> <span class="o">=</span> <span class="n">achievement_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"count"</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
|
||||
<span class="c1"># is this achievement tracking items separately?</span>
|
||||
<span class="k">if</span> <span class="n">is_iter</span><span class="p">(</span><span class="n">achievement_data</span><span class="p">[</span><span class="s2">"progress"</span><span class="p">]):</span>
|
||||
<span class="c1"># we'll display progress as how many items have been completed</span>
|
||||
<span class="n">completed</span> <span class="o">=</span> <span class="n">Counter</span><span class="p">(</span><span class="n">val</span> <span class="o">>=</span> <span class="n">count</span> <span class="k">for</span> <span class="n">val</span> <span class="ow">in</span> <span class="n">achievement_data</span><span class="p">[</span><span class="s2">"progress"</span><span class="p">])[</span><span class="kc">True</span><span class="p">]</span>
|
||||
<span class="n">pct</span> <span class="o">=</span> <span class="p">(</span><span class="n">completed</span> <span class="o">*</span> <span class="mi">100</span><span class="p">)</span> <span class="o">//</span> <span class="nb">len</span><span class="p">(</span><span class="n">achievement_data</span><span class="p">[</span><span class="s1">'progress'</span><span class="p">])</span>
|
||||
<span class="n">pct</span> <span class="o">=</span> <span class="p">(</span><span class="n">completed</span> <span class="o">*</span> <span class="mi">100</span><span class="p">)</span> <span class="o">//</span> <span class="nb">len</span><span class="p">(</span><span class="n">achievement_data</span><span class="p">[</span><span class="s2">"progress"</span><span class="p">])</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="c1"># we display progress as the percent of the total count</span>
|
||||
<span class="n">pct</span> <span class="o">=</span> <span class="p">(</span><span class="n">achievement_data</span><span class="p">[</span><span class="s2">"progress"</span><span class="p">]</span> <span class="o">*</span> <span class="mi">100</span><span class="p">)</span> <span class="o">//</span> <span class="n">count</span>
|
||||
|
|
@ -471,8 +478,7 @@
|
|||
<span class="k">elif</span> <span class="s2">"all"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">switches</span><span class="p">:</span>
|
||||
<span class="c1"># we merge our progress data into the full dict of achievements</span>
|
||||
<span class="n">achievement_data</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="n">key</span><span class="p">:</span> <span class="n">data</span> <span class="o">|</span> <span class="n">progress_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="p">{})</span>
|
||||
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">data</span> <span class="ow">in</span> <span class="n">achievements</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
|
||||
<span class="n">key</span><span class="p">:</span> <span class="n">data</span> <span class="o">|</span> <span class="n">progress_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="p">{})</span> <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">data</span> <span class="ow">in</span> <span class="n">achievements</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="c1"># we show all of the currently available achievements regardless of progress status</span>
|
||||
|
|
|
|||
|
|
@ -90,8 +90,10 @@
|
|||
<div class="body" role="main">
|
||||
|
||||
<h1>Source code for evennia.contrib.game_systems.achievements.tests</h1><div class="highlight"><pre>
|
||||
<span></span><span class="kn">from</span> <span class="nn">evennia.utils.test_resources</span> <span class="kn">import</span> <span class="n">BaseEvenniaTest</span><span class="p">,</span> <span class="n">BaseEvenniaCommandTest</span>
|
||||
<span class="kn">from</span> <span class="nn">mock</span> <span class="kn">import</span> <span class="n">patch</span>
|
||||
<span></span><span class="kn">from</span> <span class="nn">mock</span> <span class="kn">import</span> <span class="n">patch</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.test_resources</span> <span class="kn">import</span> <span class="n">BaseEvenniaCommandTest</span><span class="p">,</span> <span class="n">BaseEvenniaTest</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">achievements</span>
|
||||
|
||||
<span class="n">_dummy_achievements</span> <span class="o">=</span> <span class="p">{</span>
|
||||
|
|
|
|||
|
|
@ -139,8 +139,17 @@
|
|||
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">django.db.models</span> <span class="kn">import</span> <span class="n">Q</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="p">(</span><span class="n">CmdSet</span><span class="p">,</span> <span class="n">DefaultRoom</span><span class="p">,</span> <span class="n">EvEditor</span><span class="p">,</span> <span class="n">FuncParser</span><span class="p">,</span>
|
||||
<span class="n">InterruptCommand</span><span class="p">,</span> <span class="n">default_cmds</span><span class="p">,</span> <span class="n">gametime</span><span class="p">,</span> <span class="n">utils</span><span class="p">)</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">CmdSet</span><span class="p">,</span>
|
||||
<span class="n">DefaultRoom</span><span class="p">,</span>
|
||||
<span class="n">EvEditor</span><span class="p">,</span>
|
||||
<span class="n">FuncParser</span><span class="p">,</span>
|
||||
<span class="n">InterruptCommand</span><span class="p">,</span>
|
||||
<span class="n">default_cmds</span><span class="p">,</span>
|
||||
<span class="n">gametime</span><span class="p">,</span>
|
||||
<span class="n">utils</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.attributes</span> <span class="kn">import</span> <span class="n">AttributeProperty</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">list_to_string</span><span class="p">,</span> <span class="n">repeat</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@
|
|||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">DefaultAccount</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.default.muxcommand</span> <span class="kn">import</span> <span class="n">MuxAccountCommand</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.default.account</span> <span class="kn">import</span> <span class="n">CmdIC</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.cmdset</span> <span class="kn">import</span> <span class="n">CmdSet</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.default.account</span> <span class="kn">import</span> <span class="n">CmdIC</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands.default.muxcommand</span> <span class="kn">import</span> <span class="n">MuxAccountCommand</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.objects.models</span> <span class="kn">import</span> <span class="n">ObjectDB</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.evmenu</span> <span class="kn">import</span> <span class="n">EvMenu</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">is_iter</span><span class="p">,</span> <span class="n">string_partial_matching</span>
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@
|
|||
<span class="kn">from</span> <span class="nn">django.urls</span> <span class="kn">import</span> <span class="n">reverse</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils</span> <span class="kn">import</span> <span class="n">timezone</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils.text</span> <span class="kn">import</span> <span class="n">slugify</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.help.manager</span> <span class="kn">import</span> <span class="n">HelpEntryManager</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.locks.lockhandler</span> <span class="kn">import</span> <span class="n">LockHandler</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.models</span> <span class="kn">import</span> <span class="n">AliasHandler</span><span class="p">,</span> <span class="n">Tag</span><span class="p">,</span> <span class="n">TagHandler</span>
|
||||
|
|
|
|||
|
|
@ -296,6 +296,184 @@
|
|||
<span class="sd"> directly - this will both set things up and efficiently save the object</span>
|
||||
<span class="sd"> without `obj.save()` having to be called explicitly.</span>
|
||||
|
||||
<span class="sd"> Note: Check the autodocs for complete class members, this may not always</span>
|
||||
<span class="sd"> be up-to date.</span>
|
||||
|
||||
<span class="sd"> * Base properties defined/available on all Objects</span>
|
||||
|
||||
<span class="sd"> key (string) - name of object</span>
|
||||
<span class="sd"> name (string)- same as key</span>
|
||||
<span class="sd"> dbref (int, read-only) - unique #id-number. Also "id" can be used.</span>
|
||||
<span class="sd"> date_created (string) - time stamp of object creation</span>
|
||||
|
||||
<span class="sd"> account (Account) - controlling account (if any, only set together with</span>
|
||||
<span class="sd"> sessid below)</span>
|
||||
<span class="sd"> sessid (int, read-only) - session id (if any, only set together with</span>
|
||||
<span class="sd"> account above). Use `sessions` handler to get the</span>
|
||||
<span class="sd"> Sessions directly.</span>
|
||||
<span class="sd"> location (Object) - current location. Is None if this is a room</span>
|
||||
<span class="sd"> home (Object) - safety start-location</span>
|
||||
<span class="sd"> has_account (bool, read-only)- will only return *connected* accounts</span>
|
||||
<span class="sd"> contents (list, read only) - returns all objects inside this object</span>
|
||||
<span class="sd"> exits (list of Objects, read-only) - returns all exits from this</span>
|
||||
<span class="sd"> object, if any</span>
|
||||
<span class="sd"> destination (Object) - only set if this object is an exit.</span>
|
||||
<span class="sd"> is_superuser (bool, read-only) - True/False if this user is a superuser</span>
|
||||
<span class="sd"> is_connected (bool, read-only) - True if this object is associated with</span>
|
||||
<span class="sd"> an Account with any connected sessions.</span>
|
||||
<span class="sd"> has_account (bool, read-only) - True is this object has an associated account.</span>
|
||||
<span class="sd"> is_superuser (bool, read-only): True if this object has an account and that</span>
|
||||
<span class="sd"> account is a superuser.</span>
|
||||
|
||||
<span class="sd"> * Handlers available</span>
|
||||
|
||||
<span class="sd"> aliases - alias-handler: use aliases.add/remove/get() to use.</span>
|
||||
<span class="sd"> permissions - permission-handler: use permissions.add/remove() to</span>
|
||||
<span class="sd"> add/remove new perms.</span>
|
||||
<span class="sd"> locks - lock-handler: use locks.add() to add new lock strings</span>
|
||||
<span class="sd"> scripts - script-handler. Add new scripts to object with scripts.add()</span>
|
||||
<span class="sd"> cmdset - cmdset-handler. Use cmdset.add() to add new cmdsets to object</span>
|
||||
<span class="sd"> nicks - nick-handler. New nicks with nicks.add().</span>
|
||||
<span class="sd"> sessions - sessions-handler. Get Sessions connected to this</span>
|
||||
<span class="sd"> object with sessions.get()</span>
|
||||
<span class="sd"> attributes - attribute-handler. Use attributes.add/remove/get.</span>
|
||||
<span class="sd"> db - attribute-handler: Shortcut for attribute-handler. Store/retrieve</span>
|
||||
<span class="sd"> database attributes using self.db.myattr=val, val=self.db.myattr</span>
|
||||
<span class="sd"> ndb - non-persistent attribute handler: same as db but does not create</span>
|
||||
<span class="sd"> a database entry when storing data</span>
|
||||
|
||||
<span class="sd"> * Helper methods (see src.objects.objects.py for full headers)</span>
|
||||
|
||||
<span class="sd"> get_search_query_replacement(searchdata, **kwargs)</span>
|
||||
<span class="sd"> get_search_direct_match(searchdata, **kwargs)</span>
|
||||
<span class="sd"> get_search_candidates(searchdata, **kwargs)</span>
|
||||
<span class="sd"> get_search_result(searchdata, attribute_name=None, typeclass=None,</span>
|
||||
<span class="sd"> candidates=None, exact=False, use_dbref=None, tags=None, **kwargs)</span>
|
||||
<span class="sd"> get_stacked_result(results, **kwargs)</span>
|
||||
<span class="sd"> handle_search_results(searchdata, results, **kwargs)</span>
|
||||
<span class="sd"> search(searchdata, global_search=False, use_nicks=True, typeclass=None,</span>
|
||||
<span class="sd"> location=None, attribute_name=None, quiet=False, exact=False,</span>
|
||||
<span class="sd"> candidates=None, use_locks=True, nofound_string=None,</span>
|
||||
<span class="sd"> multimatch_string=None, use_dbref=None, tags=None, stacked=0)</span>
|
||||
<span class="sd"> search_account(searchdata, quiet=False)</span>
|
||||
<span class="sd"> execute_cmd(raw_string, session=None, **kwargs))</span>
|
||||
<span class="sd"> msg(text=None, from_obj=None, session=None, options=None, **kwargs)</span>
|
||||
<span class="sd"> for_contents(func, exclude=None, **kwargs)</span>
|
||||
<span class="sd"> msg_contents(message, exclude=None, from_obj=None, mapping=None,</span>
|
||||
<span class="sd"> raise_funcparse_errors=False, **kwargs)</span>
|
||||
<span class="sd"> move_to(destination, quiet=False, emit_to_obj=None, use_destination=True)</span>
|
||||
<span class="sd"> clear_contents()</span>
|
||||
<span class="sd"> create(key, account, caller, method, **kwargs)</span>
|
||||
<span class="sd"> copy(new_key=None)</span>
|
||||
<span class="sd"> at_object_post_copy(new_obj, **kwargs)</span>
|
||||
<span class="sd"> delete()</span>
|
||||
<span class="sd"> is_typeclass(typeclass, exact=False)</span>
|
||||
<span class="sd"> swap_typeclass(new_typeclass, clean_attributes=False, no_default=True)</span>
|
||||
<span class="sd"> access(accessing_obj, access_type='read', default=False,</span>
|
||||
<span class="sd"> no_superuser_bypass=False, **kwargs)</span>
|
||||
<span class="sd"> filter_visible(obj_list, looker, **kwargs)</span>
|
||||
<span class="sd"> get_default_lockstring()</span>
|
||||
<span class="sd"> get_cmdsets(caller, current, **kwargs)</span>
|
||||
<span class="sd"> check_permstring(permstring)</span>
|
||||
<span class="sd"> get_cmdset_providers()</span>
|
||||
<span class="sd"> get_display_name(looker=None, **kwargs)</span>
|
||||
<span class="sd"> get_extra_display_name_info(looker=None, **kwargs)</span>
|
||||
<span class="sd"> get_numbered_name(count, looker, **kwargs)</span>
|
||||
<span class="sd"> get_display_header(looker, **kwargs)</span>
|
||||
<span class="sd"> get_display_desc(looker, **kwargs)</span>
|
||||
<span class="sd"> get_display_exits(looker, **kwargs)</span>
|
||||
<span class="sd"> get_display_characters(looker, **kwargs)</span>
|
||||
<span class="sd"> get_display_things(looker, **kwargs)</span>
|
||||
<span class="sd"> get_display_footer(looker, **kwargs)</span>
|
||||
<span class="sd"> format_appearance(appearance, looker, **kwargs)</span>
|
||||
<span class="sd"> return_apperance(looker, **kwargs)</span>
|
||||
|
||||
<span class="sd"> * Hooks (these are class methods, so args should start with self):</span>
|
||||
|
||||
<span class="sd"> basetype_setup() - only called once, used for behind-the-scenes</span>
|
||||
<span class="sd"> setup. Normally not modified.</span>
|
||||
<span class="sd"> basetype_posthook_setup() - customization in basetype, after the object</span>
|
||||
<span class="sd"> has been created; Normally not modified.</span>
|
||||
|
||||
<span class="sd"> at_object_creation() - only called once, when object is first created.</span>
|
||||
<span class="sd"> Object customizations go here.</span>
|
||||
<span class="sd"> at_object_delete() - called just before deleting an object. If returning</span>
|
||||
<span class="sd"> False, deletion is aborted. Note that all objects</span>
|
||||
<span class="sd"> inside a deleted object are automatically moved</span>
|
||||
<span class="sd"> to their <home>, they don't need to be removed here.</span>
|
||||
|
||||
<span class="sd"> at_init() - called whenever typeclass is cached from memory,</span>
|
||||
<span class="sd"> at least once every server restart/reload</span>
|
||||
<span class="sd"> at_first_save()</span>
|
||||
<span class="sd"> at_cmdset_get(**kwargs) - this is called just before the command handler</span>
|
||||
<span class="sd"> requests a cmdset from this object. The kwargs are</span>
|
||||
<span class="sd"> not normally used unless the cmdset is created</span>
|
||||
<span class="sd"> dynamically (see e.g. Exits).</span>
|
||||
<span class="sd"> at_pre_puppet(account)- (account-controlled objects only) called just</span>
|
||||
<span class="sd"> before puppeting</span>
|
||||
<span class="sd"> at_post_puppet() - (account-controlled objects only) called just</span>
|
||||
<span class="sd"> after completing connection account<->object</span>
|
||||
<span class="sd"> at_pre_unpuppet() - (account-controlled objects only) called just</span>
|
||||
<span class="sd"> before un-puppeting</span>
|
||||
<span class="sd"> at_post_unpuppet(account) - (account-controlled objects only) called just</span>
|
||||
<span class="sd"> after disconnecting account<->object link</span>
|
||||
<span class="sd"> at_server_reload() - called before server is reloaded</span>
|
||||
<span class="sd"> at_server_shutdown() - called just before server is fully shut down</span>
|
||||
|
||||
<span class="sd"> at_access(result, accessing_obj, access_type) - called with the result</span>
|
||||
<span class="sd"> of a lock access check on this object. Return value</span>
|
||||
<span class="sd"> does not affect check result.</span>
|
||||
|
||||
<span class="sd"> at_pre_move(destination) - called just before moving object</span>
|
||||
<span class="sd"> to the destination. If returns False, move is cancelled.</span>
|
||||
<span class="sd"> announce_move_from(destination) - called in old location, just</span>
|
||||
<span class="sd"> before move, if obj.move_to() has quiet=False</span>
|
||||
<span class="sd"> announce_move_to(source_location) - called in new location, just</span>
|
||||
<span class="sd"> after move, if obj.move_to() has quiet=False</span>
|
||||
<span class="sd"> at_post_move(source_location) - always called after a move has</span>
|
||||
<span class="sd"> been successfully performed.</span>
|
||||
<span class="sd"> at_pre_object_leave(leaving_object, destination, **kwargs)</span>
|
||||
<span class="sd"> at_object_leave(obj, target_location, move_type="move", **kwargs)</span>
|
||||
<span class="sd"> at_object_leave(obj, target_location) - called when an object leaves</span>
|
||||
<span class="sd"> this object in any fashion</span>
|
||||
<span class="sd"> at_pre_object_receive(obj, source_location)</span>
|
||||
<span class="sd"> at_object_receive(obj, source_location, move_type="move", **kwargs) - called when this object receives</span>
|
||||
<span class="sd"> another object</span>
|
||||
<span class="sd"> at_post_move(source_location, move_type="move", **kwargs)</span>
|
||||
|
||||
<span class="sd"> at_traverse(traversing_object, target_location, **kwargs) - (exit-objects only)</span>
|
||||
<span class="sd"> handles all moving across the exit, including</span>
|
||||
<span class="sd"> calling the other exit hooks. Use super() to retain</span>
|
||||
<span class="sd"> the default functionality.</span>
|
||||
<span class="sd"> at_post_traverse(traversing_object, source_location) - (exit-objects only)</span>
|
||||
<span class="sd"> called just after a traversal has happened.</span>
|
||||
<span class="sd"> at_failed_traverse(traversing_object) - (exit-objects only) called if</span>
|
||||
<span class="sd"> traversal fails and property err_traverse is not defined.</span>
|
||||
|
||||
<span class="sd"> at_msg_receive(self, msg, from_obj=None, **kwargs) - called when a message</span>
|
||||
<span class="sd"> (via self.msg()) is sent to this obj.</span>
|
||||
<span class="sd"> If returns false, aborts send.</span>
|
||||
<span class="sd"> at_msg_send(self, msg, to_obj=None, **kwargs) - called when this objects</span>
|
||||
<span class="sd"> sends a message to someone via self.msg().</span>
|
||||
|
||||
<span class="sd"> return_appearance(looker) - describes this object. Used by "look"</span>
|
||||
<span class="sd"> command by default</span>
|
||||
<span class="sd"> at_desc(looker=None) - called by 'look' whenever the</span>
|
||||
<span class="sd"> appearance is requested.</span>
|
||||
<span class="sd"> at_pre_get(getter, **kwargs)</span>
|
||||
<span class="sd"> at_get(getter) - called after object has been picked up.</span>
|
||||
<span class="sd"> Does not stop pickup.</span>
|
||||
<span class="sd"> at_pre_give(giver, getter, **kwargs)</span>
|
||||
<span class="sd"> at_give(giver, getter, **kwargs)</span>
|
||||
<span class="sd"> at_pre_drop(dropper, **kwargs)</span>
|
||||
<span class="sd"> at_drop(dropper, **kwargs) - called when this object has been dropped.</span>
|
||||
<span class="sd"> at_pre_say(speaker, message, **kwargs)</span>
|
||||
<span class="sd"> at_say(message, msg_self=None, msg_location=None, receivers=None, msg_receivers=None, **kwargs)</span>
|
||||
|
||||
<span class="sd"> at_look(target, **kwargs)</span>
|
||||
<span class="sd"> at_desc(looker=None)</span>
|
||||
|
||||
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="c1"># Determines which order command sets begin to be assembled from.</span>
|
||||
|
|
|
|||
|
|
@ -764,8 +764,85 @@
|
|||
<div class="viewcode-block" id="DefaultScript"><a class="viewcode-back" href="../../../api/evennia.scripts.scripts.html#evennia.scripts.scripts.DefaultScript">[docs]</a><span class="k">class</span> <span class="nc">DefaultScript</span><span class="p">(</span><span class="n">ScriptBase</span><span class="p">):</span>
|
||||
<span class="w"> </span><span class="sd">"""</span>
|
||||
<span class="sd"> This is the base TypeClass for all Scripts. Scripts describe</span>
|
||||
<span class="sd"> events, timers and states in game, they can have a time component</span>
|
||||
<span class="sd"> or describe a state that changes under certain conditions.</span>
|
||||
<span class="sd"> all entities/systems without a physical existence in the game world</span>
|
||||
<span class="sd"> that require database storage (like an economic system or</span>
|
||||
<span class="sd"> combat tracker). They</span>
|
||||
<span class="sd"> can also have a timer/ticker component.</span>
|
||||
|
||||
<span class="sd"> A script type is customized by redefining some or all of its hook</span>
|
||||
<span class="sd"> methods and variables.</span>
|
||||
|
||||
<span class="sd"> * available properties (check docs for full listing, this could be</span>
|
||||
<span class="sd"> outdated).</span>
|
||||
|
||||
<span class="sd"> key (string) - name of object</span>
|
||||
<span class="sd"> name (string)- same as key</span>
|
||||
<span class="sd"> aliases (list of strings) - aliases to the object. Will be saved</span>
|
||||
<span class="sd"> to database as AliasDB entries but returned as strings.</span>
|
||||
<span class="sd"> dbref (int, read-only) - unique #id-number. Also "id" can be used.</span>
|
||||
<span class="sd"> date_created (string) - time stamp of object creation</span>
|
||||
<span class="sd"> permissions (list of strings) - list of permission strings</span>
|
||||
|
||||
<span class="sd"> desc (string) - optional description of script, shown in listings</span>
|
||||
<span class="sd"> obj (Object) - optional object that this script is connected to</span>
|
||||
<span class="sd"> and acts on (set automatically by obj.scripts.add())</span>
|
||||
<span class="sd"> interval (int) - how often script should run, in seconds. <0 turns</span>
|
||||
<span class="sd"> off ticker</span>
|
||||
<span class="sd"> start_delay (bool) - if the script should start repeating right away or</span>
|
||||
<span class="sd"> wait self.interval seconds</span>
|
||||
<span class="sd"> repeats (int) - how many times the script should repeat before</span>
|
||||
<span class="sd"> stopping. 0 means infinite repeats</span>
|
||||
<span class="sd"> persistent (bool) - if script should survive a server shutdown or not</span>
|
||||
<span class="sd"> is_active (bool) - if script is currently running</span>
|
||||
|
||||
<span class="sd"> * Handlers</span>
|
||||
|
||||
<span class="sd"> locks - lock-handler: use locks.add() to add new lock strings</span>
|
||||
<span class="sd"> db - attribute-handler: store/retrieve database attributes on this</span>
|
||||
<span class="sd"> self.db.myattr=val, val=self.db.myattr</span>
|
||||
<span class="sd"> ndb - non-persistent attribute handler: same as db but does not</span>
|
||||
<span class="sd"> create a database entry when storing data</span>
|
||||
|
||||
<span class="sd"> * Helper methods</span>
|
||||
|
||||
<span class="sd"> create(key, **kwargs)</span>
|
||||
<span class="sd"> start() - start script (this usually happens automatically at creation</span>
|
||||
<span class="sd"> and obj.script.add() etc)</span>
|
||||
<span class="sd"> stop() - stop script, and delete it</span>
|
||||
<span class="sd"> pause() - put the script on hold, until unpause() is called. If script</span>
|
||||
<span class="sd"> is persistent, the pause state will survive a shutdown.</span>
|
||||
<span class="sd"> unpause() - restart a previously paused script. The script will continue</span>
|
||||
<span class="sd"> from the paused timer (but at_start() will be called).</span>
|
||||
<span class="sd"> time_until_next_repeat() - if a timed script (interval>0), returns time</span>
|
||||
<span class="sd"> until next tick</span>
|
||||
|
||||
<span class="sd"> * Hook methods (should also include self as the first argument):</span>
|
||||
|
||||
<span class="sd"> at_script_creation() - called only once, when an object of this</span>
|
||||
<span class="sd"> class is first created.</span>
|
||||
<span class="sd"> is_valid() - is called to check if the script is valid to be running</span>
|
||||
<span class="sd"> at the current time. If is_valid() returns False, the running</span>
|
||||
<span class="sd"> script is stopped and removed from the game. You can use this</span>
|
||||
<span class="sd"> to check state changes (i.e. an script tracking some combat</span>
|
||||
<span class="sd"> stats at regular intervals is only valid to run while there is</span>
|
||||
<span class="sd"> actual combat going on).</span>
|
||||
<span class="sd"> at_start() - Called every time the script is started, which for persistent</span>
|
||||
<span class="sd"> scripts is at least once every server start. Note that this is</span>
|
||||
<span class="sd"> unaffected by self.delay_start, which only delays the first</span>
|
||||
<span class="sd"> call to at_repeat().</span>
|
||||
<span class="sd"> at_repeat() - Called every self.interval seconds. It will be called</span>
|
||||
<span class="sd"> immediately upon launch unless self.delay_start is True, which</span>
|
||||
<span class="sd"> will delay the first call of this method by self.interval</span>
|
||||
<span class="sd"> seconds. If self.interval==0, this method will never</span>
|
||||
<span class="sd"> be called.</span>
|
||||
<span class="sd"> at_pause()</span>
|
||||
<span class="sd"> at_stop() - Called as the script object is stopped and is about to be</span>
|
||||
<span class="sd"> removed from the game, e.g. because is_valid() returned False.</span>
|
||||
<span class="sd"> at_script_delete()</span>
|
||||
<span class="sd"> at_server_reload() - Called when server reloads. Can be used to</span>
|
||||
<span class="sd"> save temporary variables you want should survive a reload.</span>
|
||||
<span class="sd"> at_server_shutdown() - called at a full server shutdown.</span>
|
||||
<span class="sd"> at_server_start()</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@
|
|||
<span class="n">_RE_N</span><span class="o">.</span><span class="n">sub</span><span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="n">prompt</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="s2">"||n"</span> <span class="k">if</span> <span class="n">prompt</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"|"</span><span class="p">)</span> <span class="k">else</span> <span class="s2">"|n"</span><span class="p">),</span>
|
||||
<span class="n">strip_ansi</span><span class="o">=</span><span class="n">nocolor</span><span class="p">,</span>
|
||||
<span class="n">xterm256</span><span class="o">=</span><span class="n">xterm256</span><span class="p">,</span>
|
||||
<span class="n">truecolor</span><span class="o">=</span><span class="n">truecolor</span>
|
||||
<span class="n">truecolor</span><span class="o">=</span><span class="n">truecolor</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">mxp</span><span class="p">:</span>
|
||||
<span class="n">prompt</span> <span class="o">=</span> <span class="n">mxp_parse</span><span class="p">(</span><span class="n">prompt</span><span class="p">)</span>
|
||||
|
|
@ -603,7 +603,7 @@
|
|||
<span class="n">strip_ansi</span><span class="o">=</span><span class="n">nocolor</span><span class="p">,</span>
|
||||
<span class="n">xterm256</span><span class="o">=</span><span class="n">xterm256</span><span class="p">,</span>
|
||||
<span class="n">mxp</span><span class="o">=</span><span class="n">mxp</span><span class="p">,</span>
|
||||
<span class="n">truecolor</span><span class="o">=</span><span class="n">truecolor</span>
|
||||
<span class="n">truecolor</span><span class="o">=</span><span class="n">truecolor</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">mxp</span><span class="p">:</span>
|
||||
<span class="n">linetosend</span> <span class="o">=</span> <span class="n">mxp_parse</span><span class="p">(</span><span class="n">linetosend</span><span class="p">)</span>
|
||||
|
|
|
|||
|
|
@ -222,10 +222,10 @@
|
|||
<span class="bp">self</span><span class="o">.</span><span class="n">protocol</span><span class="o">.</span><span class="n">protocol_flags</span><span class="p">[</span><span class="s2">"NOPROMPTGOAHEAD"</span><span class="p">]</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
|
||||
<span class="k">if</span> <span class="p">(</span>
|
||||
<span class="n">clientname</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"XTERM"</span><span class="p">)</span>
|
||||
<span class="ow">or</span> <span class="n">clientname</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-256COLOR"</span><span class="p">)</span>
|
||||
<span class="ow">or</span> <span class="n">clientname</span>
|
||||
<span class="ow">in</span> <span class="p">(</span>
|
||||
<span class="n">clientname</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"XTERM"</span><span class="p">)</span>
|
||||
<span class="ow">or</span> <span class="n">clientname</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-256COLOR"</span><span class="p">)</span>
|
||||
<span class="ow">or</span> <span class="n">clientname</span>
|
||||
<span class="ow">in</span> <span class="p">(</span>
|
||||
<span class="s2">"ATLANTIS"</span><span class="p">,</span> <span class="c1"># > 0.9.9.0 (aug 2009)</span>
|
||||
<span class="s2">"CMUD"</span><span class="p">,</span> <span class="c1"># > 3.04 (mar 2009)</span>
|
||||
<span class="s2">"KILDCLIENT"</span><span class="p">,</span> <span class="c1"># > 2.2.0 (sep 2005)</span>
|
||||
|
|
@ -235,17 +235,13 @@
|
|||
<span class="s2">"BEIP"</span><span class="p">,</span> <span class="c1"># > 2.00.206 (late 2009) (BeipMu)</span>
|
||||
<span class="s2">"POTATO"</span><span class="p">,</span> <span class="c1"># > 2.00 (maybe earlier)</span>
|
||||
<span class="s2">"TINYFUGUE"</span><span class="p">,</span> <span class="c1"># > 4.x (maybe earlier)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="p">)</span>
|
||||
<span class="p">):</span>
|
||||
<span class="n">xterm256</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
|
||||
<span class="c1"># use name to identify support for xterm truecolor</span>
|
||||
<span class="n">truecolor</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="n">clientname</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-TRUECOLOR"</span><span class="p">)</span> <span class="ow">or</span>
|
||||
<span class="n">clientname</span> <span class="ow">in</span> <span class="p">(</span>
|
||||
<span class="s2">"AXMUD"</span><span class="p">,</span>
|
||||
<span class="s2">"TINTIN"</span>
|
||||
<span class="p">)):</span>
|
||||
<span class="k">if</span> <span class="n">clientname</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-TRUECOLOR"</span><span class="p">)</span> <span class="ow">or</span> <span class="n">clientname</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"AXMUD"</span><span class="p">,</span> <span class="s2">"TINTIN"</span><span class="p">):</span>
|
||||
<span class="n">truecolor</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
|
||||
<span class="c1"># all clients supporting TTYPE at all seem to support ANSI</span>
|
||||
|
|
@ -261,9 +257,9 @@
|
|||
<span class="n">tupper</span> <span class="o">=</span> <span class="n">term</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
|
||||
<span class="c1"># identify xterm256 based on flag</span>
|
||||
<span class="n">xterm256</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">tupper</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-256COLOR"</span><span class="p">)</span>
|
||||
<span class="ow">or</span> <span class="n">tupper</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"XTERM"</span><span class="p">)</span> <span class="c1"># Apple Terminal, old Tintin</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="n">tupper</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-COLOR"</span><span class="p">)</span> <span class="c1"># old Tintin, Putty</span>
|
||||
<span class="n">tupper</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-256COLOR"</span><span class="p">)</span>
|
||||
<span class="ow">or</span> <span class="n">tupper</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"XTERM"</span><span class="p">)</span> <span class="c1"># Apple Terminal, old Tintin</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="n">tupper</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"-COLOR"</span><span class="p">)</span> <span class="c1"># old Tintin, Putty</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">xterm256</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">protocol</span><span class="o">.</span><span class="n">protocol_flags</span><span class="p">[</span><span class="s2">"ANSI"</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@
|
|||
|
||||
<span class="sd">"""</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">evennia</span>
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
<span class="kn">from</span> <span class="nn">django.contrib.contenttypes.models</span> <span class="kn">import</span> <span class="n">ContentType</span>
|
||||
<span class="kn">from</span> <span class="nn">django.core.exceptions</span> <span class="kn">import</span> <span class="n">ObjectDoesNotExist</span>
|
||||
|
|
@ -129,21 +128,30 @@
|
|||
<span class="kn">from</span> <span class="nn">django.utils</span> <span class="kn">import</span> <span class="n">timezone</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils.encoding</span> <span class="kn">import</span> <span class="n">smart_str</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils.text</span> <span class="kn">import</span> <span class="n">slugify</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">evennia</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.locks.lockhandler</span> <span class="kn">import</span> <span class="n">LockHandler</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.server.signals</span> <span class="kn">import</span> <span class="n">SIGNAL_TYPED_OBJECT_POST_RENAME</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses</span> <span class="kn">import</span> <span class="n">managers</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.attributes</span> <span class="kn">import</span> <span class="p">(</span><span class="n">Attribute</span><span class="p">,</span> <span class="n">AttributeHandler</span><span class="p">,</span>
|
||||
<span class="n">AttributeProperty</span><span class="p">,</span> <span class="n">DbHolder</span><span class="p">,</span>
|
||||
<span class="n">InMemoryAttributeBackend</span><span class="p">,</span>
|
||||
<span class="n">ModelAttributeBackend</span><span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.tags</span> <span class="kn">import</span> <span class="p">(</span><span class="n">AliasHandler</span><span class="p">,</span> <span class="n">PermissionHandler</span><span class="p">,</span> <span class="n">Tag</span><span class="p">,</span>
|
||||
<span class="n">TagCategoryProperty</span><span class="p">,</span> <span class="n">TagHandler</span><span class="p">,</span>
|
||||
<span class="n">TagProperty</span><span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.idmapper.models</span> <span class="kn">import</span> <span class="p">(</span><span class="n">SharedMemoryModel</span><span class="p">,</span>
|
||||
<span class="n">SharedMemoryModelBase</span><span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.attributes</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">Attribute</span><span class="p">,</span>
|
||||
<span class="n">AttributeHandler</span><span class="p">,</span>
|
||||
<span class="n">AttributeProperty</span><span class="p">,</span>
|
||||
<span class="n">DbHolder</span><span class="p">,</span>
|
||||
<span class="n">InMemoryAttributeBackend</span><span class="p">,</span>
|
||||
<span class="n">ModelAttributeBackend</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.typeclasses.tags</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">AliasHandler</span><span class="p">,</span>
|
||||
<span class="n">PermissionHandler</span><span class="p">,</span>
|
||||
<span class="n">Tag</span><span class="p">,</span>
|
||||
<span class="n">TagCategoryProperty</span><span class="p">,</span>
|
||||
<span class="n">TagHandler</span><span class="p">,</span>
|
||||
<span class="n">TagProperty</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.idmapper.models</span> <span class="kn">import</span> <span class="n">SharedMemoryModel</span><span class="p">,</span> <span class="n">SharedMemoryModelBase</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.logger</span> <span class="kn">import</span> <span class="n">log_trace</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span><span class="n">class_from_module</span><span class="p">,</span> <span class="n">inherits_from</span><span class="p">,</span> <span class="n">is_iter</span><span class="p">,</span>
|
||||
<span class="n">lazy_property</span><span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">class_from_module</span><span class="p">,</span> <span class="n">inherits_from</span><span class="p">,</span> <span class="n">is_iter</span><span class="p">,</span> <span class="n">lazy_property</span>
|
||||
|
||||
<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"TypedObject"</span><span class="p">,)</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@
|
|||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">logger</span><span class="p">,</span> <span class="n">utils</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">to_str</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.hex_colors</span> <span class="kn">import</span> <span class="n">HexColors</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">to_str</span>
|
||||
|
||||
<span class="n">hex2truecolor</span> <span class="o">=</span> <span class="n">HexColors</span><span class="p">()</span>
|
||||
<span class="n">hex_sub</span> <span class="o">=</span> <span class="n">HexColors</span><span class="o">.</span><span class="n">hex_sub</span>
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@
|
|||
<span class="p">}</span>
|
||||
<span class="n">align_name</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"f"</span><span class="p">:</span> <span class="s2">"Full"</span><span class="p">,</span> <span class="s2">"c"</span><span class="p">:</span> <span class="s2">"Center"</span><span class="p">,</span> <span class="s2">"l"</span><span class="p">:</span> <span class="s2">"Left"</span><span class="p">,</span> <span class="s2">"r"</span><span class="p">:</span> <span class="s2">"Right"</span><span class="p">}</span>
|
||||
<span class="c1"># shift width arg right if no alignment specified</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">arg1</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">'='</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">arg1</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"="</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">arg2</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">arg1</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">arg1</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">arg1</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">arg1</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">align_map</span><span class="p">:</span>
|
||||
|
|
|
|||
|
|
@ -364,17 +364,28 @@
|
|||
<span class="kn">from</span> <span class="nn">inspect</span> <span class="kn">import</span> <span class="n">getfullargspec</span><span class="p">,</span> <span class="n">isfunction</span>
|
||||
<span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="n">ceil</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">evennia</span>
|
||||
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
|
||||
|
||||
<span class="c1"># i18n</span>
|
||||
<span class="kn">from</span> <span class="nn">django.utils.translation</span> <span class="kn">import</span> <span class="n">gettext</span> <span class="k">as</span> <span class="n">_</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">evennia</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">CmdSet</span><span class="p">,</span> <span class="n">Command</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.commands</span> <span class="kn">import</span> <span class="n">cmdhandler</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">logger</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.ansi</span> <span class="kn">import</span> <span class="n">strip_ansi</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.evtable</span> <span class="kn">import</span> <span class="n">EvColumn</span><span class="p">,</span> <span class="n">EvTable</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span><span class="n">crop</span><span class="p">,</span> <span class="n">dedent</span><span class="p">,</span> <span class="n">inherits_from</span><span class="p">,</span> <span class="n">is_iter</span><span class="p">,</span> <span class="n">m_len</span><span class="p">,</span>
|
||||
<span class="n">make_iter</span><span class="p">,</span> <span class="n">mod_import</span><span class="p">,</span> <span class="n">pad</span><span class="p">,</span> <span class="n">to_str</span><span class="p">)</span>
|
||||
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">crop</span><span class="p">,</span>
|
||||
<span class="n">dedent</span><span class="p">,</span>
|
||||
<span class="n">inherits_from</span><span class="p">,</span>
|
||||
<span class="n">is_iter</span><span class="p">,</span>
|
||||
<span class="n">m_len</span><span class="p">,</span>
|
||||
<span class="n">make_iter</span><span class="p">,</span>
|
||||
<span class="n">mod_import</span><span class="p">,</span>
|
||||
<span class="n">pad</span><span class="p">,</span>
|
||||
<span class="n">to_str</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="c1"># read from protocol NAWS later?</span>
|
||||
<span class="n">_MAX_TEXT_WIDTH</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">CLIENT_DEFAULT_WIDTH</span>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@
|
|||
<span class="kn">from</span> <span class="nn">html</span> <span class="kn">import</span> <span class="n">escape</span> <span class="k">as</span> <span class="n">html_escape</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">.ansi</span> <span class="kn">import</span> <span class="o">*</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">.hex_colors</span> <span class="kn">import</span> <span class="n">HexColors</span>
|
||||
|
||||
<span class="c1"># All xterm256 RGB equivalents</span>
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@
|
|||
- [Fix][pull3554]: Fix/readd custom `ic` command to the `character_creator` contrib (InspectorCaracal)
|
||||
- [Fix][pull3466]: Make sure the `website/base.html` website base is targeted
|
||||
explicitly so it doesn't get overridden by same file name elsewhere in app (InspectorCaracal)
|
||||
- [fix][issue3387]: Update all game template doc strings to be more up-to-date
|
||||
(Griatch)
|
||||
- [Docs]: Doc fixes (Griatch, chiizujin, InspectorCaracal, iLPDev)
|
||||
|
||||
[pull3470]: https://github.com/evennia/evennia/pull/3470
|
||||
|
|
@ -83,6 +85,7 @@
|
|||
[pull3523]: https://github.com/evennia/evennia/pull/3523
|
||||
[pull3566]: https://github.com/evennia/evennia/pull/3566
|
||||
[issue3522]: https://github.com/evennia/evennia/issue/3522
|
||||
[issue3387]: https://github.com/evennia/evennia/issue/3387
|
||||
|
||||
|
||||
## Evennia 4.1.1
|
||||
|
|
|
|||
|
|
@ -154,7 +154,6 @@ game.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>sessions (list of Sessions) - sessions connected to this account</p></li>
|
||||
<li><p>is_superuser (bool, read-only) - if the connected user is a superuser</p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
|
|
@ -177,25 +176,54 @@ game.</p>
|
|||
<li><p>scripts - script-handler. Add new scripts to object with scripts.add()</p></li>
|
||||
<li><p>cmdset - cmdset-handler. Use cmdset.add() to add new cmdsets to object</p></li>
|
||||
<li><p>nicks - nick-handler. New nicks with nicks.add().</p></li>
|
||||
<li><p>sessions - session-handler. Use session.get() to see all sessions connected, if any</p></li>
|
||||
<li><p>options - option-handler. Defaults are taken from settings.OPTIONS_ACCOUNT_DEFAULT</p></li>
|
||||
<li><p>characters - handler for listing the account’s playable characters</p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Helper methods</p></li>
|
||||
<li><p>Helper methods (check autodocs for full updated listing)</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><p>msg(text=None, from_obj=None, session=None, options=None, <a href="#id1"><span class="problematic" id="id2">**</span></a>kwargs)</p></li>
|
||||
<li><p>execute_cmd(raw_string)</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>search(ostring, global_search=False, attribute_name=None,</dt><dd><p>use_nicks=False, location=None,
|
||||
ignore_errors=False, account=False)</p>
|
||||
<dt>search(searchdata, return_puppet=False, search_object=False, typeclass=None,</dt><dd><p>nofound_string=None, multimatch_string=None, use_nicks=True,
|
||||
quiet=False, <a href="#id3"><span class="problematic" id="id4">**</span></a>kwargs)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>is_typeclass(typeclass, exact=False)</p></li>
|
||||
<li><p>swap_typeclass(new_typeclass, clean_attributes=False, no_default=True)</p></li>
|
||||
<li><p>access(accessing_obj, access_type=’read’, default=False, no_superuser_bypass=False)</p></li>
|
||||
<li><p>access(accessing_obj, access_type=’read’, default=False, no_superuser_bypass=False, <a href="#id5"><span class="problematic" id="id6">**</span></a>kwargs)</p></li>
|
||||
<li><p>check_permstring(permstring)</p></li>
|
||||
<li><p>get_cmdsets(caller, current, <a href="#id7"><span class="problematic" id="id8">**</span></a>kwargs)</p></li>
|
||||
<li><p>get_cmdset_providers()</p></li>
|
||||
<li><p>uses_screenreader(session=None)</p></li>
|
||||
<li><p>get_display_name(looker, <a href="#id9"><span class="problematic" id="id10">**</span></a>kwargs)</p></li>
|
||||
<li><p>get_extra_display_name_info(looker, <a href="#id11"><span class="problematic" id="id12">**</span></a>kwargs)</p></li>
|
||||
<li><p>disconnect_session_from_account()</p></li>
|
||||
<li><p>puppet_object(session, obj)</p></li>
|
||||
<li><p>unpuppet_object(session)</p></li>
|
||||
<li><p>unpuppet_all()</p></li>
|
||||
<li><p>get_puppet(session)</p></li>
|
||||
<li><p>get_all_puppets()</p></li>
|
||||
<li><p>is_banned(<a href="#id13"><span class="problematic" id="id14">**</span></a>kwargs)</p></li>
|
||||
<li><p>get_username_validators(validator_config=settings.AUTH_USERNAME_VALIDATORS)</p></li>
|
||||
<li><p>authenticate(username, password, ip=””, <a href="#id15"><span class="problematic" id="id16">**</span></a>kwargs)</p></li>
|
||||
<li><p>normalize_username(username)</p></li>
|
||||
<li><p>validate_username(username)</p></li>
|
||||
<li><p>validate_password(password, account=None)</p></li>
|
||||
<li><p>set_password(password, <a href="#id17"><span class="problematic" id="id18">**</span></a>kwargs)</p></li>
|
||||
<li><p>get_character_slots()</p></li>
|
||||
<li><p>get_available_character_slots()</p></li>
|
||||
<li><p>create_character(<a href="#id19"><span class="problematic" id="id20">*</span></a>args, <a href="#id21"><span class="problematic" id="id22">**</span></a>kwargs)</p></li>
|
||||
<li><p>create(<a href="#id23"><span class="problematic" id="id24">*</span></a>args, <a href="#id25"><span class="problematic" id="id26">**</span></a>kwargs)</p></li>
|
||||
<li><p>delete(<a href="#id27"><span class="problematic" id="id28">*</span></a>args, <a href="#id29"><span class="problematic" id="id30">**</span></a>kwargs)</p></li>
|
||||
<li><p>channel_msg(message, channel, senders=None, <a href="#id31"><span class="problematic" id="id32">**</span></a>kwargs)</p></li>
|
||||
<li><p>idle_time()</p></li>
|
||||
<li><p>connection_time()</p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
|
|
@ -210,15 +238,26 @@ at_account_creation()</p>
|
|||
</dl>
|
||||
<ul class="simple">
|
||||
<li><p>at_init()</p></li>
|
||||
<li><p>at_first_save()</p></li>
|
||||
<li><p>at_access()</p></li>
|
||||
<li><p>at_cmdset_get(<a href="#id3"><span class="problematic" id="id4">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_cmdset_get(<a href="#id33"><span class="problematic" id="id34">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_password_change(<a href="#id35"><span class="problematic" id="id36">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_first_login()</p></li>
|
||||
<li><p>at_pre_login()</p></li>
|
||||
<li><p>at_post_login(session=None)</p></li>
|
||||
<li><p>at_disconnect()</p></li>
|
||||
<li><p>at_failed_login(session, <a href="#id37"><span class="problematic" id="id38">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_disconnect(reason=None, <a href="#id39"><span class="problematic" id="id40">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_post_disconnect(<a href="#id41"><span class="problematic" id="id42">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_message_receive()</p></li>
|
||||
<li><p>at_message_send()</p></li>
|
||||
<li><p>at_server_reload()</p></li>
|
||||
<li><p>at_server_shutdown()</p></li>
|
||||
<li><p>at_look(target=None, session=None, <a href="#id43"><span class="problematic" id="id44">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_post_create_character(character, <a href="#id45"><span class="problematic" id="id46">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_post_add_character(char)</p></li>
|
||||
<li><p>at_post_remove_character(char)</p></li>
|
||||
<li><p>at_pre_channel_msg(message, channel, senders=None, <a href="#id47"><span class="problematic" id="id48">**</span></a>kwargs)</p></li>
|
||||
<li><p>at_post_chnnel_msg(message, channel, senders=None, <a href="#id49"><span class="problematic" id="id50">**</span></a>kwargs)</p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<dl class="py attribute">
|
||||
|
|
@ -454,7 +493,7 @@ account’s end.</p>
|
|||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><p><em>puppets (Object or list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Users of <strong>MULTISESSION_MODE</strong> 0 or 1 will</dt><dd><p>always get the first puppet back. Users of higher <a href="#id5"><span class="problematic" id="id6">**</span></a>MULTISESSION_MODE**s will
|
||||
<dt>Users of <strong>MULTISESSION_MODE</strong> 0 or 1 will</dt><dd><p>always get the first puppet back. Users of higher <a href="#id51"><span class="problematic" id="id52">**</span></a>MULTISESSION_MODE**s will
|
||||
get a list of all puppeted objects.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
@ -471,7 +510,7 @@ get a list of all puppeted objects.</p>
|
|||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p><p><em>puppets (Object or list)</em> –</p>
|
||||
<dl class="simple">
|
||||
<dt>Users of <strong>MULTISESSION_MODE</strong> 0 or 1 will</dt><dd><p>always get the first puppet back. Users of higher <a href="#id7"><span class="problematic" id="id8">**</span></a>MULTISESSION_MODE**s will
|
||||
<dt>Users of <strong>MULTISESSION_MODE</strong> 0 or 1 will</dt><dd><p>always get the first puppet back. Users of higher <a href="#id53"><span class="problematic" id="id54">**</span></a>MULTISESSION_MODE**s will
|
||||
get a list of all puppeted objects.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
@ -819,7 +858,7 @@ For most normal messages, there is only a single sender. If
|
|||
there are no senders, this may be a broadcasting message.</p></li>
|
||||
<li><p><strong>**kwargs</strong> – These are additional keywords passed into <strong>channel_msg</strong>.
|
||||
If <strong>no_prefix=True</strong> or <strong>emit=True</strong> are passed, the channel
|
||||
prefix will not be added (<a href="#id9"><span class="problematic" id="id10">**</span></a>[channelname]: ** by default)</p></li>
|
||||
prefix will not be added (<a href="#id55"><span class="problematic" id="id56">**</span></a>[channelname]: ** by default)</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ skipping, reloading etc.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcommand', 'batchcmd']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['batchcmd', 'batchcommand']</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -183,7 +183,7 @@ skipping, reloading etc.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcommand batchcmd', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcommand batchcmd', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcmd batchcommand', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}</em><a class="headerlink" href="#evennia.commands.default.batchprocess.CmdBatchCommands.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ You can specify the /force switch to bypass this confirmation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDestroy.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@del', '@delete']</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@delete', '@del']</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -688,7 +688,7 @@ You can specify the /force switch to bypass this confirmation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdDestroy.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@del @delete', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy del delete', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@delete @del', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy delete del', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdDestroy.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -1415,7 +1415,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@swap', '@type', '@update', '@parent', '@typeclasses']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@typeclasses', '@parent', '@update', '@swap', '@type']</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1446,7 +1446,7 @@ server settings.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdTypeclass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@swap @type @update @parent @typeclasses', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass swap type update parent typeclasses', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@typeclasses @parent @update @swap @type', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass typeclasses parent update swap type', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.building.CmdTypeclass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -1908,7 +1908,7 @@ one is given.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdFind.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@locate', '@search']</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@search', '@locate']</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1939,7 +1939,7 @@ one is given.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.building.CmdFind.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@locate @search', 'category': 'building', 'key': '@find', 'no_prefix': 'find locate search', 'tags': '', 'text': '\n search the database for objects\n\n Usage:\n find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]]\n locate - this is a shorthand for using the /loc switch.\n\n Switches:\n room - only look for rooms (location=None)\n exit - only look for exits (destination!=None)\n char - only look for characters (BASE_CHARACTER_TYPECLASS)\n exact - only exact matches are returned.\n loc - display object location if exists and match has one result\n startswith - search for names starting with the string, rather than containing\n\n Searches the database for an object of a particular name or exact #dbref.\n Use *accountname to search for an account. The switches allows for\n limiting object matches to certain game entities. Dbrefmin and dbrefmax\n limits matches to within the given dbrefs range, or above/below if only\n one is given.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@search @locate', 'category': 'building', 'key': '@find', 'no_prefix': 'find search locate', 'tags': '', 'text': '\n search the database for objects\n\n Usage:\n find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]]\n locate - this is a shorthand for using the /loc switch.\n\n Switches:\n room - only look for rooms (location=None)\n exit - only look for exits (destination!=None)\n char - only look for characters (BASE_CHARACTER_TYPECLASS)\n exact - only exact matches are returned.\n loc - display object location if exists and match has one result\n startswith - search for names starting with the string, rather than containing\n\n Searches the database for an object of a particular name or exact #dbref.\n Use *accountname to search for an account. The switches allows for\n limiting object matches to certain game entities. Dbrefmin and dbrefmax\n limits matches to within the given dbrefs range, or above/below if only\n one is given.\n '}</em><a class="headerlink" href="#evennia.commands.default.building.CmdFind.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ for everyone to use, you need build privileges and the alias command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdNick.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['nickname', 'nicks']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['nicks', 'nickname']</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -314,7 +314,7 @@ for everyone to use, you need build privileges and the alias command.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.general.CmdNick.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nickname nicks', 'category': 'general', 'key': 'nick', 'no_prefix': ' nickname nicks', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'nicks nickname', 'category': 'general', 'key': 'nick', 'no_prefix': ' nicks nickname', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}</em><a class="headerlink" href="#evennia.commands.default.general.CmdNick.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -697,7 +697,7 @@ See <a href="#id11"><span class="problematic" id="id12">|</span></a>luhttps://ww
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdTasks.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@delays', '@task']</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@task', '@delays']</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -743,7 +743,7 @@ to all the variables defined therein.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.system.CmdTasks.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@delays @task', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks delays task', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@task @delays', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks task delays', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}</em><a class="headerlink" href="#evennia.commands.default.system.CmdTasks.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -980,7 +980,7 @@ main test suite started with</p>
|
|||
<p>Test the batch processor.</p>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.tests.TestBatchProcess.red_button">
|
||||
<code class="sig-name descname">red_button</code><em class="property"> = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmpc_i0ikbb/01c045bd410c5e35f1fb70ccfb0ec400b560c38d/evennia/contrib/tutorials/red_button/red_button.py'></em><a class="headerlink" href="#evennia.commands.default.tests.TestBatchProcess.red_button" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">red_button</code><em class="property"> = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmpa3wtf0fi/9c3ba936e40783c4fe727e1754923192a72140b0/evennia/contrib/tutorials/red_button/red_button.py'></em><a class="headerlink" href="#evennia.commands.default.tests.TestBatchProcess.red_button" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ connect “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'con', 'conn']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'conn', 'con']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -171,7 +171,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'co con conn', 'category': 'general', 'key': 'connect', 'no_prefix': ' co con conn', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'no_prefix': ' co conn con', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -195,7 +195,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -232,7 +232,7 @@ create “account name” “pass word”</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'no_prefix': ' cre cr', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'no_prefix': ' cr cre', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -355,7 +355,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -381,7 +381,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.commands.default.unloggedin.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -154,6 +154,87 @@ will end up at the <strong>$1</strong> position in the replacement. Together, th
|
|||
the account-level <strong>channel</strong> command is used. If you were to rename that command you must
|
||||
tweak the output to something like <strong>yourchannelcommandname {channelname} = $1</strong>.</p></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><dl class="simple">
|
||||
<dt>Properties:</dt><dd><p>mutelist
|
||||
banlist
|
||||
wholist</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl>
|
||||
<dt>Working methods:</dt><dd><p>get_log_filename()
|
||||
set_log_filename(filename)
|
||||
has_connection(account) - check if the given account listens to this channel
|
||||
connect(account) - connect account to this channel
|
||||
disconnect(account) - disconnect account from channel
|
||||
access(access_obj, access_type=’listen’, default=False) - check the</p>
|
||||
<blockquote>
|
||||
<div><p>access on this channel (default access_type is listen)</p>
|
||||
</div></blockquote>
|
||||
<p>create(key, creator=None, <a href="#id1"><span class="problematic" id="id2">*</span></a>args, <a href="#id3"><span class="problematic" id="id4">**</span></a>kwargs)
|
||||
delete() - delete this channel
|
||||
message_transform(msg, emit=False, prefix=True,</p>
|
||||
<blockquote>
|
||||
<div><p>sender_strings=None, external=False) - called by
|
||||
the comm system and triggers the hooks below</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>msg(msgobj, header=None, senders=None, sender_strings=None,</dt><dd><dl class="simple">
|
||||
<dt>persistent=None, online=False, emit=False, external=False) - main</dt><dd><p>send method, builds and sends a new message to channel.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>tempmsg(msg, header=None, senders=None) - wrapper for sending non-persistent</dt><dd><p>messages.</p>
|
||||
</dd>
|
||||
<dt>distribute_message(msg, online=False) - send a message to all</dt><dd><p>connected accounts on channel, optionally sending only
|
||||
to accounts that are currently online (optimized for very large sends)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>mute(subscriber, <a href="#id5"><span class="problematic" id="id6">**</span></a>kwargs)
|
||||
unmute(subscriber, <a href="#id7"><span class="problematic" id="id8">**</span></a>kwargs)
|
||||
ban(target, <a href="#id9"><span class="problematic" id="id10">**</span></a>kwargs)
|
||||
unban(target, <a href="#id11"><span class="problematic" id="id12">**</span></a>kwargs)
|
||||
add_user_channel_alias(user, alias, <a href="#id13"><span class="problematic" id="id14">**</span></a>kwargs)
|
||||
remove_user_channel_alias(user, alias, <a href="#id15"><span class="problematic" id="id16">**</span></a>kwargs)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<dl>
|
||||
<dt>Useful hooks:</dt><dd><p>at_channel_creation() - called once, when the channel is created
|
||||
basetype_setup()
|
||||
at_init()
|
||||
at_first_save()
|
||||
channel_prefix() - how the channel should be</p>
|
||||
<blockquote>
|
||||
<div><p>prefixed when returning to user. Returns a string</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>format_senders(senders) - should return how to display multiple</dt><dd><p>senders to a channel</p>
|
||||
</dd>
|
||||
<dt>pose_transform(msg, sender_string) - should detect if the</dt><dd><p>sender is posing, and if so, modify the string</p>
|
||||
</dd>
|
||||
<dt>format_external(msg, senders, emit=False) - format messages sent</dt><dd><p>from outside the game, like from IRC</p>
|
||||
</dd>
|
||||
<dt>format_message(msg, emit=False) - format the message body before</dt><dd><p>displaying it to the user. ‘emit’ generally means that the
|
||||
message should not be displayed with the sender’s name.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>channel_prefix()</p>
|
||||
<p>pre_join_channel(joiner) - if returning False, abort join
|
||||
post_join_channel(joiner) - called right after successful join
|
||||
pre_leave_channel(leaver) - if returning False, abort leave
|
||||
post_leave_channel(leaver) - called right after successful leave
|
||||
at_pre_msg(message, <a href="#id17"><span class="problematic" id="id18">**</span></a>kwargs)
|
||||
at_post_msg(message, <a href="#id19"><span class="problematic" id="id20">**</span></a>kwargs)
|
||||
web_get_admin_url()
|
||||
web_get_create_url()
|
||||
web_get_detail_url()
|
||||
web_get_update_url()
|
||||
web_get_delete_url()</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.comms.comms.DefaultChannel.objects">
|
||||
<code class="sig-name descname">objects</code><em class="property"> = <evennia.comms.managers.ChannelManager object></em><a class="headerlink" href="#evennia.comms.comms.DefaultChannel.objects" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -610,7 +691,7 @@ to exclude the channel prefix.</p></li>
|
|||
</ul>
|
||||
<p>Called after all receivers are processed:
|
||||
- <strong>channel.at_post_all_msg(message, **kwargs)</strong></p>
|
||||
<p>(where the senders/bypass_mute are embedded into <a href="#id1"><span class="problematic" id="id2">**</span></a>kwargs for
|
||||
<p>(where the senders/bypass_mute are embedded into <a href="#id21"><span class="problematic" id="id22">**</span></a>kwargs for
|
||||
later access in hooks)</p>
|
||||
</dd></dl>
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'con', 'conn']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['co', 'conn', 'con']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -183,7 +183,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'co con conn', 'category': 'general', 'key': 'connect', 'no_prefix': ' co con conn', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'no_prefix': ' co conn con', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedConnect.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -205,7 +205,7 @@ there is no object yet before the account has logged in)</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedCreate.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cre', 'cr']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['cr', 'cre']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedCreate.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -247,7 +247,7 @@ name enclosed in quotes:</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedCreate.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'no_prefix': ' cre cr', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'no_prefix': ' cr cre', 'tags': '', 'text': '\n Create a new account.\n\n Usage (at login screen):\n create "accountname" <email> <password>\n\n This creates a new account account.\n\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedCreate.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -355,7 +355,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -381,7 +381,7 @@ for simplicity. It shows a pane of info.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.email_login.email_login.CmdUnconnectedHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ aliases to an already joined channel.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['aliaschan', 'chanalias']</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['chanalias', 'aliaschan']</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -205,7 +205,7 @@ aliases to an already joined channel.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' aliaschan chanalias', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'chanalias aliaschan', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' chanalias aliaschan', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}</em><a class="headerlink" href="#evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.CmdAddCom.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ the operation will be general or on the room.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['quit', 'q', 'chicken out', 'abort']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['q', 'abort', 'quit', 'chicken out']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -249,7 +249,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'quit q chicken out abort', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' quit q chicken out abort', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'q abort quit chicken out', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' q abort quit chicken out', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGiveUp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -385,7 +385,7 @@ shout</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['shout', 'whisper', ';']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['whisper', 'shout', ';']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -414,7 +414,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'shout whisper ;', 'category': 'general', 'key': 'say', 'no_prefix': ' shout whisper ;', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'whisper shout ;', 'category': 'general', 'key': 'say', 'no_prefix': ' whisper shout ;', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdSpeak.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -442,7 +442,7 @@ emote /me points to /box and /lever.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdEmote.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':', 'pose']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdEmote.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['pose', ':']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdEmote.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -481,7 +481,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdEmote.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ': pose', 'category': 'general', 'key': 'emote', 'no_prefix': ' : pose', 'tags': '', 'text': '\n Perform a free-form emote. Use /me to\n include yourself in the emote and /name\n to include other objects or characters.\n Use "..." to enact speech.\n\n Usage:\n emote <emote>\n :<emote\n\n Example:\n emote /me smiles at /peter\n emote /me points to /box and /lever.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdEmote.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'pose :', 'category': 'general', 'key': 'emote', 'no_prefix': ' pose :', 'tags': '', 'text': '\n Perform a free-form emote. Use /me to\n include yourself in the emote and /name\n to include other objects or characters.\n Use "..." to enact speech.\n\n Usage:\n emote <emote>\n :<emote\n\n Example:\n emote /me smiles at /peter\n emote /me points to /box and /lever.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdEmote.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -504,7 +504,7 @@ looks and what actions is available.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['e', 'ex', 'unfocus', 'examine']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['examine', 'ex', 'e', 'unfocus']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -533,7 +533,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'e ex unfocus examine', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' e ex unfocus examine', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'examine ex e unfocus', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' examine ex e unfocus', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdFocus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -595,7 +595,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGet.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['i', 'give', 'inv', 'inventory']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['inventory', 'give', 'i', 'inv']</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -619,7 +619,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.full_systems.evscaperoom.commands.CmdGet.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'i give inv inventory', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' i give inv inventory', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'inventory give i inv', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' inventory give i inv', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}</em><a class="headerlink" href="#evennia.contrib.full_systems.evscaperoom.commands.CmdGet.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ achievements/progress rats</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.achievements.achievements.CmdAchieve.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['achieve', 'achievement', 'achieves']</em><a class="headerlink" href="#evennia.contrib.game_systems.achievements.achievements.CmdAchieve.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['achieves', 'achieve', 'achievement']</em><a class="headerlink" href="#evennia.contrib.game_systems.achievements.achievements.CmdAchieve.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -337,7 +337,7 @@ to all the variables defined therein.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.achievements.achievements.CmdAchieve.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'achieve achievement achieves', 'category': 'general', 'key': 'achievements', 'no_prefix': ' achieve achievement achieves', 'tags': '', 'text': '\n view achievements\n\n Usage:\n achievements[/switches] [args]\n\n Switches:\n all View all achievements, including locked ones.\n completed View achievements you\'ve completed.\n progress View achievements you have partially completed\n\n Check your achievement statuses or browse the list. Providing a command argument\n will search all your currently unlocked achievements for matches, and the switches\n will filter the list to something other than "all unlocked". Combining a command\n argument with a switch will search only in that list.\n\n Examples:\n achievements apples\n achievements/all\n achievements/progress rats\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.achievements.achievements.CmdAchieve.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'achieves achieve achievement', 'category': 'general', 'key': 'achievements', 'no_prefix': ' achieves achieve achievement', 'tags': '', 'text': '\n view achievements\n\n Usage:\n achievements[/switches] [args]\n\n Switches:\n all View all achievements, including locked ones.\n completed View achievements you\'ve completed.\n progress View achievements you have partially completed\n\n Check your achievement statuses or browse the list. Providing a command argument\n will search all your currently unlocked achievements for matches, and the switches\n will filter the list to something other than "all unlocked". Combining a command\n argument with a switch will search only in that list.\n\n Examples:\n achievements apples\n achievements/all\n achievements/progress rats\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.achievements.achievements.CmdAchieve.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ try to influence the other part in the deal.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.barter.barter.CmdStatus.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['offers', 'deal']</em><a class="headerlink" href="#evennia.contrib.game_systems.barter.barter.CmdStatus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['deal', 'offers']</em><a class="headerlink" href="#evennia.contrib.game_systems.barter.barter.CmdStatus.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -785,7 +785,7 @@ try to influence the other part in the deal.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.barter.barter.CmdStatus.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'offers deal', 'category': 'trading', 'key': 'status', 'no_prefix': ' offers deal', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}</em><a class="headerlink" href="#evennia.contrib.game_systems.barter.barter.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'deal offers', 'category': 'trading', 'key': 'status', 'no_prefix': ' deal offers', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}</em><a class="headerlink" href="#evennia.contrib.game_systems.barter.barter.CmdStatus.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -712,7 +712,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_basic.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -601,7 +601,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_equip.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -724,7 +724,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_items.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -503,7 +503,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_magic.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['wait', 'hold']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hold', 'wait']</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -963,7 +963,7 @@ if there are still any actions you can take.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}</em><a class="headerlink" href="#evennia.contrib.game_systems.turnbattle.tb_range.CmdPass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ everyone but the person rolling.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpg.dice.dice.CmdDice.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['roll', '@dice']</em><a class="headerlink" href="#evennia.contrib.rpg.dice.dice.CmdDice.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['@dice', 'roll']</em><a class="headerlink" href="#evennia.contrib.rpg.dice.dice.CmdDice.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -366,7 +366,7 @@ everyone but the person rolling.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpg.dice.dice.CmdDice.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'roll @dice', 'category': 'general', 'key': 'dice', 'no_prefix': ' roll dice', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}</em><a class="headerlink" href="#evennia.contrib.rpg.dice.dice.CmdDice.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '@dice roll', 'category': 'general', 'key': 'dice', 'no_prefix': ' dice roll', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}</em><a class="headerlink" href="#evennia.contrib.rpg.dice.dice.CmdDice.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ Using the command without arguments will list all current recogs.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpg.rpsystem.rpsystem.CmdRecog.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['forget', 'recognize']</em><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.rpsystem.CmdRecog.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['recognize', 'forget']</em><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.rpsystem.CmdRecog.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
|
@ -935,7 +935,7 @@ Using the command without arguments will list all current recogs.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.rpg.rpsystem.rpsystem.CmdRecog.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'forget recognize', 'category': 'general', 'key': 'recog', 'no_prefix': ' forget recognize', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'recognize forget', 'category': 'general', 'key': 'recog', 'no_prefix': ' recognize forget', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}</em><a class="headerlink" href="#evennia.contrib.rpg.rpsystem.rpsystem.CmdRecog.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ turn of combat, performing everyone’s actions in random order.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.evadventure.combat_turnbased.CmdTurnAttack.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['hit', 'turnbased combat']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_turnbased.CmdTurnAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['turnbased combat', 'hit']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_turnbased.CmdTurnAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -526,7 +526,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.evadventure.combat_turnbased.CmdTurnAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'hit turnbased combat', 'category': 'general', 'key': 'attack', 'no_prefix': ' hit turnbased combat', 'tags': '', 'text': '\n Start or join combat.\n\n Usage:\n attack [<target>]\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_turnbased.CmdTurnAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'turnbased combat hit', 'category': 'general', 'key': 'attack', 'no_prefix': ' turnbased combat hit', 'tags': '', 'text': '\n Start or join combat.\n\n Usage:\n attack [<target>]\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_turnbased.CmdTurnAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ boost INT Wizard Goblin</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.evadventure.combat_twitch.CmdStunt.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['boost', 'foil']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_twitch.CmdStunt.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['foil', 'boost']</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_twitch.CmdStunt.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -525,7 +525,7 @@ set in self.parse())</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.evadventure.combat_twitch.CmdStunt.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'boost foil', 'category': 'combat', 'key': 'stunt', 'no_prefix': ' boost foil', 'tags': '', 'text': '\n Perform a combat stunt, that boosts an ally against a target, or\n foils an enemy, giving them disadvantage against an ally.\n\n Usage:\n boost [ability] <recipient> <target>\n foil [ability] <recipient> <target>\n boost [ability] <target> (same as boost me <target>)\n foil [ability] <target> (same as foil <target> me)\n\n Example:\n boost STR me Goblin\n boost DEX Goblin\n foil STR Goblin me\n foil INT Goblin\n boost INT Wizard Goblin\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_twitch.CmdStunt.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'foil boost', 'category': 'combat', 'key': 'stunt', 'no_prefix': ' foil boost', 'tags': '', 'text': '\n Perform a combat stunt, that boosts an ally against a target, or\n foils an enemy, giving them disadvantage against an ally.\n\n Usage:\n boost [ability] <recipient> <target>\n foil [ability] <recipient> <target>\n boost [ability] <target> (same as boost me <target>)\n foil [ability] <target> (same as foil <target> me)\n\n Example:\n boost STR me Goblin\n boost DEX Goblin\n foil STR Goblin me\n foil INT Goblin\n boost INT Wizard Goblin\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.combat_twitch.CmdStunt.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ check if the lid is open or closed.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['break lid', 'smash lid', 'smash']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['smash lid', 'break lid', 'smash']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -293,7 +293,7 @@ break.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'break lid smash lid smash', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' break lid smash lid smash', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'smash lid break lid smash', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' smash lid break lid smash', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdSmashGlass.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -520,7 +520,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['listen', 'l', 'feel', 'get', 'ex', 'examine']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['get', 'feel', 'ex', 'l', 'listen', 'examine']</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -546,7 +546,7 @@ be mutually exclusive.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'listen l feel get ex examine', 'category': 'general', 'key': 'look', 'no_prefix': ' listen l feel get ex examine', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'get feel ex l listen examine', 'category': 'general', 'key': 'look', 'no_prefix': ' get feel ex l listen examine', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}</em><a class="headerlink" href="#evennia.contrib.tutorials.red_button.red_button.CmdBlindLook.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ shift green root up/down</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['move', 'pull', 'push', 'shiftroot']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['shiftroot', 'push', 'pull', 'move']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -606,7 +606,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'move pull push shiftroot', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' move pull push shiftroot', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'shiftroot push pull move', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' shiftroot push pull move', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdShiftRoot.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -623,7 +623,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['button', 'press button', 'push button']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['press button', 'push button', 'button']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -649,7 +649,7 @@ yellow/green - horizontal roots</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'button press button push button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' button press button push button', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'press button push button button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' press button push button button', 'tags': '', 'text': '\n Presses a button.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdPressButton.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -793,7 +793,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['thrust', 'hit', 'bash', 'pierce', 'chop', 'parry', 'fight', 'kill', 'stab', 'defend', 'slash']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['thrust', 'bash', 'kill', 'slash', 'defend', 'parry', 'hit', 'chop', 'fight', 'stab', 'pierce']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -819,7 +819,7 @@ parry - forgoes your attack but will make you harder to hit on next</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'thrust hit bash pierce chop parry fight kill stab defend slash', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' thrust hit bash pierce chop parry fight kill stab defend slash', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'thrust bash kill slash defend parry hit chop fight stab pierce', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' thrust bash kill slash defend parry hit chop fight stab pierce', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.objects.CmdAttack.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -830,7 +830,7 @@ if they fall off the bridge.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['?', 'h']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['h', '?']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -856,7 +856,7 @@ if they fall off the bridge.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'h ?', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdBridgeHelp.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
@ -982,7 +982,7 @@ to find something.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['search', 'feel around', 'l', 'feel', 'fiddle']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['feel', 'feel around', 'l', 'fiddle', 'search']</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -1010,7 +1010,7 @@ random chance of eventually finding a light source.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'search feel around l feel fiddle', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' search feel around l feel fiddle', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'feel feel around l fiddle search', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' feel feel around l fiddle search', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}</em><a class="headerlink" href="#evennia.contrib.tutorials.tutorial_world.rooms.CmdLookDark.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ git evennia pull - Pull the latest evennia code.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.utils.git_integration.git_integration.CmdGitEvennia.directory">
|
||||
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmpc_i0ikbb/01c045bd410c5e35f1fb70ccfb0ec400b560c38d/evennia'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGitEvennia.directory" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmpa3wtf0fi/9c3ba936e40783c4fe727e1754923192a72140b0/evennia'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGitEvennia.directory" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -283,7 +283,7 @@ git pull - Pull the latest code from your current branch.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.contrib.utils.git_integration.git_integration.CmdGit.directory">
|
||||
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmpc_i0ikbb/01c045bd410c5e35f1fb70ccfb0ec400b560c38d/evennia/game_template'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGit.directory" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">directory</code><em class="property"> = '/tmp/tmpa3wtf0fi/9c3ba936e40783c4fe727e1754923192a72140b0/evennia/game_template'</em><a class="headerlink" href="#evennia.contrib.utils.git_integration.git_integration.CmdGit.directory" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
|
|||
|
|
@ -223,6 +223,221 @@ entities you define should inherit from DefaultObject at some distance.</p>
|
|||
<strong>evennia.create_object()</strong> function rather than to initialize the class
|
||||
directly - this will both set things up and efficiently save the object
|
||||
without <strong>obj.save()</strong> having to be called explicitly.</p>
|
||||
<p>Note: Check the autodocs for complete class members, this may not always
|
||||
be up-to date.</p>
|
||||
<ul class="simple">
|
||||
<li><p>Base properties defined/available on all Objects</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><p>key (string) - name of object
|
||||
name (string)- same as key
|
||||
dbref (int, read-only) - unique #id-number. Also “id” can be used.
|
||||
date_created (string) - time stamp of object creation</p>
|
||||
<dl class="simple">
|
||||
<dt>account (Account) - controlling account (if any, only set together with</dt><dd><p>sessid below)</p>
|
||||
</dd>
|
||||
<dt>sessid (int, read-only) - session id (if any, only set together with</dt><dd><p>account above). Use <strong>sessions</strong> handler to get the
|
||||
Sessions directly.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>location (Object) - current location. Is None if this is a room
|
||||
home (Object) - safety start-location
|
||||
has_account (bool, read-only)- will only return <em>connected</em> accounts
|
||||
contents (list, read only) - returns all objects inside this object
|
||||
exits (list of Objects, read-only) - returns all exits from this</p>
|
||||
<blockquote>
|
||||
<div><p>object, if any</p>
|
||||
</div></blockquote>
|
||||
<p>destination (Object) - only set if this object is an exit.
|
||||
is_superuser (bool, read-only) - True/False if this user is a superuser
|
||||
is_connected (bool, read-only) - True if this object is associated with</p>
|
||||
<blockquote>
|
||||
<div><p>an Account with any connected sessions.</p>
|
||||
</div></blockquote>
|
||||
<p>has_account (bool, read-only) - True is this object has an associated account.
|
||||
is_superuser (bool, read-only): True if this object has an account and that</p>
|
||||
<blockquote>
|
||||
<div><p>account is a superuser.</p>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Handlers available</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><p>aliases - alias-handler: use aliases.add/remove/get() to use.
|
||||
permissions - permission-handler: use permissions.add/remove() to</p>
|
||||
<blockquote>
|
||||
<div><p>add/remove new perms.</p>
|
||||
</div></blockquote>
|
||||
<p>locks - lock-handler: use locks.add() to add new lock strings
|
||||
scripts - script-handler. Add new scripts to object with scripts.add()
|
||||
cmdset - cmdset-handler. Use cmdset.add() to add new cmdsets to object
|
||||
nicks - nick-handler. New nicks with nicks.add().
|
||||
sessions - sessions-handler. Get Sessions connected to this</p>
|
||||
<blockquote>
|
||||
<div><p>object with sessions.get()</p>
|
||||
</div></blockquote>
|
||||
<p>attributes - attribute-handler. Use attributes.add/remove/get.
|
||||
db - attribute-handler: Shortcut for attribute-handler. Store/retrieve</p>
|
||||
<blockquote>
|
||||
<div><p>database attributes using self.db.myattr=val, val=self.db.myattr</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>ndb - non-persistent attribute handler: same as db but does not create</dt><dd><p>a database entry when storing data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Helper methods (see src.objects.objects.py for full headers)</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><p>get_search_query_replacement(searchdata, <a href="#id1"><span class="problematic" id="id2">**</span></a>kwargs)
|
||||
get_search_direct_match(searchdata, <a href="#id3"><span class="problematic" id="id4">**</span></a>kwargs)
|
||||
get_search_candidates(searchdata, <a href="#id5"><span class="problematic" id="id6">**</span></a>kwargs)
|
||||
get_search_result(searchdata, attribute_name=None, typeclass=None,</p>
|
||||
<blockquote>
|
||||
<div><p>candidates=None, exact=False, use_dbref=None, tags=None, <a href="#id7"><span class="problematic" id="id8">**</span></a>kwargs)</p>
|
||||
</div></blockquote>
|
||||
<p>get_stacked_result(results, <a href="#id9"><span class="problematic" id="id10">**</span></a>kwargs)
|
||||
handle_search_results(searchdata, results, <a href="#id11"><span class="problematic" id="id12">**</span></a>kwargs)
|
||||
search(searchdata, global_search=False, use_nicks=True, typeclass=None,</p>
|
||||
<blockquote>
|
||||
<div><p>location=None, attribute_name=None, quiet=False, exact=False,
|
||||
candidates=None, use_locks=True, nofound_string=None,
|
||||
multimatch_string=None, use_dbref=None, tags=None, stacked=0)</p>
|
||||
</div></blockquote>
|
||||
<p>search_account(searchdata, quiet=False)
|
||||
execute_cmd(raw_string, session=None, <a href="#id13"><span class="problematic" id="id14">**</span></a>kwargs))
|
||||
msg(text=None, from_obj=None, session=None, options=None, <a href="#id15"><span class="problematic" id="id16">**</span></a>kwargs)
|
||||
for_contents(func, exclude=None, <a href="#id17"><span class="problematic" id="id18">**</span></a>kwargs)
|
||||
msg_contents(message, exclude=None, from_obj=None, mapping=None,</p>
|
||||
<blockquote>
|
||||
<div><p>raise_funcparse_errors=False, <a href="#id19"><span class="problematic" id="id20">**</span></a>kwargs)</p>
|
||||
</div></blockquote>
|
||||
<p>move_to(destination, quiet=False, emit_to_obj=None, use_destination=True)
|
||||
clear_contents()
|
||||
create(key, account, caller, method, <a href="#id21"><span class="problematic" id="id22">**</span></a>kwargs)
|
||||
copy(new_key=None)
|
||||
at_object_post_copy(new_obj, <a href="#id23"><span class="problematic" id="id24">**</span></a>kwargs)
|
||||
delete()
|
||||
is_typeclass(typeclass, exact=False)
|
||||
swap_typeclass(new_typeclass, clean_attributes=False, no_default=True)
|
||||
access(accessing_obj, access_type=’read’, default=False,</p>
|
||||
<blockquote>
|
||||
<div><p>no_superuser_bypass=False, <a href="#id25"><span class="problematic" id="id26">**</span></a>kwargs)</p>
|
||||
</div></blockquote>
|
||||
<p>filter_visible(obj_list, looker, <a href="#id27"><span class="problematic" id="id28">**</span></a>kwargs)
|
||||
get_default_lockstring()
|
||||
get_cmdsets(caller, current, <a href="#id29"><span class="problematic" id="id30">**</span></a>kwargs)
|
||||
check_permstring(permstring)
|
||||
get_cmdset_providers()
|
||||
get_display_name(looker=None, <a href="#id31"><span class="problematic" id="id32">**</span></a>kwargs)
|
||||
get_extra_display_name_info(looker=None, <a href="#id33"><span class="problematic" id="id34">**</span></a>kwargs)
|
||||
get_numbered_name(count, looker, <a href="#id35"><span class="problematic" id="id36">**</span></a>kwargs)
|
||||
get_display_header(looker, <a href="#id37"><span class="problematic" id="id38">**</span></a>kwargs)
|
||||
get_display_desc(looker, <a href="#id39"><span class="problematic" id="id40">**</span></a>kwargs)
|
||||
get_display_exits(looker, <a href="#id41"><span class="problematic" id="id42">**</span></a>kwargs)
|
||||
get_display_characters(looker, <a href="#id43"><span class="problematic" id="id44">**</span></a>kwargs)
|
||||
get_display_things(looker, <a href="#id45"><span class="problematic" id="id46">**</span></a>kwargs)
|
||||
get_display_footer(looker, <a href="#id47"><span class="problematic" id="id48">**</span></a>kwargs)
|
||||
format_appearance(appearance, looker, <a href="#id49"><span class="problematic" id="id50">**</span></a>kwargs)
|
||||
return_apperance(looker, <a href="#id51"><span class="problematic" id="id52">**</span></a>kwargs)</p>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Hooks (these are class methods, so args should start with self):</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>basetype_setup() - only called once, used for behind-the-scenes</dt><dd><p>setup. Normally not modified.</p>
|
||||
</dd>
|
||||
<dt>basetype_posthook_setup() - customization in basetype, after the object</dt><dd><p>has been created; Normally not modified.</p>
|
||||
</dd>
|
||||
<dt>at_object_creation() - only called once, when object is first created.</dt><dd><p>Object customizations go here.</p>
|
||||
</dd>
|
||||
<dt>at_object_delete() - called just before deleting an object. If returning</dt><dd><p>False, deletion is aborted. Note that all objects
|
||||
inside a deleted object are automatically moved
|
||||
to their <home>, they don’t need to be removed here.</p>
|
||||
</dd>
|
||||
<dt>at_init() - called whenever typeclass is cached from memory,</dt><dd><p>at least once every server restart/reload</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>at_first_save()
|
||||
at_cmdset_get(<a href="#id53"><span class="problematic" id="id54">**</span></a>kwargs) - this is called just before the command handler</p>
|
||||
<blockquote>
|
||||
<div><p>requests a cmdset from this object. The kwargs are
|
||||
not normally used unless the cmdset is created
|
||||
dynamically (see e.g. Exits).</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>at_pre_puppet(account)- (account-controlled objects only) called just</dt><dd><p>before puppeting</p>
|
||||
</dd>
|
||||
<dt>at_post_puppet() - (account-controlled objects only) called just</dt><dd><p>after completing connection account<->object</p>
|
||||
</dd>
|
||||
<dt>at_pre_unpuppet() - (account-controlled objects only) called just</dt><dd><p>before un-puppeting</p>
|
||||
</dd>
|
||||
<dt>at_post_unpuppet(account) - (account-controlled objects only) called just</dt><dd><p>after disconnecting account<->object link</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>at_server_reload() - called before server is reloaded
|
||||
at_server_shutdown() - called just before server is fully shut down</p>
|
||||
<dl class="simple">
|
||||
<dt>at_access(result, accessing_obj, access_type) - called with the result</dt><dd><p>of a lock access check on this object. Return value
|
||||
does not affect check result.</p>
|
||||
</dd>
|
||||
<dt>at_pre_move(destination) - called just before moving object</dt><dd><p>to the destination. If returns False, move is cancelled.</p>
|
||||
</dd>
|
||||
<dt>announce_move_from(destination) - called in old location, just</dt><dd><p>before move, if obj.move_to() has quiet=False</p>
|
||||
</dd>
|
||||
<dt>announce_move_to(source_location) - called in new location, just</dt><dd><p>after move, if obj.move_to() has quiet=False</p>
|
||||
</dd>
|
||||
<dt>at_post_move(source_location) - always called after a move has</dt><dd><p>been successfully performed.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>at_pre_object_leave(leaving_object, destination, <a href="#id55"><span class="problematic" id="id56">**</span></a>kwargs)
|
||||
at_object_leave(obj, target_location, move_type=”move”, <a href="#id57"><span class="problematic" id="id58">**</span></a>kwargs)
|
||||
at_object_leave(obj, target_location) - called when an object leaves</p>
|
||||
<blockquote>
|
||||
<div><p>this object in any fashion</p>
|
||||
</div></blockquote>
|
||||
<p>at_pre_object_receive(obj, source_location)
|
||||
at_object_receive(obj, source_location, move_type=”move”, <a href="#id59"><span class="problematic" id="id60">**</span></a>kwargs) - called when this object receives</p>
|
||||
<blockquote>
|
||||
<div><p>another object</p>
|
||||
</div></blockquote>
|
||||
<p>at_post_move(source_location, move_type=”move”, <a href="#id61"><span class="problematic" id="id62">**</span></a>kwargs)</p>
|
||||
<dl class="simple">
|
||||
<dt>at_traverse(traversing_object, target_location, <a href="#id63"><span class="problematic" id="id64">**</span></a>kwargs) - (exit-objects only)</dt><dd><p>handles all moving across the exit, including
|
||||
calling the other exit hooks. Use super() to retain
|
||||
the default functionality.</p>
|
||||
</dd>
|
||||
<dt>at_post_traverse(traversing_object, source_location) - (exit-objects only)</dt><dd><p>called just after a traversal has happened.</p>
|
||||
</dd>
|
||||
<dt>at_failed_traverse(traversing_object) - (exit-objects only) called if</dt><dd><p>traversal fails and property err_traverse is not defined.</p>
|
||||
</dd>
|
||||
<dt>at_msg_receive(self, msg, from_obj=None, <a href="#id65"><span class="problematic" id="id66">**</span></a>kwargs) - called when a message</dt><dd><p>(via self.msg()) is sent to this obj.
|
||||
If returns false, aborts send.</p>
|
||||
</dd>
|
||||
<dt>at_msg_send(self, msg, to_obj=None, <a href="#id67"><span class="problematic" id="id68">**</span></a>kwargs) - called when this objects</dt><dd><p>sends a message to someone via self.msg().</p>
|
||||
</dd>
|
||||
<dt>return_appearance(looker) - describes this object. Used by “look”</dt><dd><p>command by default</p>
|
||||
</dd>
|
||||
<dt>at_desc(looker=None) - called by ‘look’ whenever the</dt><dd><p>appearance is requested.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>at_pre_get(getter, <a href="#id69"><span class="problematic" id="id70">**</span></a>kwargs)
|
||||
at_get(getter) - called after object has been picked up.</p>
|
||||
<blockquote>
|
||||
<div><p>Does not stop pickup.</p>
|
||||
</div></blockquote>
|
||||
<p>at_pre_give(giver, getter, <a href="#id71"><span class="problematic" id="id72">**</span></a>kwargs)
|
||||
at_give(giver, getter, <a href="#id73"><span class="problematic" id="id74">**</span></a>kwargs)
|
||||
at_pre_drop(dropper, <a href="#id75"><span class="problematic" id="id76">**</span></a>kwargs)
|
||||
at_drop(dropper, <a href="#id77"><span class="problematic" id="id78">**</span></a>kwargs) - called when this object has been dropped.
|
||||
at_pre_say(speaker, message, <a href="#id79"><span class="problematic" id="id80">**</span></a>kwargs)
|
||||
at_say(message, msg_self=None, msg_location=None, receivers=None, msg_receivers=None, <a href="#id81"><span class="problematic" id="id82">**</span></a>kwargs)</p>
|
||||
<p>at_look(target, <a href="#id83"><span class="problematic" id="id84">**</span></a>kwargs)
|
||||
at_desc(looker=None)</p>
|
||||
</div></blockquote>
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.objects.objects.DefaultObject.cmdset_provider_order">
|
||||
<code class="sig-name descname">cmdset_provider_order</code><em class="property"> = 100</em><a class="headerlink" href="#evennia.objects.objects.DefaultObject.cmdset_provider_order" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
@ -413,7 +628,7 @@ overriding in child classes.</p>
|
|||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>searchdata</strong> (<em>str</em>) – The search criterion.</p></li>
|
||||
<li><p><strong>attribute_name</strong> (<em>str</em>) – The attribute to search on (default is <a href="#id1"><span class="problematic" id="id2">**</span></a>.</p></li>
|
||||
<li><p><strong>attribute_name</strong> (<em>str</em>) – The attribute to search on (default is <a href="#id85"><span class="problematic" id="id86">**</span></a>.</p></li>
|
||||
<li><p><strong>typeclass</strong> (<em>Typeclass</em><em> or </em><em>list</em>) – The typeclass to search for.</p></li>
|
||||
<li><p><strong>candidates</strong> (<em>list</em>) – A list of objects to search between.</p></li>
|
||||
<li><p><strong>exact</strong> (<em>bool</em>) – Require exact match.</p></li>
|
||||
|
|
|
|||
|
|
@ -123,8 +123,117 @@ ability to run timers.</p>
|
|||
<em class="property">class </em><code class="sig-prename descclassname">evennia.scripts.scripts.</code><code class="sig-name descname">DefaultScript</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/scripts/scripts.html#DefaultScript"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.scripts.scripts.DefaultScript" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.scripts.scripts.ScriptBase</span></code></p>
|
||||
<p>This is the base TypeClass for all Scripts. Scripts describe
|
||||
events, timers and states in game, they can have a time component
|
||||
or describe a state that changes under certain conditions.</p>
|
||||
all entities/systems without a physical existence in the game world
|
||||
that require database storage (like an economic system or
|
||||
combat tracker). They
|
||||
can also have a timer/ticker component.</p>
|
||||
<p>A script type is customized by redefining some or all of its hook
|
||||
methods and variables.</p>
|
||||
<ul class="simple">
|
||||
<li><p>available properties (check docs for full listing, this could be
|
||||
outdated).</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><p>key (string) - name of object
|
||||
name (string)- same as key
|
||||
aliases (list of strings) - aliases to the object. Will be saved</p>
|
||||
<blockquote>
|
||||
<div><p>to database as AliasDB entries but returned as strings.</p>
|
||||
</div></blockquote>
|
||||
<p>dbref (int, read-only) - unique #id-number. Also “id” can be used.
|
||||
date_created (string) - time stamp of object creation
|
||||
permissions (list of strings) - list of permission strings</p>
|
||||
<p>desc (string) - optional description of script, shown in listings
|
||||
obj (Object) - optional object that this script is connected to</p>
|
||||
<blockquote>
|
||||
<div><p>and acts on (set automatically by obj.scripts.add())</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>interval (int) - how often script should run, in seconds. <0 turns</dt><dd><p>off ticker</p>
|
||||
</dd>
|
||||
<dt>start_delay (bool) - if the script should start repeating right away or</dt><dd><p>wait self.interval seconds</p>
|
||||
</dd>
|
||||
<dt>repeats (int) - how many times the script should repeat before</dt><dd><p>stopping. 0 means infinite repeats</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>persistent (bool) - if script should survive a server shutdown or not
|
||||
is_active (bool) - if script is currently running</p>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Handlers</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><p>locks - lock-handler: use locks.add() to add new lock strings
|
||||
db - attribute-handler: store/retrieve database attributes on this</p>
|
||||
<blockquote>
|
||||
<div><p>self.db.myattr=val, val=self.db.myattr</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>ndb - non-persistent attribute handler: same as db but does not</dt><dd><p>create a database entry when storing data</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Helper methods</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><p>create(key, <a href="#id1"><span class="problematic" id="id2">**</span></a>kwargs)
|
||||
start() - start script (this usually happens automatically at creation</p>
|
||||
<blockquote>
|
||||
<div><p>and obj.script.add() etc)</p>
|
||||
</div></blockquote>
|
||||
<p>stop() - stop script, and delete it
|
||||
pause() - put the script on hold, until unpause() is called. If script</p>
|
||||
<blockquote>
|
||||
<div><p>is persistent, the pause state will survive a shutdown.</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>unpause() - restart a previously paused script. The script will continue</dt><dd><p>from the paused timer (but at_start() will be called).</p>
|
||||
</dd>
|
||||
<dt>time_until_next_repeat() - if a timed script (interval>0), returns time</dt><dd><p>until next tick</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<ul class="simple">
|
||||
<li><p>Hook methods (should also include self as the first argument):</p></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<div><dl>
|
||||
<dt>at_script_creation() - called only once, when an object of this</dt><dd><p>class is first created.</p>
|
||||
</dd>
|
||||
<dt>is_valid() - is called to check if the script is valid to be running</dt><dd><blockquote>
|
||||
<div><p>at the current time. If is_valid() returns False, the running
|
||||
script is stopped and removed from the game. You can use this
|
||||
to check state changes (i.e. an script tracking some combat
|
||||
stats at regular intervals is only valid to run while there is
|
||||
actual combat going on).</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>at_start() - Called every time the script is started, which for persistent</dt><dd><p>scripts is at least once every server start. Note that this is
|
||||
unaffected by self.delay_start, which only delays the first
|
||||
call to at_repeat().</p>
|
||||
</dd>
|
||||
<dt>at_repeat() - Called every self.interval seconds. It will be called</dt><dd><p>immediately upon launch unless self.delay_start is True, which
|
||||
will delay the first call of this method by self.interval
|
||||
seconds. If self.interval==0, this method will never
|
||||
be called.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>at_pause()
|
||||
at_stop() - Called as the script object is stopped and is about to be</p>
|
||||
<blockquote>
|
||||
<div><p>removed from the game, e.g. because is_valid() returned False.</p>
|
||||
</div></blockquote>
|
||||
<p>at_script_delete()
|
||||
at_server_reload() - Called when server reloads. Can be used to</p>
|
||||
<blockquote>
|
||||
<div><p>save temporary variables you want should survive a reload.</p>
|
||||
</div></blockquote>
|
||||
<p>at_server_shutdown() - called at a full server shutdown.
|
||||
at_server_start()</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<dl class="py method">
|
||||
<dt id="evennia.scripts.scripts.DefaultScript.create">
|
||||
<em class="property">classmethod </em><code class="sig-name descname">create</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/scripts/scripts.html#DefaultScript.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.scripts.scripts.DefaultScript.create" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ indentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':S', ':h', ':', ':UU', ':f', ':>', ':u', ':A', ':echo', ':j', ':x', ':uu', ':!', ':s', ':I', ':w', ':wq', ':fd', ':DD', '::', ':p', ':<', ':=', ':q', ':i', ':fi', ':r', ':q!', ':::', ':y', ':dw', ':dd']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = [':A', ':h', ':fd', ':wq', ':r', ':dd', ':q!', ':DD', ':f', ':>', ':w', ':I', ':u', ':::', ':S', ':i', ':<', ':=', ':fi', ':!', ':p', ':UU', ':', ':x', ':s', ':q', ':y', ':uu', ':echo', ':dw', ':j', '::']</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -384,7 +384,7 @@ efficient presentation.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.eveditor.CmdEditorGroup.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':S :h : :UU :f :> :u :A :echo :j :x :uu :! :s :I :w :wq :fd :DD :: :p :< := :q :i :fi :r :q! ::: :y :dw :dd', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :S :h : :UU :f :> :u :A :echo :j :x :uu :! :s :I :w :wq :fd :DD :: :p :< := :q :i :fi :r :q! ::: :y :dw :dd', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': ':A :h :fd :wq :r :dd :q! :DD :f :> :w :I :u ::: :S :i :< := :fi :! :p :UU : :x :s :q :y :uu :echo :dw :j ::', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :A :h :fd :wq :r :dd :q! :DD :f :> :w :I :u ::: :S :i :< := :fi :! :p :UU : :x :s :q :y :uu :echo :dw :j ::', 'tags': '', 'text': '\n Commands for the editor\n '}</em><a class="headerlink" href="#evennia.utils.eveditor.CmdEditorGroup.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -955,7 +955,7 @@ single question.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['y', '__nomatch_command', 'n', 'abort', 'yes', 'no', 'a']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['yes', 'a', 'y', '__nomatch_command', 'n', 'no', 'abort']</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -981,7 +981,7 @@ single question.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'y __nomatch_command n abort yes no a', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' y __nomatch_command n abort yes no a', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'yes a y __nomatch_command n no abort', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' yes a y __nomatch_command n no abort', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}</em><a class="headerlink" href="#evennia.utils.evmenu.CmdYesNoQuestion.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.aliases">
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['next', 'e', 'end', 'top', 'n', 'quit', 'q', 'p', 't', 'abort', 'previous', 'a']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">aliases</code><em class="property"> = ['t', 'a', 'previous', 'quit', 'top', 'end', 'n', 'e', 'q', 'abort', 'p', 'next']</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.aliases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
|
|
@ -177,7 +177,7 @@ the <strong>caller.msg()</strong> construct every time the page is updated.</p>
|
|||
|
||||
<dl class="py attribute">
|
||||
<dt id="evennia.utils.evmore.CmdMore.search_index_entry">
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 'next e end top n quit q p t abort previous a', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' next e end top n quit q p t abort previous a', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">search_index_entry</code><em class="property"> = {'aliases': 't a previous quit top end n e q abort p next', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' t a previous quit top end n e q abort p next', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}</em><a class="headerlink" href="#evennia.utils.evmore.CmdMore.search_index_entry" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue