[Package Index | Mudlib Index | Effect Index]
File /obj/handlers/cmr_library.c
Handler to keep track of which players know which materials. Allows you to
find out which materials a player knows about and add new ones.  This is
typically used in conjunction with the cmr_handler for materials which
the player must be taught about.
See also:
cmr_handler.c
Written by Deutha
Method index
Public Functions
These are functions that everyone can access.
- 
add_known_material
int add_known_material(string pname,
                       string material)
 
Mark a material as known by a given player.
- Parameters:
pname - The name of the player
material - The name of the material
- Returns:
Returns 0 if they already knew the material, 1 if they know it now
  
- 
clean_up
int clean_up()
- 
init_data
void init_data(string pname)
  
Initialise a player's array of known materials.
- Parameters:
pname - The name of the player
 
- 
query_known_material
int query_known_material(string pname,
                         string material)
 
Return whether the player knows a particular material.
- Parameters:
pname - The name of the player.
material - The name of the material
- Returns:
1 if known 0 if not known.
  
- 
query_known_materials
string * query_known_materials(string pname)
 
Return the materials known by a player.
- Parameters:
pname - The name of the player
- Returns:
A string array of known materials