From ffff24d6481572c29d8a911e6ec469d17fa18221 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:40:53 -0700 Subject: [PATCH] stops attempted stripping when stunned etc. (#6810) # About the pull request stops attempted stripping when stunned etc. # Explain why it's good for the game fixes bug # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: stops attempted stripping when stunned etc. /:cl: --------- Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/datums/elements/strippable.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index e0daaee74a8c..d93b07234c9d 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -126,6 +126,14 @@ to_chat(user, SPAN_WARNING("You can't do this right now.")) return FALSE + if (user.is_mob_incapacitated()) + to_chat(user, SPAN_WARNING("You can't do this right now.")) + return FALSE + + if (HAS_TRAIT(user, TRAIT_IMMOBILIZED) || HAS_TRAIT(user, TRAIT_FLOORED)) + to_chat(user, SPAN_WARNING("You can't do this right now.")) + return FALSE + if ((item.flags_inventory & CANTSTRIP) || ((item.flags_item & NODROP) && !(item.flags_item & FORCEDROP_CONDITIONAL)) || (item.flags_item & ITEM_ABSTRACT)) return FALSE