From the NannyMUD documentation

LAST CHANGE

2000-12-07

NAME

        water_room - A room with water functionality.

INHERITS

	/std/room

FUNCTIONS

SETUP FUNCTIONS

	set_surface
	set_bottom
	set_drown_time
	set_damage

QUERY FUNCTIONS

        query_surface
	query_bottom
	query_drown_time
	query_damage

PROPERTIES

INTERNAL PROPERTIES


PROPERTY NAME

        airy_water - The water is breathable.

DESCRIPTION

	If the room has water that can be breathed, set this
	property.

PROPERTY NAME

        do_damage - Drowning will affect HP.

DESCRIPTION

	If you want the player to take damage when the player has no
	air, set this property.

PROPERTY NAME

        salt_water - The water here is salt.

DESCRIPTION

	If this property is set, then players won't be able to drink
	here

PROPERTY NAME

        waterfilled - Activate the water code.

DESCRIPTION

        When set, this property makes the water code in the room
        active. It is set by default. You can use this to simulate
        tides, airlocks, etc.

PROPERTY NAME

        __remote - Use a remote object

DESCRIPTION

	The use of the remote object is described in detail below.

EXTERNAL PROPERTIES


PROPERTY NAME

        air_supply - The player has an air source.

DESCRIPTION

	If an object has this property and a player carries it, the
	player can breathe under water.

PROPERTY NAME

        floatable - Marks a floating object.

DESCRIPTION

	If an object has this property set, it will float to the surface

PROPERTY NAME

        waterbreathing - The living can breath water.

DESCRIPTION

	If a living has this property, it can breathe under water.

DESCRIPTION

        This room is intended to be used for locations filled with
	water.  It may also be used as a normal room. Whether it is
	waterfilled or not is controlled by using properties: If the
	property "waterfilled" is set, the room's special behaviour
	will be activated. This makes it possible to simulate tides,
	airlocks, etc...  The property is set by default. To remove
	it, do 'remove_property("waterfilled");'

	In water_rooms the command drink is defined, and if you type
	drink water you drink some water. If you want different
	functionallity you can redefine the function called
	cmd_drink_water.

	If something is dropped in the room, it can float or sink
	depending on among other things, weight and properties.

FUNCTION


NAME

        set_surface - Set the room where the surface is.

SYNTAX

void set_surface(string room)

DESCRIPTION

	Set the room to where the player ends up in when he floats to
	the surface. 
	If set_surface() is not called, the room is considered a water
	surface, and there will be no risk of drowning.

FUNCTION


NAME

        set_bottom - Set the room where the bottom is.

SYNTAX

void set_bottom(string room)

DESCRIPTION

	Set the room where the bottom is.
	If set_bottom() is not called, the room is supposed to have its own
	bottom,	and dropped items will not sink.

FUNCTION


NAME

        set_damage - Set the damage a drowning player takes.

SYNTAX

void set_damage(int dam)

DESCRIPTION

	Set the damange a drowning player takes. You also need to call
	set_drown_time(), which decides how often the player will take
	drowning damage. Note that the argument should be positive.
	If you don't call this function, the default damage is 10.

FUNCTION


NAME

        set_drown_time - Set the time a player can be underwater.

SYNTAX

void set_drown_time(int i)

DESCRIPTION

	Sets the time after which the player is forced to
	the surface, and thus rescued from drowning.  

FUNCTION


NAME

        query_surface - Ask what room is surface.

SYNTAX

string query_surface()

DESCRIPTION

	Returns the room that is this rooms surface.
	The surface variable is evaluated before it is returned.

FUNCTION


NAME

        query_bottom - Ask what room is bottom

SYNTAX

string query_bottom()

DESCRIPTION

	Returns the room that is this room's bottom.
	The bottom variable is evaluated before it is returned.	

FUNCTION


NAME

        query_damage - Ask what the drowning damage is.

SYNTAX

int query_damage()

DESCRIPTION

	Returns the damage a player will take from drowning.
	The damage variable is evaluated before it is returned.

FUNCTION


NAME

        query_drown_time - Ask how long time a player can stay in this room

SYNTAX

int query_drown_time()

DESCRIPTION

	Returns the time a player can stay in this room without being
	forced to the surface.
	The drown time variable is evaluated before it is returned.

FUNCTION


NAME

        remote object - Define the remote object.

SYNTAX

void add_property("__remote", string remote_file_name)

SYNTAX

void add_property("__remote", object remote_object)

DESCRIPTION

        The remote object is used to add side effect.
	The following functions are used:

	int remote_block_sink_search(object location)
	If you want to block the sinking and floating of objects
	return 1.

	int remote_block_rise(object room,object who,int has_air)
	If you want to block that  rises to the surface in
	, simply return 1.  is 1 if  has
	air and 0 otherwise.

	void remote_do_rise(object room, object who, int air)
	This function is called after  has been moved to the
	surface.

	int remote_block_drown(object room,object who,int has_air)
	If you want to block that  gets hurt by lack of air in
	 simply return 1.  is 1 if  has air
	and 0 otherwise.

	void remote_do_drown(object room, object who, int air, int damage)
	This function is called after  has been damaged.
	 is how much damage was dealt to .

NOTE

        If the remote_object_file_name is given as a string, the functions
        are called in the master object. If you want them to be called in
        a clone, you must give an object.