OBJECT
/std/container
LAST UPDATE
Mateese, 18-Aug-94 03:00 MET
SYNOPSIS
#include <properties.h>
inherit "/std/container";
DESCRIPTION
A container is a special object which can contain other
objects while also being contained in an surrounding object by
itself.
The task of the container is therefore to glue the /std/room
to the /std/thing into one object. However, the container
does not feature 'exits', 'roomcommands' or 'items' like
full-fledged rooms do.
The /std/container is always open.
Putting/getting things into/from a container affects its
weight as well as the weight of all environments. Normally,
these change by the weight of the thing put/got.
/std/container can also be configured to change the effective
weight of the objects it contains, e.g. that the environments
'see' just 1/3rd of the thing's weight (this is useful for
knapsacks).
Similar, the container can more or less promote the trespass
of light; expressed by its transparency. No light direction is
preferred.
--- std/container/restrictions ---
Besides transparency and weight-change only a few functions
from thing and room are overloaded for adaption:
QuerySunLight(), MayAddWeight(), AddIntWeight() and QueryWeight().
mixed FilterWeatherData (object client, mixed *data)
This function has been changed so that it will return 0 if
the P_TRANSPARENCY is below 500, else it will return
<data> unchanged.
int P_TRANSPARENCY "Transparency"
The transparency of the container, expressed in a scale
of 0..1000.
int P_WEIGHT_CHG "WeightChg"
The factor which determines how much of the contents
weight 'show through' to the environment. It is expressed
in a scale of 0..1000.
For light propagation, the lfuns
void light_from_inside (int l)
void light_from_outside (int l)
protected void emit_light (int l)
protected void emit_intlight (int l)
int SetBright (int l)
int QueryBright ()
are redefined.
The location of objects with
object*|object Locate (void|mixed what, void|int mode)
refuses to find objects if the searcher is not inside, the
transparency is below SEARCH_MIN_TRANSP and the container is
not LOCK_OPEN.
For initialisation, the lfun
void create(void)
is implemented here.
INHERITANCE TREE
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
base(S), room(S), thing(S), inroom(O)