anchor.diff:  	</ul>
   	</p>"}
   
  -	var/static/base_case = 0
  -	var/static/recursive_case = 0
  -	var/static/lookup_case = 0
  -
   //Calculate the reactions list, or return it if already calculated (saves time).
   /obj/item/weapon/book/manual/chembook/proc/get_reactions()
   	if (!reactions.len)
  
positive.code: 	return chemical_reagents_list
  
  /obj/item/weapon/book/manual/chembook/proc/add_reaction(var/datum/chemical_reaction/reaction)
  	if(!reaction.category in allowed_categories)
  		return 0
  	content += {"
  		<tr><td><center>[reaction.name]</center></td>
  		<td>
  		[get_reagent_entry(reaction.id, toplevel=1)]
  	  	</td>
  	  	<td><center>[(reaction.result && reaction.result_amount)? reaction.result_amount : "N/A"]</center></td>
  		</tr>
  	"}
  
  /obj/item/weapon/book/manual/chembook/proc/get_reagent_entry(var/id, var/quantity=1, var/toplevel=0)
  	var/datum/chemical_reaction/reaction = reactions[id]
  	//No reaction, we're a base element.
  	if (!reaction)
  		base_case += 1
  		return "<li>[quantity] parts [id_to_name(id)]</li>\n"
  
  	var/reagent_entry = ""
  	if (!toplevel)
  		reagent_entry += "<li>[quantity] parts [id_to_name(id)] - 1 part is made by: </li>\n"
  	var/dependencies_entry = reagent_dependencies[id]
  	if (!dependencies_entry)
  		recursive_case += 1
  		dependencies_entry = "<ul>\n"
  		var/list/dependencies = (reaction.required_reagents + reaction.required_catalysts) - id
  		for(var/reagent in dependencies)
  			dependencies_entry += get_reagent_entry(reagent, dependencies[reagent])
  		dependencies_entry += "</ul>\n"
  	else
  		lookup_case += 1
  	reagent_dependencies[id] = dependencies_entry
  	return reagent_entry + dependencies_entry
  
  /obj/item/weapon/book/manual/chembook/proc/id_to_name(var/id)
  
negative.code: 		//world.log << "Generating reaction [id]"
  		add_reaction(reactions[id])
  	world.log << "TIme taken to add reactions is [world.timeofday - time] deciseconds."
  
  	dat += content
  
  //bar needs love too ~Flavo
  /obj/item/weapon/book/manual/chembook/barman_recipes
  