anchor.diff:  	fieldlimit = 6
   	quick_burst_mod = 1
   
  -/obj/item/weapon/resonator/proc/CreateResonance(target, creator)
  -	var/turf/T = get_turf(target)
  -	var/obj/effect/resonance/R = locate(/obj/effect/resonance) in T
  -	if(R)
  -		R.resonance_damage *= quick_burst_mod
  -		R.burst()
  -		return
  -	if(fields.len < fieldlimit)
  -		playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
  -		var/obj/effect/resonance/RE = new(T, creator, burst_time, src)
  -		fields += RE
  -
   /obj/item/weapon/resonator/attack_self(mob/user)
   	if(burst_time == 50)
   		burst_time = 30
  
positive.code: 		burst_time = 50
  		to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>")
  
  /obj/item/weapon/resonator/afterattack(atom/target, mob/user, proximity_flag)
  	if(proximity_flag)
  		if(!check_allowed_items(target, 1))
  			return
  		user.changeNext_move(CLICK_CD_MELEE)
  		CreateResonance(target, user)
  
  /obj/effect/resonance
  	name = "resonance field"
  	desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures. More damaging in low pressure environments."
  	icon = 'icons/effects/effects.dmi'
  	icon_state = "shield1"
  	layer = ABOVE_ALL_MOB_LAYER
  	anchored = TRUE
  	mouse_opacity = 0
  	var/resonance_damage = 20
  	var/creator
  	var/obj/item/weapon/resonator/res
  
  /obj/effect/resonance/New(loc, set_creator, timetoburst, set_resonator)
  	..()
  	creator = set_creator
  	res = set_resonator
  	check_pressure()
  	addtimer(CALLBACK(src, .proc/burst), timetoburst)
  
  /obj/effect/resonance/Destroy()
  	if(res)
  		res.fields -= src
  	. = ..()
  
  /obj/effect/resonance/proc/check_pressure()
  	var/turf/proj_turf = get_turf(src)
  	if(!istype(proj_turf))
  		return
  	var/datum/gas_mixture/environment = proj_turf.return_air()
  	var/pressure = environment.return_pressure()
  	if(pressure < 50)
  		name = "strong [initial(name)]"
  		resonance_damage = 60
  	else
  		name = initial(name)
  		resonance_damage = initial(resonance_damage)
  
  /obj/effect/resonance/proc/burst()
  	check_pressure()
  	var/turf/T = get_turf(src)
  	playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
  	if(ismineralturf(T))
  		var/turf/closed/mineral/M = T
  		M.gets_drilled(creator)
  	for(var/mob/living/L in T)
  		if(creator)
  			add_logs(creator, L, "used a resonator field on", "resonator")
  		to_chat(L, "<span class='userdanger'>[src] ruptured with you in it!</span>")
  		L.apply_damage(resonance_damage, BRUTE)
  	qdel(src)
  
  /**********************Facehugger toy**********************/
  
  
negative.code: 	icon = 'icons/obj/mining.dmi'
  	icon_state = "resonator"
  	item_state = "resonator"
  	desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It's more effective in a vacuum."
  	w_class = WEIGHT_CLASS_NORMAL
  	force = 15
  	throwforce = 10
  