bag.c - example for course 15

[previous example] [course15] [Table of contents] [next example]
/* Filename      : bag.c
 * Description   : a simple container
 *
 * written       : 26-Mar-2001 - Ghorwin
 * last modified : 26-Mar-2001 - Ghorwin
 */

#include <mudlib.h>
#include <container.h>  // contains all defines for containers
inherit I_CONTAINER;

void
create() {
    ::create();
    set_name("bag");
    set_short("a bag");
    set_long("A bag to put things into.\n");
    set_value(100);
    set_weight(2);
    set_max_weight(5);
    set_can_open(TRUE);       // Now you can open the bag
    set_def_open(FALSE);      // Close the bag each reset!
    replace_program(I_CONTAINER);
}