anchor.diff:  	lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
   	righthand_file = 'icons/mob/inhands/items_righthand.dmi'
   
  +	///Is the reverse bear trap active?
   	var/ticking = FALSE
  -	var/time_left = 60 //seconds remaining until pop
  -	var/escape_chance = 0 //chance per "fiddle" to get the trap off your head
  +	///Cooldown for the KILL
  +	COOLDOWN_DECLARE(kill_countdown)
  +	///chance per "fiddle" to get the trap off your head
  +	var/escape_chance = 0
  +	///Is the target struggling?
   	var/struggling = FALSE
   
   	var/time_since_last_beep = 0
  
positive.code: 	ticking = TRUE
  	update_appearance(UPDATE_OVERLAYS)
  	escape_chance = initial(escape_chance) //we keep these vars until re-arm, for tracking purposes
  	time_left = initial(time_left)
  	ADD_TRAIT(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT)
  	soundloop.start()
  	soundloop2.mid_length = initial(soundloop2.mid_length)
  	soundloop2.start()
  	START_PROCESSING(SSprocessing, src)
  
negative.code: /obj/item/reverse_bear_trap/process(delta_time)
  	if(!ticking)
  		return
  	soundloop2.mid_length = max(0.5, COOLDOWN_TIMELEFT(src, kill_countdown) - 5) //beepbeepbeepbeepbeep
  	if (COOLDOWN_FINISHED(src, kill_countdown) || !isliving(loc))
  		trigger()
  
  /obj/item/reverse_bear_trap/proc/trigger()
  	playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, FALSE)
  	soundloop.stop()
  	soundloop2.stop()
  	to_chat(loc, span_userdanger("*ding*"))
  	addtimer(CALLBACK(src, .proc/snap), 0.2 SECONDS)
  	COOLDOWN_RESET(src, kill_countdown) // reset the countdown in case it wasn't finished
  
  /obj/item/reverse_bear_trap/attack_hand(mob/user, list/modifiers)
  	. = ..()
  	if(!iscarbon(user))
  		return
  	var/mob/living/carbon/carbon_user = user
  	if(carbon_user.get_item_by_slot(ITEM_SLOT_HEAD) != src)
  		return
  	if(!HAS_TRAIT_FROM(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT) || struggling)
  		return
  
  	struggling = TRUE
  	var/fear_string
  	switch(COOLDOWN_TIMELEFT(src, kill_countdown))
  		if(0 SECONDS to 5 SECONDS)
  			fear_string = "agonizingly"
  		if(5 SECONDS to 20 SECONDS)
  			fear_string = "desperately"
  		if(20 SECONDS to 40 SECONDS)
  			fear_string = "panickedly"
  		if(40 SECONDS to 50 SECONDS)
  			fear_string = "shakily"
  
  	carbon_user.visible_message(span_danger("[carbon_user] fiddles with and pulls at [src]..."), \
  		span_danger("You[isnull(fear_string) ? "" : " [fear_string]"] try to pull at [src]..."), "<i>You hear clicking and ticking.</i>")
  	if(!do_after(user, 2 SECONDS, target = src))
  		struggling = FALSE
  		return
  	if(!prob(escape_chance))
  		to_chat(user, span_warning("It doesn't budge!"))
  		escape_chance++
  	else
  		user.visible_message(span_warning("The lock on [user]'s [name] pops open!"), \
  		span_userdanger("You force open the padlock!"), "<i>You hear a single, pronounced click!</i>")
  		REMOVE_TRAIT(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT)
  	struggling = FALSE
  
  /obj/item/reverse_bear_trap/attack(mob/living/target, mob/living/user)
  	if(target.get_item_by_slot(ITEM_SLOT_HEAD))
  		to_chat(user, span_warning("Remove [target.p_their()] headgear first!"))
  		return
  	target.visible_message(span_warning("[user] starts forcing [src] onto [target]'s head!"), \
  		span_userdanger("[target] starts forcing [src] onto your head!"), "<i>You hear clanking.</i>")
  	to_chat(user, span_danger("You start forcing [src] onto [target]'s head..."))
  
  	if(!do_after(user, 3 SECONDS, target = target) || target.get_item_by_slot(ITEM_SLOT_HEAD))
  		return
  	target.visible_message(span_warning("[user] forces and locks [src] onto [target]'s head!"), \
  		span_userdanger("[target] locks [src] onto your head!"), "<i>You hear a click, and then a timer ticking down.</i>")
  	to_chat(user, span_danger("You force [src] onto [target]'s head and click the padlock shut."))
  
  	user.dropItemToGround(src)
  	target.equip_to_slot_if_possible(src, ITEM_SLOT_HEAD)
  	arm()
  