From 8675c3e89757367702638920456f0c80391cf2c4 Mon Sep 17 00:00:00 2001 From: Alexsey Bezyuk <41479614+PhantornRU@users.noreply.github.com> Date: Sat, 1 Feb 2025 00:54:32 +1000 Subject: [PATCH] TTS fixes + Megaphone (#24) # About the pull request TTS fixes + Megaphone # Explain why it's good for the game # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: TTS fixes + Megaphone /:cl: ## Summary by Sourcery Reduce stamina, oxygen, and brain damage from speech filter, and add TTS to megaphone broadcasts. New Features: - Added TTS support for megaphone broadcasts. Bug Fixes: - Fixed an issue where the speech filter caused excessive stamina, oxygen, and brain damage. --- code/game/objects/items/devices/megaphone.dm | 1 + modular/text_to_speech/code/hear.dm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index e0227939280e..e12532e7f264 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -49,6 +49,7 @@ if(!ishumansynth_strict(listener) && !isobserver(listener)) listener.show_message("[user] says something on the microphone, but you can't understand it.") continue + user.cast_tts(listener, message, user, TRUE, 4) // SS220 ADD - TTS listener.show_message("[user] broadcasts, [FONT_SIZE_LARGE("\"[message]\"")]", SHOW_MESSAGE_AUDIBLE) // 2 stands for hearable message langchat_long_listeners += listener playsound(loc, 'sound/items/megaphone.ogg', 100, FALSE, TRUE) diff --git a/modular/text_to_speech/code/hear.dm b/modular/text_to_speech/code/hear.dm index 20004ff91ecb..060067dea0da 100644 --- a/modular/text_to_speech/code/hear.dm +++ b/modular/text_to_speech/code/hear.dm @@ -11,7 +11,7 @@ return if(!say_understands(speaker, language)) return - speaker.cast_tts(src, message, src, FALSE, null, null) + speaker.cast_tts(src, message) /mob/hear_radio( message, verb="says",