From 45d9e99225aa695a070a34cedde32b8f117d0799 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:30:05 -0500 Subject: [PATCH] [MIRROR] TRAIT_DEAF now works on non-carbon mobs (#1165) * TRAIT_DEAF now works on non-carbon mobs (#81624) ## About The Pull Request This PR makes it so that the `can_hear` proc will return `FALSE` if the proc is called on a non-carbon that has the deaf trait. ## Why It's Good For The Game This makes it so that non-carbon mobs can have the TRAIT_DEAF added to them and it will now work. There isn't anything that would currently utilize this on here. But, I do have a project downstream where TRAIT_DEAF is added to a non-carbon mob. ## Changelog :cl: code: TRAIT_DEAF now works on non-carbon mobs /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> * TRAIT_DEAF now works on non-carbon mobs --------- Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/modules/mob/mob_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 8c6ebe11496..d2b8ce0f3c3 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -391,7 +391,7 @@ ///Can the mob hear /mob/proc/can_hear() - . = TRUE + return !HAS_TRAIT(src, TRAIT_DEAF) /** * Examine text for traits shared by multiple types.