evennia.prototypes.menus

OLC Prototype menu nodes

evennia.prototypes.menus.node_validate_prototype(caller, raw_string, **kwargs)[源代码]

General node to view and validate a protototype

evennia.prototypes.menus.node_examine_entity(caller, raw_string, **kwargs)[源代码]

General node to view a text and then return to previous node. Kwargs should contain “text” for the text to show and ‘back” pointing to the node to return to.

evennia.prototypes.menus.node_index(caller)[源代码]
evennia.prototypes.menus.node_prototype_key(caller)[源代码]
evennia.prototypes.menus.node_key(caller)[源代码]
evennia.prototypes.menus.node_location(caller)[源代码]
evennia.prototypes.menus.node_home(caller)[源代码]
evennia.prototypes.menus.node_destination(caller)[源代码]
evennia.prototypes.menus.node_prototype_desc(caller)[源代码]
evennia.prototypes.menus.node_apply_diff(caller, **kwargs)[源代码]

Offer options for updating objects

evennia.prototypes.menus.node_prototype_save(caller, **kwargs)[源代码]

Save prototype to disk

evennia.prototypes.menus.node_prototype_spawn(caller, **kwargs)[源代码]

Submenu for spawning the prototype

class evennia.prototypes.menus.OLCMenu(caller, menudata, startnode='start', cmdset_mergetype='Replace', cmdset_priority=1, auto_quit=True, auto_look=True, auto_help=True, cmd_on_exit='look', persistent=False, startnode_input='', session=None, debug=False, **kwargs)[源代码]

基类:evennia.utils.evmenu.EvMenu

A custom EvMenu with a different formatting for the options.

nodetext_formatter(nodetext)[源代码]

Format the node text itself.

options_formatter(optionlist)[源代码]

Split the options into two blocks - olc options and normal options

helptext_formatter(helptext)[源代码]

Show help text

display_helptext()[源代码]
evennia.prototypes.menus.start_olc(caller, session=None, prototype=None)[源代码]

Start menu-driven olc system for prototypes.

参数
  • caller (Object or Account) – The entity starting the menu.

  • session (Session, optional) – The individual session to get data.

  • prototype (dict, optional) – Given when editing an existing prototype rather than creating a new one.