From d75016da972b439bf8c1fcb5a78bcd9307ef8b86 Mon Sep 17 00:00:00 2001 From: HitPanda <104197232+EnefFlow@users.noreply.github.com> Date: Sat, 2 Sep 2023 16:00:02 +0300 Subject: [PATCH] [Feat] Sponsor any sex voices (#358) --- Content.Client/White/TTS/HumanoidProfileEditor.TTS.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Client/White/TTS/HumanoidProfileEditor.TTS.cs b/Content.Client/White/TTS/HumanoidProfileEditor.TTS.cs index 5eccc73962..00baa33a00 100644 --- a/Content.Client/White/TTS/HumanoidProfileEditor.TTS.cs +++ b/Content.Client/White/TTS/HumanoidProfileEditor.TTS.cs @@ -20,6 +20,8 @@ public sealed partial class HumanoidProfileEditor "Врача! Позовите врача!" }; + private const string AnySexVoiceProto = "SponsorAnySexVoices"; + private void InitializeVoice() { _ttsMgr = IoCManager.Resolve(); @@ -50,7 +52,11 @@ public sealed partial class HumanoidProfileEditor { var voice = _voiceList[i]; if (!HumanoidCharacterProfile.CanHaveVoice(voice, Profile.Sex)) - continue; + { + if (!sponsorsManager.TryGetInfo(out var sponsorInfo) + || !sponsorInfo.AllowedMarkings.Contains(AnySexVoiceProto)) + continue; + } var name = Loc.GetString(voice.Name); _voiceButton.AddItem(name, i);