diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm index c248fe841b4..8f263ff1571 100644 --- a/code/modules/mob/living/carbon/resist.dm +++ b/code/modules/mob/living/carbon/resist.dm @@ -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( - "\The [src] attempts to remove \the [HC]!", - "You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)" - ) + //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( + "\The [src] attempts to break out of \the [HC]!", + "You attempt to break out of \the [HC]. (This will take around 1 minute and you need to stand still)" + ) + else + visible_message( + "\The [src] attempts to slip out of \the [HC]!", + "You attempt to slip out of \the [HC]. (This will take around [displaytime] minutes and you need to stand still)" + ) if(do_after(src, breakouttime)) - if(!handcuffed || buckled) + if(!handcuffed) return - visible_message( - "\The [src] manages to remove \the [handcuffed]!", - "You successfully remove \the [handcuffed]." - ) + + 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( + "\The [src] manages to remove \the [handcuffed][buckle_message_other]!", + "You successfully remove \the [handcuffed][buckle_message_user][dislocate_message]." + ) + else + visible_message( + "\The [src] manages to slip out of \the [handcuffed][buckle_message_other]!", + "You successfully slip out of \the [handcuffed][buckle_message_user]." + ) 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( - "[usr] attempts to unbuckle themself!", - "You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)" - ) - - if(do_after(usr, 1200)) - if(!buckled) - return - visible_message("[usr] manages to unbuckle themself!", - "You successfully unbuckle yourself.") - buckled.user_unbuckle_mob(src) - + ..() \ No newline at end of file diff --git a/html/changelogs/Arrow768-unbucklecuff.yml b/html/changelogs/Arrow768-unbucklecuff.yml new file mode 100644 index 00000000000..491eebb870e --- /dev/null +++ b/html/changelogs/Arrow768-unbucklecuff.yml @@ -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." \ No newline at end of file