From ec4f68f4df63877282a0507b138a205adb9154f2 Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Mon, 6 Jan 2025 12:50:24 -0500 Subject: [PATCH 1/4] Make non-verbal langs not play speech --- Content.Server/Speech/SpeechNoiseSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Speech/SpeechNoiseSystem.cs b/Content.Server/Speech/SpeechNoiseSystem.cs index 5530f3fe57..7d062b7fcb 100644 --- a/Content.Server/Speech/SpeechNoiseSystem.cs +++ b/Content.Server/Speech/SpeechNoiseSystem.cs @@ -72,7 +72,8 @@ private void OnEntitySpoke(EntityUid uid, SpeechComponent component, EntitySpoke var sound = GetSpeechSound((uid, component), args.Message); component.LastTimeSoundPlayed = currentTime; - _audio.PlayPvs(sound, uid); + if(args.Language.SpeechOverride.RequireSpeech) + _audio.PlayPvs(sound, uid); } } } From 97fa2e567d85ab29cbf9997333254ad6d5622a3b Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Mon, 6 Jan 2025 12:50:24 -0500 Subject: [PATCH 2/4] Make non-verbal langs not play speech --- Content.Server/Speech/SpeechNoiseSystem.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Content.Server/Speech/SpeechNoiseSystem.cs b/Content.Server/Speech/SpeechNoiseSystem.cs index 5530f3fe57..559e379045 100644 --- a/Content.Server/Speech/SpeechNoiseSystem.cs +++ b/Content.Server/Speech/SpeechNoiseSystem.cs @@ -62,6 +62,8 @@ private void OnEntitySpoke(EntityUid uid, SpeechComponent component, EntitySpoke { if (component.SpeechSounds == null) return; + if (!args.Language.SpeechOverride.RequireSpeech) + return; var currentTime = _gameTiming.CurTime; var cooldown = TimeSpan.FromSeconds(component.SoundCooldownTime); From 1941a599a4206a292521faa4b4ffde9517ab59b1 Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Mon, 6 Jan 2025 13:01:10 -0500 Subject: [PATCH 3/4] whoops --- Content.Server/Speech/SpeechNoiseSystem.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Server/Speech/SpeechNoiseSystem.cs b/Content.Server/Speech/SpeechNoiseSystem.cs index d64a01eb60..559e379045 100644 --- a/Content.Server/Speech/SpeechNoiseSystem.cs +++ b/Content.Server/Speech/SpeechNoiseSystem.cs @@ -74,8 +74,7 @@ private void OnEntitySpoke(EntityUid uid, SpeechComponent component, EntitySpoke var sound = GetSpeechSound((uid, component), args.Message); component.LastTimeSoundPlayed = currentTime; - if(args.Language.SpeechOverride.RequireSpeech) - _audio.PlayPvs(sound, uid); + _audio.PlayPvs(sound, uid); } } } From a5b74acce8ed5acc6d7e3eca4e82911baaf852c4 Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Mon, 6 Jan 2025 13:26:27 -0500 Subject: [PATCH 4/4] review --- Content.Server/Speech/SpeechNoiseSystem.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Content.Server/Speech/SpeechNoiseSystem.cs b/Content.Server/Speech/SpeechNoiseSystem.cs index 559e379045..071b156907 100644 --- a/Content.Server/Speech/SpeechNoiseSystem.cs +++ b/Content.Server/Speech/SpeechNoiseSystem.cs @@ -60,9 +60,7 @@ public override void Initialize() private void OnEntitySpoke(EntityUid uid, SpeechComponent component, EntitySpokeEvent args) { - if (component.SpeechSounds == null) - return; - if (!args.Language.SpeechOverride.RequireSpeech) + if (component.SpeechSounds == null || !args.Language.SpeechOverride.RequireSpeech) return; var currentTime = _gameTiming.CurTime;