mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 04:48:18 +01:00
Tweaked Unbucklecuffing (#6002)
If you are buckled and cuffed to a chair it now takes 60 seconds longer to unbuckle yourself, but you are uncuffed at the same time. If you use harm intent, you can break out of your cuffs in around a minute, but you will dislocate one of our arms in the process.
This commit is contained in:
@@ -79,27 +79,61 @@
|
||||
//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...
|
||||
if(istype(HC))
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
|
||||
if(buckled)
|
||||
breakouttime += 600 //If you are buckled, it takes a minute longer, but you are unbuckled and uncuffed instantly
|
||||
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H) && H.gloves && istype(H.gloves,/obj/item/clothing/gloves/rig))
|
||||
breakouttime /= 2
|
||||
displaytime /= 2
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] attempts to remove \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
)
|
||||
//Check if the user is trying to violently remove the handcuffs
|
||||
var/violent_removal = 0
|
||||
if(a_intent == I_HURT)
|
||||
violent_removal = 1
|
||||
breakouttime = rand(450,600)
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] attempts to break out of \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to break out of \the [HC]. (This will take around 1 minute and you need to stand still)</span>"
|
||||
)
|
||||
else
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] attempts to slip out of \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to slip out of \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime))
|
||||
if(!handcuffed || buckled)
|
||||
if(!handcuffed)
|
||||
return
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] manages to remove \the [handcuffed]!</span>",
|
||||
"<span class='notice'>You successfully remove \the [handcuffed].</span>"
|
||||
)
|
||||
|
||||
var/buckle_message_user = ""
|
||||
var/buckle_message_other = ""
|
||||
if(buckled) //If the person is buckled, also unbuckle the person
|
||||
buckle_message_user = " and unbuckle yourself"
|
||||
buckle_message_other = " and to unbuckle themself"
|
||||
buckled.user_unbuckle_mob(src)
|
||||
|
||||
if(violent_removal)
|
||||
var/obj/item/organ/external/E = H.get_organ(pick("l_arm","r_arm"))
|
||||
var/dislocate_message = ""
|
||||
if(E && !E.is_dislocated())
|
||||
E.dislocate(1)
|
||||
dislocate_message = ", but dislocate your [E] in the process"
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] manages to remove \the [handcuffed][buckle_message_other]!</span>",
|
||||
"<span class='notice'>You successfully remove \the [handcuffed][buckle_message_user][dislocate_message].</span>"
|
||||
)
|
||||
else
|
||||
visible_message(
|
||||
"<span class='notice'>\The [src] manages to slip out of \the [handcuffed][buckle_message_other]!</span>",
|
||||
"<span class='notice'>You successfully slip out of \the [handcuffed][buckle_message_user].</span>"
|
||||
)
|
||||
drop_from_inventory(handcuffed)
|
||||
|
||||
|
||||
/mob/living/carbon/proc/escape_legcuffs()
|
||||
if(!canClick())
|
||||
return
|
||||
@@ -198,23 +232,6 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/escape_buckle()
|
||||
|
||||
if(!buckled) return
|
||||
|
||||
/mob/living/carbon/human/escape_buckle()
|
||||
if(!restrained())
|
||||
..()
|
||||
else
|
||||
setClickCooldown(100)
|
||||
visible_message(
|
||||
"<span class='danger'>[usr] attempts to unbuckle themself!</span>",
|
||||
"<span class='warning'>You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(usr, 1200))
|
||||
if(!buckled)
|
||||
return
|
||||
visible_message("<span class='danger'>[usr] manages to unbuckle themself!</span>",
|
||||
"<span class='notice'>You successfully unbuckle yourself.</span>")
|
||||
buckled.user_unbuckle_mob(src)
|
||||
|
||||
..()
|
||||
Reference in New Issue
Block a user