From d41fc39fc11a2238b88c3a7ea90811fb54b6d1b7 Mon Sep 17 00:00:00 2001 From: Bizzonium Date: Wed, 23 Aug 2023 22:38:39 +0600 Subject: [PATCH] Fix: move play tts callback creation --- modular_ss220/modules/tts/code/tts_subsystem.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_ss220/modules/tts/code/tts_subsystem.dm b/modular_ss220/modules/tts/code/tts_subsystem.dm index f0562f2d140158..c4da1cf0f8ee42 100644 --- a/modular_ss220/modules/tts/code/tts_subsystem.dm +++ b/modular_ss220/modules/tts/code/tts_subsystem.dm @@ -291,14 +291,14 @@ SUBSYSTEM_DEF(ttsSilero) var/hash = rustg_hash_string(RUSTG_HASH_MD5, lowertext(text)) var/filename = "sound/tts_cache/[seed.name]/[hash]" - var/datum/callback/play_tts_cb = CALLBACK(src, PROC_REF(play_tts), speaker, listener, filename, is_local, effect, preSFX, postSFX) - if(fexists("[filename].ogg")) tts_reused++ tts_rrps_counter++ play_tts(speaker, listener, filename, is_local, effect, preSFX, postSFX) return + var/datum/callback/play_tts_cb = CALLBACK(src, PROC_REF(play_tts), speaker, listener, filename, is_local, effect, preSFX, postSFX) + if(LAZYLEN(tts_queue[filename])) tts_reused++ tts_rrps_counter++