Adds sanity checks for stripping.

Mobs can no longer strip other mobs while prone, unconscious, or buckled down. Fixes #10553.
This commit is contained in:
PsiOmegaDelta
2015-08-12 13:12:52 +02:00
parent 8915edcce2
commit 67c79e7a1b
2 changed files with 9 additions and 0 deletions

View File

@@ -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

View File

@@ -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)