anchor.diff:  	set waitfor = FALSE
   	to_chat(owner, "<span class='small boldannounce'>run -o -a 'selfdestruct'</span>")
   	sleep(5)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='small boldannounce'>Running executable 'selfdestruct'...</span>")
   	sleep(rand(10, 30))
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	owner.playsound_local(owner, 'sound/misc/bloblarm.ogg', 50, 0)
   	to_chat(owner, "<span class='userdanger'>!!! UNAUTHORIZED SELF-DESTRUCT ACCESS !!!</span>")
   	to_chat(owner, "<span class='boldannounce'>This is a class-3 security violation. This incident will be reported to Central Command.</span>")
   	for(var/i in 1 to 3)
   		sleep(20)
  -		if(!owner || QDELETED(owner))
  +		if(QDELETED(owner) || owner.stat == DEAD)
   			return
   		to_chat(owner, "<span class='boldannounce'>Sending security report to Central Command.....[rand(0, 9) + (rand(20, 30) * i)]%</span>")
   	sleep(3)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='small boldannounce'>auth 'akjv9c88asdf12nb' ******************</span>")
   	owner.playsound_local(owner, 'sound/items/timer.ogg', 50, 0)
   	sleep(30)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='boldnotice'>Credentials accepted. Welcome, akjv9c88asdf12nb.</span>")
   	owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
   	sleep(5)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='boldnotice'>Arm self-destruct device? (Y/N)</span>")
   	owner.playsound_local(owner, 'sound/misc/compiler-stage1.ogg', 50, 0)
   	sleep(20)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='small boldannounce'>Y</span>")
   	sleep(15)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='boldnotice'>Confirm arming of self-destruct device? (Y/N)</span>")
   	owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
   	sleep(10)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='small boldannounce'>Y</span>")
   	sleep(rand(15, 25))
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='boldnotice'>Please repeat password to confirm.</span>")
   	owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
   	sleep(14)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='small boldannounce'>******************</span>")
   	sleep(40)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	to_chat(owner, "<span class='boldnotice'>Credentials accepted. Transmitting arming signal...</span>")
   	owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
   	sleep(30)
  -	if(!owner || QDELETED(owner))
  +	if(QDELETED(owner) || owner.stat == DEAD)
   		return
   	priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", "aimalf")
   	set_security_level("delta")
  
positive.code: 							A.playsound_local(A, AM.unlock_sound, 50, 0)
  					else //Adding uses to an existing module
  						action.uses += initial(action.uses)
  						temp = "Additional use[action.uses > 1 ? "s" : ""] added to [action.name]!"
  			processing_time -= AM.cost
  
  
negative.code: 	var/datum/action/innate/ai/ranged/attached_action
  
  /obj/effect/proc_holder/ranged_ai/Destroy()
  	attached_action = null
  	return ..()
  
  /obj/effect/proc_holder/ranged_ai/proc/toggle(mob/user)
  