Walraven specific stuff:

Walraven is unusual in that we allow you to combine different components
into a single object. For example, you can create a new type of item
by combining:

desc -- Give it a description
item -- Give it weight, bulk, position, etc.
edible -- Makes the item edible (consumable)
inven -- Makes it last through reboots
object -- Make it clonable

These individual puzzle pieces are called components. You can use them
with #include <component.h>.  If all you're going to do is use a component,
then this is all you need to know.

If you want to make new components, then read on :-).

First, the quick version:

Components go in /inherit; objects go elsewhere. Components cannot be
cloned, but are used to build objects. Objects may be cloned and manipulated
in the world.

Objects may be singly inherited -- that is, you can make a new object by
inheriting an old one, but you can't make a new object by inheriting two
old ones -- it will break. You can mix and match components with fewer
restrictions.

To make a new component, simply follow these rules:

1. Only #include files that have "const" in the name (const.h,
const/battconst.h, etc.). Don't include other components, because
this makes for tangled dependencies. Never include object.h.

2. Make a header file that inherits your component in /include. Most
of the header files work this way. You can #include "const" files
in the header file as well, to make those constants avaiable in the
object using the component.

3. If you MUST break rule 1 (make sure you have a good reason), then
modify your include file so that the components cannot both be included
in the same object. Check item.h for an example.

4. Do not use the functions init, create, reset, or destructor in your
component. Instead, use _init_xxx, _create_xxx, _reset_xxx, and
_destructor_xxx, where xxx is the name of your component. These are
called by object.c's init, create, reset, and destructor.

That's the short version. If you're a glutton for punishment, and want
to know WHY you have to do all this, read on.

Components are actually inherited objects; the #include files usually look
something like this:

#ifndef _MY_HEADER_H_
#define _MY_HEADER_H_

inherit "/inherit/my_header";

#endif

Additionally, the #include's might include some constants (const/battconst.h,
for example), or they might do some error checking to make sure you don't
mix include files in an incompatible fashion (see item.h for an example
of this).

The trick to components is that they have to be written in such a way as
to allow *multiple* inheritance. The problem we're trying to avoid here
is something like this:

     My_Object
     /       \
  Comp1     Comp2
    |         |
  Comp3     Comp3

In this example, My_Object inherits component 1 and component 2, BOTH of
which inherit component 3. This behaves a little unpredictably -- your
object has TWO copies of component 3, including all variables, but only
ONE of them can save to disk or be accessed externally -- you have a
"shadow" component 3, and only the component inheriting it can see it.

Confusing, huh? Write some test code with an inheritance pattern like the
one above, and try out some behaviors. Code like this is counter-intuitive
and leads to a lot of errors, which is why we avoid it.

I'm about out of explanation. If you still have questions, poke acius,
and I'll modify this document.
