anchor.diff:  /**********************Mining Scanners**********************/
   
   /obj/item/device/mining_scanner
  -	desc = "A scanner that checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations."
  +	desc = "A scanner that checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Wear material scanners for optimal results."
   	name = "manual mining scanner"
   	icon_state = "mining1"
   	item_state = "analyzer"
   	w_class = WEIGHT_CLASS_SMALL
   	flags = CONDUCT
   	slot_flags = SLOT_BELT
  -	var/cooldown = 35
  -	var/current_cooldown = 0
  +	var/cooldown = 0
   	origin_tech = "engineering=1;magnets=1"
   
   /obj/item/device/mining_scanner/attack_self(mob/user)
   	if(!user.client)
   		return
  -	if(current_cooldown <= world.time)
  -		current_cooldown = world.time + cooldown
  -		mineral_scan_pulse(get_turf(user))
  +	if(!cooldown)
  +		cooldown = TRUE
  +		addtimer(CALLBACK(src, .proc/clear_cooldown), 40)
  +		var/list/mobs = list()
  +		mobs |= user
  +		mineral_scan_pulse(mobs, get_turf(user))
  +
  +/obj/item/device/mining_scanner/proc/clear_cooldown()
  +	cooldown = FALSE
   
   
   //Debug item to identify all ore spread quickly
  
positive.code: 	flags = CONDUCT
  	slot_flags = SLOT_BELT
  	var/cooldown = 35
  	var/current_cooldown = 0
  	var/range = 7
  	origin_tech = "engineering=3;magnets=3"
  
  /obj/item/device/t_scanner/adv_mining_scanner/lesser
  	name = "automatic mining scanner"
  	desc = "A scanner that automatically checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations."
  	range = 4
  	cooldown = 50
  
  /obj/item/device/t_scanner/adv_mining_scanner/scan()
  	if(current_cooldown <= world.time)
  		current_cooldown = world.time + cooldown
  		var/turf/t = get_turf(src)
  		mineral_scan_pulse(t, range)
  
  /proc/mineral_scan_pulse(turf/T, range = world.view)
  	var/list/minerals = list()
  	for(var/turf/closed/mineral/M in range(range, T))
  		if(M.scan_state)
  			minerals += M
  	if(LAZYLEN(minerals))
  		for(var/turf/closed/mineral/M in minerals)
  			var/obj/effect/temp_visual/mining_overlay/oldC = locate(/obj/effect/temp_visual/mining_overlay) in M
  			if(oldC)
  				qdel(oldC)
  			var/obj/effect/temp_visual/mining_overlay/C = new /obj/effect/temp_visual/mining_overlay(M)
  			C.icon_state = M.scan_state
  
  /obj/effect/temp_visual/mining_overlay
  	plane = FULLSCREEN_PLANE
  	layer = FLASH_LAYER
  	icon = 'icons/effects/ore_visuals.dmi'
  	appearance_flags = 0 //to avoid having TILE_BOUND in the flags, so that the 480x480 icon states let you see it no matter where you are
  	duration = 35
  	pixel_x = -224
  	pixel_y = -224
  
  /obj/effect/temp_visual/mining_overlay/Initialize()
  	. = ..()
  	animate(src, alpha = 0, time = duration, easing = EASE_IN)
  
  
  /**********************Xeno Warning Sign**********************/
  
negative.code: 	hitsound = 'sound/weapons/bladeslice.ogg'
  	attack_verb = list("smashed", "crushed", "cleaved", "chopped", "pulped")
  	sharpness = IS_SHARP
  	var/charged = 1
  	var/charge_time = 16
  	var/atom/mark = null
  	var/mutable_appearance/marked_underlay
  
  /obj/item/projectile/destabilizer
  	name = "destabilizing force"
  	icon_state = "pulse1"
  	damage = 0 //We're just here to mark people. This is still a melee weapon.
  	damage_type = BRUTE
  	flag = "bomb"
  	range = 6
  	var/obj/item/weapon/twohanded/required/mining_hammer/hammer_synced =  null
  	log_override = TRUE
  
  /obj/item/projectile/destabilizer/on_hit(atom/target, blocked = 0)
  	if(hammer_synced)
  		if(hammer_synced.mark == target)
  			return ..()
  		if(isliving(target))
  			if(hammer_synced.mark && hammer_synced.marked_underlay)
  				hammer_synced.mark.underlays -= hammer_synced.marked_underlay
  				hammer_synced.marked_underlay = null
  			var/mob/living/L = target
  			if(L.mob_size >= MOB_SIZE_LARGE)
  				hammer_synced.mark = L
  				hammer_synced.marked_underlay = mutable_appearance('icons/effects/effects.dmi', "shield2")
  				hammer_synced.marked_underlay.pixel_x = -L.pixel_x
  				hammer_synced.marked_underlay.pixel_y = -L.pixel_y
  				L.underlays += hammer_synced.marked_underlay
  		var/target_turf = get_turf(target)
  		if(ismineralturf(target_turf))
  			var/turf/closed/mineral/M = target_turf
  			new /obj/effect/temp_visual/kinetic_blast(M)
  			M.gets_drilled(firer)
  	..()
  
  /obj/item/weapon/twohanded/required/mining_hammer/afterattack(atom/target, mob/user, proximity_flag)
  	if(!proximity_flag && charged)//Mark a target, or mine a tile.
  		var/turf/proj_turf = get_turf(src)
  		if(!isturf(proj_turf))
  			return
  		var/datum/gas_mixture/environment = proj_turf.return_air()
  		var/pressure = environment.return_pressure()
  		if(pressure > 50)
  			playsound(user, 'sound/weapons/empty.ogg', 100, 1)
  			return
  		var/obj/item/projectile/destabilizer/D = new /obj/item/projectile/destabilizer(user.loc)
  		D.preparePixelProjectile(target,get_turf(target), user)
  		D.hammer_synced = src
  		playsound(user, 'sound/weapons/plasma_cutter.ogg', 100, 1)
  		D.fire()
  		charged = 0
  		icon_state = "mining_hammer1_uncharged"
  		addtimer(CALLBACK(src, .proc/Recharge), charge_time)
  		return
  	if(proximity_flag && target == mark && isliving(target))
  		var/mob/living/L = target
  		new /obj/effect/temp_visual/kinetic_blast(get_turf(L))
  		mark = 0
  		if(L.mob_size >= MOB_SIZE_LARGE)
  			L.underlays -= marked_underlay
  			QDEL_NULL(marked_underlay)
  			var/backstab_dir = get_dir(user, L)
  			var/def_check = L.getarmor(type = "bomb")
  			if((user.dir & backstab_dir) && (L.dir & backstab_dir))
  				L.apply_damage(80, BRUTE, blocked = def_check)
  				playsound(user, 'sound/weapons/Kenetic_accel.ogg', 100, 1) //Seriously who spelled it wrong
  			else
  				L.apply_damage(50, BRUTE, blocked = def_check)
  
  /obj/item/weapon/twohanded/required/mining_hammer/proc/Recharge()
  	if(!charged)
  		charged = 1
  		icon_state = "mining_hammer1"
  		playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
  