Jump to content

A timer on uncuffing/unbuckling.


Killerhurtz

Recommended Posts

I don't care so much about knowing how long it will take, as much as knowing that the action hasn't bugged and stopped at random like it tends to do. Seeing a bar steadily lower would help with not having to spam resist every 30 seconds in the hopes you're actually uncuffing yourself and not just standing around like an idiot.

Link to comment

	//breaking out of handcuffs
else if(iscarbon(L))
	var/mob/living/carbon/CM = L
	if(CM.on_fire && CM.canmove)
		CM.fire_stacks -= 5
		CM.weakened = 5
		CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
			"<span class='notice'>You stop, drop, and roll!</span>")
		if(fire_stacks <= 0)
			CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
			"<span class='notice'>You extinguish yourself.</span>")
			ExtinguishMob()
		return
	if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
		CM.AllowedToClickAgainAfter(CLICK_CD_BREAKOUT)
		CM.last_special = world.time + 100

		var/can_break_cuffs
		if(HULK in usr.mutations)
			can_break_cuffs = 1
		else if(istype(CM,/mob/living/carbon/human))
			var/mob/living/carbon/human/H = CM
			if(H.species.can_shred(H))
				can_break_cuffs = 1

		if(can_break_cuffs) //Don't want to do a lot of logic gating here.
			usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
			for(var/mob/O in viewers(CM))
				O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
			spawn(0)
				if(do_after(CM, 50))
					if(!CM.handcuffed || CM.buckled)
						return
					for(var/mob/O in viewers(CM))
						O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
					CM << "\red You successfully break your handcuffs."
					CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
					del(CM.handcuffed)
					CM.handcuffed = null
					CM.update_inv_handcuffed()
		else
			var/obj/item/weapon/handcuffs/HC = CM.handcuffed
			var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
			var/displaytime = 2 //Minutes to display in the "this will take X minutes."
			if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
				breakouttime = HC.breakouttime
				displaytime = breakouttime / 600 //Minutes
			CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
			for(var/mob/O in viewers(CM))
				O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
			spawn(0)
				if(do_after(CM, breakouttime))
					if(!CM.handcuffed || CM.buckled)
						return // time leniency for lag which also might make this whole thing pointless but the server
					for(var/mob/O in viewers(CM))//                                         lags so hard that 40s isn't lenient enough - Quarxink
						O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
					CM << "\blue You successfully remove \the [CM.handcuffed]."
					CM.drop_from_inventory(CM.handcuffed)

	else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
		CM.AllowedToClickAgainAfter(CLICK_CD_BREAKOUT)
		CM.last_special = world.time + 100

		var/can_break_cuffs
		if(HULK in usr.mutations)
			can_break_cuffs = 1
		else if(istype(CM,/mob/living/carbon/human))
			var/mob/living/carbon/human/H = CM
			if(H.species.can_shred(H))
				can_break_cuffs = 1

		if(can_break_cuffs) //Don't want to do a lot of logic gating here.
			usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
			for(var/mob/O in viewers(CM))
				O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
			spawn(0)
				if(do_after(CM, 50))
					if(!CM.legcuffed || CM.buckled)
						return
					for(var/mob/O in viewers(CM))
						O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
					CM << "\red You successfully break your legcuffs."
					CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
					del(CM.legcuffed)
					CM.legcuffed = null
					CM.update_inv_legcuffed()
		else
			var/obj/item/weapon/legcuffs/HC = CM.legcuffed
			var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
			var/displaytime = 2 //Minutes to display in the "this will take X minutes."
			if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
				breakouttime = HC.breakouttime
				displaytime = breakouttime / 600 //Minutes
			CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
			for(var/mob/O in viewers(CM))
				O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
			spawn(0)
				if(do_after(CM, breakouttime))
					if(!CM.legcuffed || CM.buckled)
						return // time leniency for lag which also might make this whole thing pointless but the server
					for(var/mob/O in viewers(CM))//                                         lags so hard that 40s isn't lenient enough - Quarxink
						O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
					CM << "\blue You successfully remove \the [CM.legcuffed]."
					CM.drop_from_inventory(CM.legcuffed)
					CM.legcuffed = null
					CM.update_inv_legcuffed()

 

nope, nothing I can see from here.


if you get sneezed on in any way while attempting to break cuffs, you merely encounter the reset meme and have to start over again.

Link to comment
if you get sneezed on in any way while attempting to break cuffs, you merely encounter the reset meme and have to start over again.

In my days of SS13 I've learned you shouldn't touch your keyboard whatsoever when trying to uncuff/unbuckle. Even just talking is risky.

Link to comment

What about that whole timer thing for CPR? You know, you attempt it then it pops up with:


"Keep doing this stuff for like 7 seconds then RP crying your heart out that you failed." Or some such closeness. Copy paste into the attempt to resist? I mean, then we can at least tell when its totally failed. Saying, "It will take about 2 minutes." Is a bit hard to judge so.. just that.

Link to comment
I am like, 90% sure there's a failure chance in the code, Carver. Not a bug, but a design thing which can be bypassed by spamming it.

There's not. And if there were a chance to fail without any notification, no timer, and a two minute delay? Yikes.


Anyways, it'd be easy to chuck it up there on the status bar along with the station time and all that other information.

Link to comment
×
×
  • Create New...