From the NannyMUD documentation

LAST CHANGE

2000-12-16

NAME

        simple_container - A simple container object.

INHERITS

/std/basic_thing

FUNCTIONS

OTHER FUNCTIONS

	set_max_weight
	query_local_weight
	add_object
	is_container
	remote_prevent_insert
	remote_handle_insert

PROPERTIES

INTERNAL PROPERTIES


PROPERTY NAME

        opaque - Make the container opaque.

DESCRIPTION

	
	If set, this prevents light from items inside the container
	to reach the outside. By default, this property is set.

PROPERTY NAME

        waterproof - Make the container waterproofed.

DESCRIPTION

	
	If set, this prevents things inside the container to become
	wet when container becomes wet.

PROPERTY NAME

        is_where - In/on/at...

DESCRIPTION

	
	If set, the positional description 'in' in the message given
	given from prevent_insert() will be replaced by the value of
	the property.

NAME

        contain_msg - Replace the 'contain' message.

DESCRIPTION

	
        Replaces the 'contains' in the desc when you examine the
	container, and there are things in it.

NAME

        __remote - The __remote property.

DESCRIPTION

	
        This is the standard __remote property.


FUNCTION


NAME

        set_max_weight - Set how much this object can contain.

SYNTAX

	set_max_weight(int max_weight)

DESCRIPTION

	Sets how much this container can contain, the total weight of
	the objects in the container may not be larger than this value.

	Default is 6.

FUNCTION


NAME

        query_local_weight - See how much this object can contain.

SYNTAX

	query_local_weight()

DESCRIPTION

	This shows how much the container can contain, apart from what it
	already contains.

FUNCTION


NAME

        add_object - Add an object to the container.

SYNTAX

	add_object(file_name)
	add_object(file_name, use_load)

DESCRIPTION

	This is a convenience function. In it's most simple form, it clones
	the object specified by 'file_name' to the container, but it can
	handle several other cases:

	+ If the 'file_name' is a string, and 'use_load' is non-zero, then
	  load_object() will be used instead of clone_object().
	+ If 'file_name' is an object, that object will be moved to the
	  container.

NOTE

	Unlike add_object() in rooms, this function will NOT make the item
	reappear every reset.

FUNCTION


NAME

        remove_object - Destruct an object in the container.

SYNTAX

	add_object(mixed ob)

DESCRIPTION

	This is a convenience function. It will remove an object from the
	container, by destructing it. Only objects with the container as
	the environment will be destructed.
	+ If 'ob' isn't given, the first object (as given by first_inventory())
	  in the container will be destructed.
	+ If 'ob' is an object, that object will be destructed.
	+ If 'ob' is a string, an object with that id will be destructed.

FUNCTION


NAME

        empty - Destruct all objects in the container.

SYNTAX

	empty()

DESCRIPTION

	This function destructs everything in the container.

FUNCTION


NAME

        is_container - Marks this object as a container.

SYNTAX

	int is_container()

DESCRIPTION

	This function returns 1, and by doing so marks the object as
	being a container. This is used for fast checks in the lib, and
	can be used by the coding wizard for nice discrimination of
	objects.

NOTE

	+ Do not overload this function unless you know what you are
	  doing.
	+ Do not define this function in your own objects unless you
	  know what you are doing.

FUNCTION


NAME

        remote_prevent_insert - Prevent players to insert some things.

SYNTAX

	int remote_prevent_insert(object container, object what)

DESCRIPTION

	If this function returns 1, it will prevent 'what' from being
	inserted into 'container.' You should give a suitable error
	message. It is not certain that the item will be inserted in
	the container if this function returns zero, because it may
	still not fit.

FUNCTION


NAME

        remote_handle_insert - Do side effects when inserting things.

SYNTAX

	void remote_handle_insert(object container, object what)

DESCRIPTION

	This function is called when 'what' has been inserted into
	'container' successfully. It may be used to make trash cans,
	and other objects that has side effects when you put things
	in them.