anchor.diff:  
   /obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp)
   	var/threatcount = 0	//the integer returned
  -
  +	
   	if(obj_flags & EMAGGED)
   		return 10	//if emagged, always return 10.
   
  
positive.code: 
  			//if the target is a human and not in our faction, analyze threat level
  			if(ishuman(C) && !in_faction(C))
  				if(assess_perp(C) >= 4)
  					targets += C
  
  			else if(check_anomalies) //non humans who are not simple animals (xenos etc)
  				if(!in_faction(C))
  					targets += C
  
negative.code: 	var/auth_weapons = 0	//checks if it can shoot people that have a weapon they aren't authorized to have
  	var/stun_all = 0		//if this is active, the turret shoots everything that isn't security or head of staff
  	var/check_anomalies = 1	//checks if it can shoot at unidentified lifeforms (ie xenos)
  	var/shoot_unloyal = 0	//checks if it can shoot people that aren't loyalty implanted and who arent heads
  	var/shoot_cyborgs = 0 // checks if it can shoot people that are cyborgs
  	var/shoot_heads_of_staff = 0 // checks if it can shoot at heads of staff
  	var/attacked = 0		//if set to 1, the turret gets pissed off and shoots at people nearby (unless they have sec access!)
  	
  	var/on = TRUE				//determines if the turret is on
  
  	var/list/faction = list("turret" ) // Same faction mobs will never be shot at, no matter the other settings
  
  	var/datum/effect_system/spark_spread/spark_system	//the spark system, used for generating... sparks?
  
  