From 8844c1078bf397d4cc4e7e6c23d8027d08fdcd90 Mon Sep 17 00:00:00 2001 From: tattle <66640614+dragomagol@users.noreply.github.com> Date: Sat, 16 Mar 2024 12:03:27 -0700 Subject: [PATCH] Getting shrunk makes your voice small (#82025) ## About The Pull Request ![image](https://github.com/tgstation/tgstation/assets/66640614/83822a60-1324-45f2-9893-4a1628484d03) ![image](https://github.com/tgstation/tgstation/assets/66640614/9c22a846-d1b7-4b78-b773-cbfc1686528f) ![image](https://github.com/tgstation/tgstation/assets/66640614/84779e0c-02d8-4d0c-bbeb-c5bd176c4b6d) ![image](https://github.com/tgstation/tgstation/assets/66640614/90e76a29-8e8b-4a9e-86c5-3183fe8b60ee) ## Why It's Good For The Game I think it's funny. Plus I like what helium introduced with the small text, and wanted to add it to more places. ## Changelog :cl: Tattle add: Getting shrunk makes you talk small /:cl: --------- Co-authored-by: tattle --- code/__DEFINES/say.dm | 2 +- code/datums/components/shrink.dm | 6 ++++++ code/modules/surgery/organs/internal/lungs/_lungs.dm | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/say.dm b/code/__DEFINES/say.dm index 018d7b26f2b..3a664823cde 100644 --- a/code/__DEFINES/say.dm +++ b/code/__DEFINES/say.dm @@ -75,7 +75,7 @@ #define SPAN_CLOWN "clown" #define SPAN_SINGING "singing" #define SPAN_TAPE_RECORDER "tape_recorder" -#define SPAN_HELIUM "small" +#define SPAN_SMALL_VOICE "small" //bitflag #defines for return value of the radio() proc. /// Makes the message use italics diff --git a/code/datums/components/shrink.dm b/code/datums/components/shrink.dm index 67cd3d39e23..d2615ea2f77 100644 --- a/code/datums/components/shrink.dm +++ b/code/datums/components/shrink.dm @@ -15,6 +15,7 @@ if(isliving(parent_atom)) var/mob/living/L = parent_atom ADD_TRAIT(L, TRAIT_UNDENSE, SHRUNKEN_TRAIT) + RegisterSignal(L, COMSIG_MOB_SAY, PROC_REF(handle_shrunk_speech)) L.add_movespeed_modifier(/datum/movespeed_modifier/shrink_ray) if(iscarbon(L)) var/mob/living/carbon/C = L @@ -30,6 +31,10 @@ span_userdanger("Everything grows bigger!")) QDEL_IN(src, shrink_time) +/datum/component/shrink/proc/handle_shrunk_speech(mob/living/little_guy, list/speech_args) + SIGNAL_HANDLER + speech_args[SPEECH_SPANS] |= SPAN_SMALL_VOICE + /datum/component/shrink/Destroy() var/atom/parent_atom = parent parent_atom.transform = parent_atom.transform.Scale(2,2) @@ -38,6 +43,7 @@ var/mob/living/L = parent_atom L.remove_movespeed_modifier(/datum/movespeed_modifier/shrink_ray) REMOVE_TRAIT(L, TRAIT_UNDENSE, SHRUNKEN_TRAIT) + UnregisterSignal(L, COMSIG_MOB_SAY) if(ishuman(L)) var/mob/living/carbon/human/H = L H.physiology.damage_resistance += 100 diff --git a/code/modules/surgery/organs/internal/lungs/_lungs.dm b/code/modules/surgery/organs/internal/lungs/_lungs.dm index 78afbd9871e..1db1963e8d6 100644 --- a/code/modules/surgery/organs/internal/lungs/_lungs.dm +++ b/code/modules/surgery/organs/internal/lungs/_lungs.dm @@ -444,7 +444,7 @@ /// React to speach while hopped up on the high pitched voice juice /obj/item/organ/internal/lungs/proc/handle_helium_speech(mob/living/carbon/breather, list/speech_args) SIGNAL_HANDLER - speech_args[SPEECH_SPANS] |= SPAN_HELIUM + speech_args[SPEECH_SPANS] |= SPAN_SMALL_VOICE /// Gain hypernob effects if we have enough of the stuff /obj/item/organ/internal/lungs/proc/consume_hypernoblium(mob/living/carbon/breather, datum/gas_mixture/breath, hypernob_pp, old_hypernob_pp)