evennia.server.connection_wizard¶
Link Evennia to external resources (wizard plugin for evennia_launcher)
-
class
evennia.server.connection_wizard.
ConnectionWizard
[源代码]¶ 基类:
object
-
ask_node
(options, prompt='Enter choice: ', default=None)[源代码]¶ Retrieve options and jump to different menu nodes
- 参数
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')[源代码]¶ Ask a yes/no question inline.
- 关键字参数
prompt (str) – The prompt to ask.
default (str) – “yes” or “no”, used if pressing return.
- 返回
reply (str) – Either ‘yes’ or ‘no’.
-
ask_choice
(prompt=' > ', options=None, default=None)[源代码]¶ Ask multiple-choice question, get response inline.
- 关键字参数
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
- 返回
reply (str) – The answered reply.
-
ask_input
(prompt=' > ', default=None, validator=None)[源代码]¶ Get arbitrary input inline.
- 关键字参数
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).
- 返回
inp (str) – The input given, or default.
-