From d4a93eff3aea809084f02c949e231e8bdcea18b7 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:06:56 +0300 Subject: [PATCH] Fixes drawing weapons when knocked down (#6569) # About the pull request Prevents you from drawing weapons when you are knocked down # 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
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: Fixes being able to draw weapons when knocked down /:cl: Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> --- code/modules/projectiles/gun_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index c4cce7c5f996..9fe8c1ee46be 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -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