evennia.server.connection_wizard¶
Link Evennia to external resources (wizard plugin for evennia_launcher)
-
class
evennia.server.connection_wizard.
ConnectionWizard
[source]¶ Bases:
object
-
ask_node
(options, prompt='Enter choice: ', default=None)[source]¶ Retrieve options and jump to different menu nodes
- Parameters
options (dict) – Node options on the form {key: (desc, callback), }
prompt (str, optional) – Question to ask
default (str, optional) – Default value to use if user hits return.
-
ask_yesno
(prompt, default='yes')[source]¶ Ask a yes/no question inline.
- Keyword Arguments
prompt (str) – The prompt to ask.
default (str) – “yes” or “no”, used if pressing return.
- Returns
reply (str) – Either ‘yes’ or ‘no’.
-
ask_choice
(prompt=' > ', options=None, default=None)[source]¶ Ask multiple-choice question, get response inline.
- Keyword Arguments
prompt (str) – Input prompt.
options (list) – List of options. Will be indexable by sequence number 1…
default (int) – The list index+1 of the default choice, if any
- Returns
reply (str) – The answered reply.
-
ask_input
(prompt=' > ', default=None, validator=None)[source]¶ Get arbitrary input inline.
- Keyword Arguments
prompt (str) – The display prompt.
default (str) – If empty input, use this.
validator (callable) – If given, the input will be passed into this callable. It should return True unless validation fails (and is expected to echo why if so).
- Returns
inp (str) – The input given, or default.
-