anchor.diff:  
   #define POPUP_ANIM_TIME 5
   #define POPDOWN_ANIM_TIME 5 //Be sure to change the icon animation at the same time or it'll look bad
  +
  +#define TURRET_FLAG_SHOOT_ALL_REACT		(1<<0)	// The turret gets pissed off and shoots at people nearby (unless they have sec access!)
  +#define TURRET_FLAG_AUTH_WEAPONS		(1<<1)	// Checks if it can shoot people that have a weapon they aren't authorized to have
  +#define TURRET_FLAG_SHOOT_CRIMINALS		(1<<2)	// Checks if it can shoot people that are wanted
  +#define TURRET_FLAG_SHOOT_ALL 			(1<<3)  // The turret gets pissed off and shoots at people nearby (unless they have sec access!)
  +#define TURRET_FLAG_SHOOT_ANOMALOUS 	(1<<4)  // Checks if it can shoot at unidentified lifeforms (ie xenos)
  +#define TURRET_FLAG_SHOOT_UNSHIELDED	(1<<5)	// Checks if it can shoot people that aren't mindshielded and who arent heads
  +#define TURRET_FLAG_SHOOT_BORGS			(1<<6)	// checks if it can shoot cyborgs
  +#define TURRET_FLAG_SHOOT_HEADS			(1<<7)	// checks if it can shoot at heads of staff
   
   /obj/machinery/porta_turret
   	name = "turret"
  
positive.code: 	if(on)
  		//if the turret is on, the EMP no matter how severe disables the turret for a while
  		//and scrambles its settings, with a slight chance of having an emag effect
  		check_records = pick(0, 1)
  		criminals = pick(0, 1)
  		auth_weapons = pick(0, 1)
  		stun_all = pick(0, 0, 0, 0, 1)	//stun_all is a pretty big deal, so it's least likely to get turned on
  
  		on = FALSE
  		remove_control()
  
negative.code: 			if(ishuman(C) && !in_faction(C))
  
  				if(assess_perp(C) >= 4)
  					targets += C
  			else if(turret_flags & TURRET_FLAG_SHOOT_ANOMALOUS) //non humans who are not simple animals (xenos etc)
  				if(!in_faction(C))
  					targets += C
  	for(var/A in GLOB.mechas_list)
  