From 271a3c42a9c0eb105776c6577a3295ba63de4812 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Thu, 27 Jul 2023 07:19:55 -0400 Subject: [PATCH] Speech problems works for Megaphones now (#4008) # About the pull request Lisping and other speech problems now work for megaphone # Explain why it's good for the game Fixing up oversights of different ways to talk not checking/handling speech problems # Testing Photographs and Procedure ![image](https://github.com/cmss13-devs/cmss13/assets/91219575/9f7a031e-75e8-45fd-8824-a86a821dc7c4) # Changelog :cl: fix: Speech problems such as lisping now applies when using megaphone /:cl: --- code/game/objects/items/devices/megaphone.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 6a01dfdba9da..c6da7d354054 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -28,6 +28,11 @@ var/message = tgui_input_text(user, "Shout a message?", "Megaphone", multiline = TRUE) if(!message) return + // we know user is a human now, so adjust user for this check + var/mob/living/carbon/human/humanoid = user + if(humanoid.speech_problem_flag) + var/list/new_message = humanoid.handle_speech_problems(message) + message = new_message[1] message = capitalize(message) log_admin("[key_name(user)] used a megaphone to say: >[message]<")