anchor.diff:  	..()
   
   /obj/machinery/blackbox_recorder/proc/find_feedback_datum(var/variable)
  -	for(var/datum/feedback_variable/FV in feedback)
  -		if(FV.get_variable() == variable)
  +	for (var/datum/feedback_variable/FV in feedback)
  +		if (FV.get_variable() == variable)
   			return FV
   	var/datum/feedback_variable/FV = new(variable)
   	feedback += FV
  
positive.code: 
  //This proc is only to be called at round end.
  /obj/machinery/blackbox_recorder/proc/save_all_data_to_sql()
  	if(!feedback) return
  
  	round_end_data_gathering() //round_end time logging and some other data processing
  	establish_db_connection()
  	if(!dbcon.IsConnected()) return
  	var/round_id
  
  	var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
  	query.Execute()
  	while(query.NextRow())
  		round_id = query.item[1]
  
  	if(!isnum(round_id))
  		round_id = text2num(round_id)
  	round_id++
  
  	for(var/datum/feedback_variable/FV in feedback)
  		var/sql = "INSERT INTO [format_table_name("feedback")] VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
  		var/DBQuery/query_insert = dbcon.NewQuery(sql)
  		query_insert.Execute()
  
  
  proc/feedback_set(var/variable,var/value)
  	if(!blackbox) return
  
  	variable = sanitizeSQL(variable)
  
  	var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
  
  	if(!FV) return
  
  	FV.set_value(value)
  
  proc/feedback_inc(var/variable,var/value)
  	if(!blackbox) return
  
  	variable = sanitizeSQL(variable)
  
  	var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
  
  	if(!FV) return
  
  	FV.inc(value)
  
  proc/feedback_dec(var/variable,var/value)
  	if(!blackbox) return
  
  	variable = sanitizeSQL(variable)
  
  	var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
  
  	if(!FV) return
  
  	FV.dec(value)
  
  proc/feedback_set_details(var/variable,var/details)
  	if(!blackbox) return
  
  	variable = sanitizeSQL(variable)
  	details = sanitizeSQL(details)
  
  	var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
  
  	if(!FV) return
  
  	FV.set_details(details)
  
  proc/feedback_add_details(var/variable,var/details)
  	if(!blackbox) return
  
  	variable = sanitizeSQL(variable)
  	details = sanitizeSQL(details)
  
  	var/datum/feedback_variable/FV = blackbox.find_feedback_datum(variable)
  
  	if(!FV) return
  
  	FV.add_details(details)
negative.code: 
  	//Only one can exsist in the world!
  /obj/machinery/blackbox_recorder/New()
  	if (blackbox)
  		if (istype(blackbox,/obj/machinery/blackbox_recorder))
  			qdel(src)
  	blackbox = src
  
  /obj/machinery/blackbox_recorder/Destroy()
  	var/turf/T = locate(1,1,2)
  	if (T)
  		blackbox = null
  		var/obj/machinery/blackbox_recorder/BR = new/obj/machinery/blackbox_recorder(T)
  		BR.msg_common = msg_common
  