OBJECT
/std/corpse
LAST UPDATE
Mateese, 18-Jan-94 00:30 MET
SYNOPSIS
#include <properties.h>
inherit "/std/corpse";
OR
clone_object("/std/corpse");
DESCRIPTION
This is a special container which autodestructs after a
specific time. It is used when livings/players die.
It features two builtin properties on its own:
int P_DECAY_TIME "DecayTime"
The number of seconds to elapse between to decay steps
(preconfigured to 120 seconds).
int P_DECAY "Decay"
An increasing counter of the state of decay.
A value < 0 indicates an non-decaying corpse, 0 is a fresh
corpse, a value > 0 is a somewhat rotten corpse.
Since the corpse is meant for use with dead livings, it has
two extra builtin properties to be configured:
string P_NAME "Name"
The name of the dead living.
Setting this also sets the P_LONG and P_SHORT description,
and adds "corpse of <name>" as P_IDS.
string P_RACE "Race"
The race of the dead living.
The actual decay is triggered by a call to DoDecay():
void DoDecay (int justschedule)
If <justschedule> is set, this function has just to setup
an approbiate call_out().
Else it has to increment P_DECAY, do any changes in the
corpse's descriptions, and to setup another call_out to
DoDecay().
If the corpse is decayed enough, the function has to call
remove() for selfdestruction.
The default is that on the first call the P_SHORT and P_LONG
is changed to something 'more rotten', and on the second call
the corpse selfdestructs.
BUGS
The corpse should be eadable by /std.
INHERITANCE TREE
corpse
`-std/container
|-std/base
|-std/room/description
|-std/thing/properties
|-std/thing/description
|-std/thing/moving
`-std/container/restrictions
|-std/thing/restrictions
`-std/room/restrictions
SEE ALSO
container(S), living(S)