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:
Werner
2019-02-03 14:02:23 +02:00
committed by Erki
parent 778c338e29
commit ebfaa2a181
2 changed files with 88 additions and 29 deletions
+46 -29
View File
@@ -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)
..()
+42
View File
@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Arrow768
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "If you resist while handcuffed and buckled to a chair you unbuckle and uncuff yourself at the same time."
- tweak: "If you are on harm intent while removing your handcuffs, it only takes a minute to remove them but you dislocate your arm in the process."