[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/reaction.c

reaction handler - Handles reactions between substances that have been mixed together. A few notes of what I have planned: the substance mapping will have as its keys the substance names (as returned by query_medium_alias()). The value will be another mapping (one for each substance). This second-level mapping will have as its keys the substances with which it reacts. To save space, the names of the two substances will be compared, and the alphanumerically lower one will be the index into the top-level mapping. The value of the second-level mapping is the tricky part. It is currently a class that contains all the relevant information. See the definition of the class for more info. The following pseudo-objects may be used in the message strings and function call strings; process_string is explicitly called in both cases: #env# - replaced by the filename of the environment #env2# - replaced by the filename of the environment of the enviroment #obj_a# - The object being added to the container #obj_b# - The object with which 'a' is reacting #obj_x# - The transient object, or the result object if no transient Various debugging messages will be printed if this_player() has a property call "debug_rh" with a non-zero value. To Do: Handle concentrations.

Includes

This class includes the following files /include/reaction.h and /include/move_failures.h

Method index

Public Functions

These are functions that everyone can access.

check_reaction
void check_reaction(object a)
dest_substance
void dest_substance(object ob)
is_present
object is_present(object ob,
                  object env)
merge_cont_medium
object merge_cont_medium(object a,
                         string medium_alias)
merge_effects
mapping merge_effects(mapping effects_a,
                      mapping effects_m,
                      int q_a,
                      int q_m)
move_substance
void move_substance(object * ob)
query_reaction
mixed * query_reaction(string name_a,
                       string name_b)
query_reactions
mapping query_reactions()
restore_from_files
void restore_from_files()
update_from_files
void update_from_files(string fn)
write_dbg
void write_dbg(string str,
               mixed args ...)