/
lib/banish/
lib/d/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/doc/examples/
lib/doc/examples/armour/
lib/doc/examples/contain/
lib/doc/examples/food/
lib/doc/examples/magic/
lib/doc/examples/monster/
lib/doc/examples/room/
lib/doc/examples/weapons/
lib/include/
lib/include/fn_specs/
lib/include/skills/
lib/info/
lib/inherit/base/
lib/log/
lib/manuals/312/
lib/news/
lib/obj/party/
lib/objects/components/
lib/open/
lib/open/library/
lib/open/party/
lib/players/
lib/players/zilanthius/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/obj/
lib/room/city/shop/
lib/room/death/
lib/room/registry/
lib/secure/
lib/secure/UDP_CMD_DIR/
lib/skills/
lib/skills/fighter/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/players/
                  -=[ Shadow ]=-

[...from efun docs]

object shadow(object ob, int flag)

If flag is 1, then current object will shadow ob. If flag is
0, then either 0 will be returned, or the object that is the
shadow for ob. An object that defines the funtion
query_prevent_shadow() to return 1 can't be shadowed, and the
shadow() function will return 0 instead of ob. If an object
A shadows an object B, then all call_other() to B will be
redirected to A. If object A has not defined the function,
then the call will be passed on to B. There is only one object
that can call functions in B with ncall_other(), and that is
A. Not even object B can call_other() itself.

All normal (internal) function calls inside B will however
remain internal to B. There are two ways to remove the shadow.
Either destruct it, or the object that was shadowed.  In the
latter case, the shadow will also be destructed automatically.

The result is that it is possible to hide an object behind
another one, but everything can be totally transparent.

Further Notes: 

shadow objects must be cloned from the directory, /obj/shadows/.
Which ONLY ADMIN have write access. 

1. DO NOT call the shadow object directly, this
stops others cloning the shadow object.

2. DO clone the shadow object before calling the appropriate
shadow function.

3. DO NOT MOVE OBJECT, shadowing objects cannot be moved into
an environment.

4. DO inherit "obj/shadows/shadow", and use the function 
shadow_object(ob) to shadow object ob instead of shadow(ob,1),
when making new shadow objects for /obj/shadows/. This will
set info which may be used by other objects.

Notes: An object can be shadowed by many shadow objects. But
if a shadowed fn occurs in more then one shadow, only the
upper most shadow fn will be used.


Functions in /obj/shadows/shadow,

object query_shadow_ob()

  This fn returns the upper most shadow object.  Should be 
  equivalent to the efun shadow(ob,0).

          -=-

object *query_shadow_list()

  This fn returns an array of objects that are shadowing a   
  shadowed object.

          -=-

static void shadow_object(object ob)

  This fn shadows object ob, with this object. Sets up shadow  
  list. So it is better to use this rather then shadow(ob,1). 
  If ob is zero the object destructs itself. 

  Note that it is static, and is only a local fn. 

          -=-