From 67c79e7a1b603ba4188901f4fe370f44ad8bc385 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 12 Aug 2015 13:12:52 +0200 Subject: [PATCH] Adds sanity checks for stripping. Mobs can no longer strip other mobs while prone, unconscious, or buckled down. Fixes #10553. --- code/modules/mob/living/carbon/human/human.dm | 4 ++++ code/modules/mob/living/carbon/human/stripping.dm | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e6b07445384..478ac312e65 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -224,6 +224,10 @@ /mob/living/carbon/human/show_inv(mob/user as mob) + // TODO : Change to incapacitated() on merge. + if(user.stat || user.lying || user.resting || user.buckled) + return + var/obj/item/clothing/under/suit = null if (istype(w_uniform, /obj/item/clothing/under)) suit = w_uniform diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 8eaef158611..aa08a0efd5a 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -3,6 +3,11 @@ if(!slot_to_strip || !istype(user)) return + // TODO : Change to incapacitated() on merge. + if(user.stat || user.lying || user.resting || user.buckled) + user << browse(null, text("window=mob[src.name]")) + return + var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip)) switch(slot_to_strip)