From 7eb999c92f7bb63fb5e901cffea8cd8e2688f4c0 Mon Sep 17 00:00:00 2001 From: Evgencheg <7064926@gmail.com> Date: Wed, 9 Oct 2024 23:51:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Client/Corvax/TTS/TTSSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Client/Corvax/TTS/TTSSystem.cs b/Content.Client/Corvax/TTS/TTSSystem.cs index 7e6ed6e37e..fe790e2490 100644 --- a/Content.Client/Corvax/TTS/TTSSystem.cs +++ b/Content.Client/Corvax/TTS/TTSSystem.cs @@ -15,6 +15,7 @@ using Content.Shared.Administration; using Content.Shared.Ghost; using System.Linq; +using Content.Shared.Language.Components; using JetBrains.Annotations; @@ -96,7 +97,7 @@ private void OnPlayTTS(PlayTTSEvent ev) { var isadmin = _adminMgr.HasFlag(AdminFlags.Admin) && _entities.TryGetComponent(player, out var ghostcomp); - if ((_language.UnderstoodLanguages.Contains(ev.LanguageProtoId) || isadmin) && ev.LanguageProtoId != "Sign") + if (((_entities.TryGetComponent(player, out var langcomp) && langcomp.UnderstoodLanguages.Contains(ev.LanguageProtoId)) || isadmin) && ev.LanguageProtoId != "Sign") _contentRoot.AddOrUpdateFile(filePath, ev.Data); else return; //временно отключена озвучка языков