LABEL.C
LIB3/STD/BASIC/LABEL.C · 732 B
From the archive nm4dos.zip
Download the archive « Back to the archive contents
#pragma save_binary
object *labels;
void create()
{
labels = ({ });
}
object *query_labels()
{
return labels;
}
int add_weight( int n )
{
return 0;
}
int test_remove( object ob, int flag )
{
return 1;
}
int test_add( object ob, int flag )
{
return ob->query_property( "label" ) && member_array( ob, labels ) != -1;
}
void add_label( object ob )
{
if( environment() )
{
filter_array( all_inventory( environment() ), "add_read_this", this_object() );
environment()->add_command( "read", this_object() );
}
labels += ({ ob });
}
void remove_label( object ob )
{
labels -= ({ ob });
}
mixed * query_init_data()
{
return({ "labels", labels, "add_label/P*/" });
}