From 35ffae12469fd097990ab1e7d8dbd8a957b3565d Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:54:30 +0200 Subject: [PATCH] [MIRROR] Fixed being able to activate BCI actions whilst not conscious (#29317) * Fixed being able to activate BCI actions whilst not conscious (#85544) ## About The Pull Request As the title says ## Why It's Good For The Game Shouldn't be able to activate these whilst unconscious, or stall activation to activate at a convenient time whilst unconsious. ## Changelog :cl: fix: Fixed activating specific BCI actions whilst unconsious /:cl: --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Fixed being able to activate BCI actions whilst not conscious --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> --- code/modules/wiremod/components/bci/hud/target_intercept.dm | 2 +- code/modules/wiremod/components/bci/thought_listener.dm | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/wiremod/components/bci/hud/target_intercept.dm b/code/modules/wiremod/components/bci/hud/target_intercept.dm index bfdaec13122..2ee37e8ff4f 100644 --- a/code/modules/wiremod/components/bci/hud/target_intercept.dm +++ b/code/modules/wiremod/components/bci/hud/target_intercept.dm @@ -39,7 +39,7 @@ return var/mob/living/owner = bci.owner - if(!owner || !istype(owner) || !owner.client) + if(!owner || !istype(owner) || !owner.client || owner.stat >= SOFT_CRIT) return if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_TARGET_INTERCEPT)) diff --git a/code/modules/wiremod/components/bci/thought_listener.dm b/code/modules/wiremod/components/bci/thought_listener.dm index ae6889e2da9..aa788b1a4be 100644 --- a/code/modules/wiremod/components/bci/thought_listener.dm +++ b/code/modules/wiremod/components/bci/thought_listener.dm @@ -48,7 +48,7 @@ var/mob/living/owner = bci.owner - if(!owner || !istype(owner) || !owner.client || (owner.stat >= UNCONSCIOUS)) + if(!owner || !istype(owner) || !owner.client || (owner.stat >= SOFT_CRIT)) failure.set_output(COMPONENT_SIGNAL) return @@ -57,6 +57,8 @@ /obj/item/circuit_component/thought_listener/proc/thought_listen(mob/living/owner) var/message = tgui_input_text(owner, input_desc.value ? input_desc.value : "", input_name.value ? input_name.value : "Thought Listener", "") + if(QDELETED(owner) || owner.stat >= SOFT_CRIT) + return output.set_output(message) trigger_output.set_output(COMPONENT_SIGNAL) ready = TRUE