From 04e6cde8778bf73863d189fac32ffce6ffca2298 Mon Sep 17 00:00:00 2001 From: Meghan-Rossi <56671765+Meghan-Rossi@users.noreply.github.com> Date: Sun, 20 Sep 2020 12:15:20 +0100 Subject: [PATCH] Fix trying to put people on themselves with the stripping menu (#7659) *If you try to put someone in one of their own slots using the stripping menu, now you will instead try to strip that slot. This always seems to be what people trying this actually mean to do, I've made this mistake and seen a few others make it too. This also fixes buggy behavior downstream where people can actually succeed in putting people on themselves. --- code/modules/mob/living/carbon/human/stripping.dm | 14 +++++++++++--- html/changelogs/Meghan Rossi - stripping.yml | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/Meghan Rossi - stripping.yml diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 8a8442a982..9f926272be 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -58,14 +58,22 @@ var/stripping var/obj/item/held = user.get_active_hand() if(!istype(held) || is_robot_module(held)) + stripping = TRUE + else + var/obj/item/weapon/holder/holder = held + if(istype(holder) && src == holder.held_mob) + stripping = TRUE + else + var/obj/item/weapon/grab/grab = held + if(istype(grab) && grab.affecting == src) + stripping = TRUE + + if(stripping) if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here? return if(!target_slot.canremove) to_chat(user, "You cannot remove \the [src]'s [target_slot.name].") return - stripping = 1 - - if(stripping) visible_message("\The [user] is trying to remove \the [src]'s [target_slot.name]!") else if(slot_to_strip == slot_wear_mask && istype(held, /obj/item/weapon/grenade)) diff --git a/html/changelogs/Meghan Rossi - stripping.yml b/html/changelogs/Meghan Rossi - stripping.yml new file mode 100644 index 0000000000..25a4e95bec --- /dev/null +++ b/html/changelogs/Meghan Rossi - stripping.yml @@ -0,0 +1,4 @@ +author: Meghan-Rossi +delete-after: True +changes: + - tweak: "If you try to put someone in one of their own slots using the stripping menu, now you will instead try to strip that slot." \ No newline at end of file