Module m_sibling

Documentation for the modules-m_sibling module in /std/modules/m_sibling.c.

Module Information

This module handles an object that has a corrsponding sibling. Typically used for doors, where two door objects in two different rooms should act as one object. Could also be used for teleporters, one-way mirrors, and other things where the object is on two rooms, but should be considered as one object. Elevator doors use this functionality as well.

Note: setup_door() is deprecated. Use this approach instead:

set_sibling_ident("oak door");
set_door_direction(dir);
set_door_destination(room);

Functions

void set_sibling_ident(string ident)

Set the ID the siblings will be using.

void set_sibling_room(mixed room)

Set the room of the sibling. This can either be an object or a string. If a string it will then be loaded as an object.

int respond_to_sibling_ident(string id)

For the siblings to be able to find each other, this public function returns true if the ident matches.

object get_sibling()

From a given object, return the sibling object. Usefor for responding to things that happens to the sibling object or vice versa.

void update_sibling()

After a door is opened or closed, this is called, and in turn calls do_on_open/close() in the door and its sibling.

File generated by Lima 1.1a4 reStructured Text daemon.