Refactored the TTS subsystem to more properly handle message garbling. Added a volume preference for TTS. (#75559)

TTS subsystem refactor.
---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
Watermelon914
2023-05-22 13:29:20 +00:00
committed by GitHub
co-authored by Watermelon914 Iamgoofball Kyle Spier-Swenson
parent d8dbd35a25
commit 569d8f5a72
14 changed files with 463 additions and 146 deletions
+3 -2
View File
@@ -36,9 +36,9 @@
/obj/item/assembly/voice/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list(), message_range)
. = ..()
if(message_mods[WHISPER_MODE]) //Too quiet lad
return
return FALSE
if(speaker == src)
return
return FALSE
// raw_message can contain multiple spaces between words etc which are not seen in chat due to HTML rendering
// this means if the teller records a message with e.g. double spaces or tabs, other people will not be able to trigger the sensor since they don't know how to perform the same combination
@@ -49,6 +49,7 @@
else
if(check_activation(speaker, raw_message))
send_pulse()
return TRUE
/obj/item/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message, datum/language/message_language)
switch(mode)