Skip to content

Commit

Permalink
stops attempted stripping when stunned etc. (#6810)
Browse files Browse the repository at this point in the history
# About the pull request

stops attempted stripping when stunned etc.

# Explain why it's good for the game

fixes bug


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: stops attempted stripping when stunned etc.
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
zzzmike and Drulikar committed Jul 29, 2024
1 parent 4f9ea4e commit ffff24d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ffff24d

Please sign in to comment.