polc.editor
index
/mud/nakedmud-mod/lib/pymodules/polc/editor.py

################################################################################
#
# Four Worlds
# Copyright (c) 2009-????
#
#    File: editor.py
#
# This module allows you to directly edit instances of objects, rooms, and mobs
# utilizing the automatic-OLC system.
#
# The editor can be extended, similarly to the built-in OLC system. In fact, it
# is compatible, so you can extend this system with a single extra line of
# code if you've already written an extender for the traditional OLC.
#
# Author: Stendec
#
################################################################################

 
Modules
       
polc.main
mud
mudsys
olc

 
Functions
       
__unload__()
cmd_iedit(ch, cmd, arg)
Usage: iedit <direction|room|object|person>
 
Attempt to edit the person, object, exit, or room specified. This command
edits living instances, NOT prototypes, and changes are carried out as you
make them. Be careful with this.
do_edit_exit(sock, data, key, val)
Enter the exit editor from the room editor.
edit_character(sock, ch)
Start the OLC for an instance of a mob, or a player character.
edit_exit(sock, ex)
Edit an exit.
edit_object(sock, object)
Start the OLC for an instance of an item.
edit_room(sock, room)
Start the OLC for an instance of a room.
extend(editor, key, menu_func, chooser_func, parser_func=None)
Register a new menu extender. To stay mostly compatible with the built-in OLC
extender, types are medit, redit, and oedit.
fill_exit(sock, data, key, val)
Fill an exit.
get_bitvector(...)
get_bitvector(bitvector)
 
Gets a list of the avaliable bits in the specified bitvector.
handle_boolint(sock, data, key)
handle_closable(sock, data, key)
Swap the closable tag.
handle_closed(sock, data, key)
handle_item_types(sock, data, key)
Enter the item type submenu.
handle_locked(sock, data, key)
it_container(sock, object)
Start the container editing menu for the given object.
it_furniture(sock, object)
Start the furniture editing menu for the given object.
it_portal(sock, object)
Start the portal editing menu for the given object.
it_worn(sock, object)
Start the worn editing menu for the given object.
item_add_olc(itemtype, menu_func, chooser_func, parse_func)
Registers a new item type handler.
itype_chooser(sock, data, opt)
itype_menu(sock, data)
Render the item types menu.
itype_parser(sock, data, opt, val)
list_exits(sock, data, key, value)
Render a list of exits out.
render_boolint(sock, data, key, value)
render_closable(sock, data, key, value)
Show the 'needs name and keywords' tag if necessary.
render_exit(sock, data, key, value)
render_item_types(sock, data, key, value)
Render a list of item types.

 
Data
        land_bits = ['Fish']
mob_exts = {}
obj_bits = ['notake']
obj_exts = {}
obj_types = {'container': <function it_container>, 'furniture': <function it_furniture>, 'portal': <function it_portal>, 'worn': <function it_worn>}
room_bits = []
room_exts = {}
worn_types = ['shirt', 'weapon']