[Feat] Sponsor any sex voices (#358)
This commit is contained in:
@@ -20,6 +20,8 @@ public sealed partial class HumanoidProfileEditor
|
|||||||
"Врача! Позовите врача!"
|
"Врача! Позовите врача!"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private const string AnySexVoiceProto = "SponsorAnySexVoices";
|
||||||
|
|
||||||
private void InitializeVoice()
|
private void InitializeVoice()
|
||||||
{
|
{
|
||||||
_ttsMgr = IoCManager.Resolve<TTSManager>();
|
_ttsMgr = IoCManager.Resolve<TTSManager>();
|
||||||
@@ -50,7 +52,11 @@ public sealed partial class HumanoidProfileEditor
|
|||||||
{
|
{
|
||||||
var voice = _voiceList[i];
|
var voice = _voiceList[i];
|
||||||
if (!HumanoidCharacterProfile.CanHaveVoice(voice, Profile.Sex))
|
if (!HumanoidCharacterProfile.CanHaveVoice(voice, Profile.Sex))
|
||||||
continue;
|
{
|
||||||
|
if (!sponsorsManager.TryGetInfo(out var sponsorInfo)
|
||||||
|
|| !sponsorInfo.AllowedMarkings.Contains(AnySexVoiceProto))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var name = Loc.GetString(voice.Name);
|
var name = Loc.GetString(voice.Name);
|
||||||
_voiceButton.AddItem(name, i);
|
_voiceButton.AddItem(name, i);
|
||||||
|
|||||||
Reference in New Issue
Block a user