Skip to content

Commit

Permalink
Fixes drawing weapons when knocked down (#6569)
Browse files Browse the repository at this point in the history
# About the pull request
Prevents you from drawing weapons when you are knocked down
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
When you draw a weapon and are knocked down it will simply drop the
weapon since you can't hold it which is pretty annoying.
# 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: Fixes being able to draw weapons when knocked down
/:cl:

Co-authored-by: harryob <[email protected]>
  • Loading branch information
Git-Nivrak and harryob authored Jun 27, 2024
1 parent d303404 commit d4a93ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ DEFINES in setup.dm, referenced here.
/mob/living/carbon/human/verb/holster_verb(unholster_number_offset = 1 as num)
set name = "holster"
set hidden = TRUE
if(usr.is_mob_incapacitated(TRUE) || usr.is_mob_restrained())
if(usr.is_mob_incapacitated(TRUE) || usr.is_mob_restrained() || IsKnockDown() || HAS_TRAIT_FROM(src, TRAIT_UNDENSE, LYING_DOWN_TRAIT))
to_chat(src, SPAN_WARNING("You can't draw a weapon in your current state."))
return

Expand Down

0 comments on commit d4a93ef

Please sign in to comment.