From 3d0d55d9c604af73b654f874cf8c7c1e7e1f6bc1 Mon Sep 17 00:00:00 2001 From: ParadoxSpace Date: Fri, 1 May 2020 10:55:32 -0600 Subject: [PATCH] Handcuffs Now Require An Aggressive Grab (#7299) --- code/game/objects/items/weapons/handcuffs.dm | 15 ++++++- code/modules/mob/living/living.dm | 4 +- html/changelogs/paradoxspace-nerfin.yml | 42 ++++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/paradoxspace-nerfin.yml diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 530b1864667..a7851292cef 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -34,8 +34,19 @@ place_handcuffs(user, user) return - //Or just. You know. Don't check for it and place the handcuffs anyways! - place_handcuffs(C, user) + var/can_place + if(istype(user, /mob/living/silicon/robot)) + can_place = TRUE + else + for (var/obj/item/grab/G in C.grabbed_by) + if (G.loc == user && G.state >= GRAB_AGGRESSIVE) + can_place = TRUE + break + + if(can_place) + place_handcuffs(C, user) + else + to_chat(user, "You need to have a firm grip on [C] before you can put \the [src] on!") /obj/item/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user) playsound(src.loc, cuff_sound, 30, 1, -2) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 14991f153d6..991dd49ca22 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -697,7 +697,7 @@ default behaviour is: /mob/living/var/last_resist /mob/living/proc/resist_grab() - if(last_resist + 8 > world.time) + if(last_resist + 10 > world.time) return last_resist = world.time if(stunned > 10) @@ -733,7 +733,7 @@ default behaviour is: else resist_chance = 3 * resist_power resist_msg = span("danger", "[src] has broken free of [G.assailant]'s headlock!") - + if(prob(resist_chance)) visible_message(resist_msg) qdel(G) diff --git a/html/changelogs/paradoxspace-nerfin.yml b/html/changelogs/paradoxspace-nerfin.yml new file mode 100644 index 00000000000..d7e5945b3e2 --- /dev/null +++ b/html/changelogs/paradoxspace-nerfin.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: ParadoxSpace + +# 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: + - rscadd: "Handcuffs now require an aggressive grab to apply." + - tweak: "You can now resist once a second, rather than once every 0.8 seconds."