diff --git a/docs/0.9.5/.buildinfo b/docs/0.9.5/.buildinfo index 3db21fe370..503bc22924 100644 --- a/docs/0.9.5/.buildinfo +++ b/docs/0.9.5/.buildinfo @@ -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: 9116756ccc7a94e0bea91f44355f07a5 +config: 3b6eea1dfa21ed128a6fc4061e0bb949 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/0.9.5/Default-Commands.html b/docs/0.9.5/Default-Commands.html index 8dfc6e95c0..118613f54f 100644 --- a/docs/0.9.5/Default-Commands.html +++ b/docs/0.9.5/Default-Commands.html @@ -53,27 +53,27 @@ with Batch-Processor’s interactive mode.

@@ -208,7 +202,6 @@ its number 1..N.

options = ({"key": "testing", "desc": "Select this to go to node 2", "goto": ("node2", {"foo": "bar"}), - "exec": "callback1"}, {"desc": "Go to node 3.", "goto": "node3"}) return text, options @@ -369,7 +362,7 @@ re-running the entire node with text and options.

class evennia.utils.evmenu.CmdEvMenuNode(**kwargs)[source]

Bases: evennia.commands.command.Command

-

Menu options.

+

Command to handle all user input targeted at the menu while the menu is active.

key = '__noinput_command'
@@ -429,7 +422,7 @@ commands the caller can use.

-search_index_entry = {'aliases': '__nomatch_command', 'category': 'menu', 'key': '__noinput_command', 'no_prefix': ' __nomatch_command', 'tags': '', 'text': '\n Menu options.\n '}
+search_index_entry = {'aliases': '__nomatch_command', 'category': 'menu', 'key': '__noinput_command', 'no_prefix': ' __nomatch_command', 'tags': '', 'text': '\n Command to handle all user input targeted at the menu while the menu is active.\n\n '}
@@ -583,88 +576,17 @@ or functions defined dynamically or as part of another function. In non-persistent mode no such restrictions exist.

-
-
-msg(txt)[source]
-

This is a central point for sending return texts to the caller. It -allows for a central point to add custom messaging when creating custom -EvMenu overrides.

-
-
Parameters
-

txt (str) – The text to send.

-
-
-

Notes

-

By default this will send to the same session provided to EvMenu -(if session kwarg was provided to EvMenu.__init__). It will -also send it with a type=menu for the benefit of OOB/webclient.

-
- -
-
-run_exec(nodename, raw_string, **kwargs)[source]
-

NOTE: This is deprecated. Use goto directly instead.

-

Run a function or node as a callback (with the ‘exec’ option key).

-
-
Parameters
-
    -
  • nodename (callable or str) – A callable to run as -callable(caller, raw_string), or the Name of an existing -node to run as a callable. This may or may not return -a string.

  • -
  • raw_string (str) – The raw default string entered on the -previous node (only used if the node accepts it as an -argument)

  • -
  • kwargs (any) – These are optional kwargs passed into goto

  • -
-
-
Returns
-

new_goto (str or None)

-
-
A replacement goto location string or

None (no replacement).

-
-
-

-
-
-

Notes

-

Relying on exec callbacks to set the goto location is -very powerful but will easily lead to spaghetti structure and -hard-to-trace paths through the menu logic. So be careful with -relying on this.

-
- -
-
-extract_goto_exec(nodename, option_dict)[source]
-

Helper: Get callables and their eventual kwargs.

-
-
Parameters
-
    -
  • nodename (str) – The current node name (used for error reporting).

  • -
  • option_dict (dict) – The seleted option’s dict.

  • -
-
-
Returns
-

goto (str, callable or None) – The goto directive in the option. -goto_kwargs (dict): Kwargs for goto if the former is callable, otherwise empty. -execute (callable or None): Executable given by the exec directive. -exec_kwargs (dict): Kwargs for execute if it’s callable, otherwise empty.

-
-
-
-
-goto(nodename, raw_string, **kwargs)[source]
+goto(nodename_or_callable, raw_string, **kwargs)[source]

Run a node by name, optionally dynamically generating that name first.

Parameters
    -
  • nodename (str or callable) – Name of node or a callable +

  • nodename_or_callable (str or callable) – Name of node or a callable to be called as function(caller, raw_string, **kwargs) or -function(caller, **kwargs) to return the actual goto string or -a (“nodename”, kwargs) tuple.

  • +function(caller, **kwargs). This callable must return the node-name (str) +pointing to the next node.

  • raw_string (str) – The raw default string entered on the previous node (only used if the node accepts it as an argument)

  • @@ -674,26 +596,6 @@ argument)

-
-
-run_exec_then_goto(runexec, goto, raw_string, runexec_kwargs=None, goto_kwargs=None)[source]
-

Call ‘exec’ callback and goto (which may also be a callable) in sequence.

-
-
Parameters
-
    -
  • runexec (callable or str) – Callback to run before goto. If -the callback returns a string, this is used to replace -the goto string/callable before being passed into the goto handler.

  • -
  • goto (str) – The target node to go to next (may be replaced -by runexec)..

  • -
  • raw_string (str) – The original user input.

  • -
  • runexec_kwargs (dict, optional) – Optional kwargs for runexec.

  • -
  • goto_kwargs (dict, optional) – Optional kwargs for goto.

  • -
-
-
-
-
close_menu()[source]
@@ -712,10 +614,28 @@ of a property to inspect.

+
+
+msg(txt)[source]
+

This is a central point for sending return texts to the caller. It +allows for a central point to add custom messaging when creating custom +EvMenu overrides.

+
+
Parameters
+

txt (str) – The text to send.

+
+
+

Notes

+

By default this will send to the same session provided to EvMenu +(if session kwarg was provided to EvMenu.__init__). It will +also send it with a type=menu for the benefit of OOB/webclient.

+
+
parse_input(raw_string)[source]
-

Parses the incoming string from the menu user.

+

Parses the incoming string from the menu user. This is the entry-point for all input +into the menu.

Parameters

raw_string (str) – The incoming, unmodified string @@ -855,7 +775,7 @@ given, the decorated node must itself provide a way to continue from the node!

Notes

-

All normal goto or exec callables returned from the decorated nodes +

All normal goto callables returned from the decorated nodes will, if they accept **kwargs, get a new kwarg ‘available_choices’ injected. These are the ordered list of named options (descs) visible on the current node page.

@@ -1009,7 +929,7 @@ single question.

-aliases = ['no', 'abort', 'a', 'n', 'y', 'yes', '__nomatch_command']
+aliases = ['__nomatch_command', 'yes', 'abort', 'y', 'a', 'no', 'n']
@@ -1035,7 +955,7 @@ single question.

-search_index_entry = {'aliases': 'no abort a n y yes __nomatch_command', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' no abort a n y yes __nomatch_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}
+search_index_entry = {'aliases': '__nomatch_command yes abort y a no n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' __nomatch_command yes abort y a no n', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}
diff --git a/docs/1.0-dev/api/evennia.utils.evmore.html b/docs/1.0-dev/api/evennia.utils.evmore.html index b621e2312b..04ac2b3b1d 100644 --- a/docs/1.0-dev/api/evennia.utils.evmore.html +++ b/docs/1.0-dev/api/evennia.utils.evmore.html @@ -135,7 +135,7 @@ the caller.msg() construct every time the page is updated.

-aliases = ['abort', 'e', 'p', 'top', 'a', 'n', 'q', 'previous', 't', 'quit', 'end', 'next']
+aliases = ['t', 'top', 'abort', 'end', 'e', 'q', 'p', 'previous', 'a', 'quit', 'next', 'n']
@@ -161,7 +161,7 @@ the caller.msg() construct every time the page is updated.

-search_index_entry = {'aliases': 'abort e p top a n q previous t quit end next', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' abort e p top a n q previous t quit end next', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}
+search_index_entry = {'aliases': 't top abort end e q p previous a quit next n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' t top abort end e q p previous a quit next n', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}
diff --git a/docs/1.0-dev/genindex.html b/docs/1.0-dev/genindex.html index d714f07a5e..d123707bb7 100644 --- a/docs/1.0-dev/genindex.html +++ b/docs/1.0-dev/genindex.html @@ -8818,8 +8818,6 @@
  • (evennia.web.admin.tags.TagInline attribute)
  • -
  • extract_goto_exec() (evennia.utils.evmenu.EvMenu method) -
  • ExtraInfoAuthServer (class in evennia.server.portal.ssh)
  • @@ -17373,10 +17371,10 @@
  • (evennia.utils.ansi.ANSIString method)
  • -
  • replace_data() (evennia.utils.evtable.EvCell method) -