Ability: containable

Description:

This ability is used for objects which can be contained in another object. Most classes have this ability (rooms are an exception). Each containable has mass and bulk which are non-negative integers. A containable can be temporarily made uncontainable with set_uncontainable().

Normally you need not inherit this ability in your object. An exception would be a room that can be contained in another room, such as a vehicle or a coffin.

Usage:

#include <ability.h>

inherit CONTAINABLE;

Functions:

string query_mass()
Return the mass of the object.

string set_mass(int m)
Set the mass of the object to m. Mass -1 indicates that the object is (temporarily) uncontainable. Use set_uncontainable() instead of set_mass(-1).

string query_bulk()
Return the bulk of the object.

string set_bulk(int b)
Set the bulk of the object to a non-negative integer b.

string query_uncontainable()
Return 1 if the object is uncontainable, 0 otherwise.

string set_uncontainable()
Make the object uncontainable. To make it containable again, use set_mass(m).

Source code:

/ability/containable.c.

See also:

Ability: container