anchor.diff:  	value = param_value
   
   /datum/feedback_variable/proc/inc(var/num = 1)
  -	if(isnum(value))
  +	if (isnum(value))
   		value += num
   	else
   		value = text2num(value)
  -		if(isnum(value))
  +		if (isnum(value))
   			value += num
   		else
   			value = num
   
   /datum/feedback_variable/proc/dec(var/num = 1)
  -	if(isnum(value))
  +	if (isnum(value))
   		value -= num
   	else
   		value = text2num(value)
  -		if(isnum(value))
  +		if (isnum(value))
   			value -= num
   		else
   			value = -num
   
   /datum/feedback_variable/proc/set_value(var/num)
  -	if(isnum(num))
  +	if (isnum(num))
   		value = num
   
   /datum/feedback_variable/proc/get_value()
  
positive.code: 	..()
  
  /obj/machinery/blackbox_recorder/proc/find_feedback_datum(var/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
  
negative.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++
  
  	var/sqlrowlist = ""
  
  
  	for (var/datum/feedback_variable/FV in feedback)
  		if (sqlrowlist != "")
  			sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
  
  		sqlrowlist += "(null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
  
  	if (sqlrowlist == "")
  		return
  
  	var/DBQuery/query_insert = dbcon.NewQuery("INSERT DELAYED IGNORE INTO [format_table_name("feedback")] VALUES " + sqlrowlist)
  	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)