
PROPERTIES:

   Properties are mappings which can be called in any object that
   includes /obj/properties.h. Thats nowadays all livings incl. 
   players. Properties shall only be set into a player, with the
   permission of an archwiz, or if you find this property under
   man property_list.

FUNKTIONS:
  
   The functions to handle properties are add_property(), remove_property(),
   query_property() and property_list().


ADDING A PROPERTY:

   int add_property(string property,mixed value)

   This function adds a property to your object as for example:

   this_player()->add_property("katana_user",1);

   A mapping in the form of (["katana_user":1]) is then added to your
   current property.

   Warning: Adding a property, which already exists, removes the old
            property !

REMOVING A PROPERTY:

   int remove_property(string property)

   This function removes a property from the property mapping.

   For example:

   this_player()->remove_property("katana_user") will remove the
   property in the upper added example.

QUERY PROPERTY:

    mixed query_property(string property)
   
    This function returns the value added in the add_property function.

    For example this_player()->query_property("katana_user") will return 1
    in upper case.

PROPERTY LIST:

    string *property_list()

    This function returns in an array all properties the object has.

    For example this_player()->property_list() will return ({"katana_user"}) 
    in upper case.


EXAMPLES:
   
 a )  We want that a player who slays Ryu ever gets a katana from the smith.

    1.) We code in Ryu:

    int monster_died(object ob)
    {
        if (!this_player()->query_property("katana_user"))
             this_player()->add_property("katana_user",1);
        this_player()->save_character();
    }

    2.) We code in the Smith:

        int any_function(string any_argument)
        {
          object katana;

           if (!present("katana",this_player()) && 
                this_player()->query_property("katana_user"))
           {
                katana = clone_object("/players/patience/katana");
   
                if (transfer(katana,this_player()))
                {
                   write("The Smith says: You are too heavy loaded !\n");
                   destruct(katana);
                }
                write("The Smith gives you your katana back.\n");
           }
          return 1;
        }
         
    b) We have a quest and want only set the quest if the player
       entered roomxyz.c

       So we code in the init of the room:

       void init()
       {
           if (interactive(this_player()) && 
               !this_player()->query_property("was_in_my_room"))
           {
                this_player()->add_property("was_in_my_room",1);
                this_player()->save_character();
           }
         ::init();
       }

        Ok now the player solved the quest. We have then to remove
        the property again, unless its saved in the playerfile.

        if (this_player()->query_property("was_in_my_room"))
        {
            this_player()->set_quest("roomquest");
            this_player()->remove_property("was_in_my_room");
            this_player()->save_character();
            write("Wow you did it !\n");
            return 1;
        }
        else 
        {
            write("But you didn't find the room.\n");
            return 1;
        }


OTHER EXAMPLES:

     this_player()->add_property("bank_accounts",
                    (["wukis_bank":2000,"annas_broker":200]))
     this_player()->add_property("friends",({"freddy","mausi","willy"}))
     this_player()->add_property("smell","@@query_smell");


WARNING:

     While the first 2 exaples where relatively harmless, the under 3 
     ones are not !
     So please if you use them on a player in no REALLY HARMLESS case 
     ask an Arch before.

