Skip to content

Commit

Permalink
TTS fixes + Megaphone (#24)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->

# About the pull request
TTS fixes + Megaphone
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding, and may discourage maintainers from reviewing or merging
your PR. This section is not strictly required for (non-controversial)
fix PRs or backend PRs. -->


# Testing Photographs and Procedure
<!-- Include any screenshots/videos/debugging steps of the modified code
functioning successfully, ideally including edge cases. -->

<!-- !! If you are modifying sprites, you **must** include one or more
in-game screenshots or videos of the new sprites. !! -->

<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
label your changes in the changelog. Please note that maintainers freely
reserve the right to remove and add tags should they deem it
appropriate. You can attempt to finagle the system all you want, but
it's best to shoot for clear communication right off the bat. -->
<!-- If you add a name after the ':cl', that name will be used in the
changelog. You must add your CKEY after the CL if your GitHub name
doesn't match. Maintainers freely reserve the right to remove and add
tags should they deem it appropriate. -->

:cl:
fix: TTS fixes + Megaphone
/:cl:

<!-- Both :cl:'s are required for the changelog to work! -->

## 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.
  • Loading branch information
PhantornRU authored Jan 31, 2025
1 parent a84d249 commit 8675c3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/game/objects/items/devices/megaphone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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("<B>[user]</B> 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)
Expand Down
2 changes: 1 addition & 1 deletion modular/text_to_speech/code/hear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8675c3e

Please sign in to comment.