[feat] TTS
# Conflicts: # Content.Client/Options/UI/Tabs/AudioTab.xaml.cs # Content.Client/Preferences/UI/HumanoidProfileEditor.xaml # Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs # Content.Server/Database/ServerDbBase.cs # Content.Server/Entry/EntryPoint.cs # Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs # Content.Server/IoC/ServerContentIoC.cs # Content.Server/VoiceMask/VoiceMaskSystem.cs # Resources/Prototypes/Entities/Mobs/Species/base.yml
This commit is contained in:
@@ -78,6 +78,12 @@
|
||||
<Control HorizontalExpand="True"/>
|
||||
<OptionButton Name="CPronounsButton" HorizontalAlignment="Right" />
|
||||
</BoxContainer>
|
||||
<!-- TTS -->
|
||||
<BoxContainer HorizontalExpand="True">
|
||||
<Label Text="{Loc 'humanoid-profile-editor-voice-label'}" />
|
||||
<Control HorizontalExpand="True"/>
|
||||
<OptionButton Name="CVoiceButton" HorizontalAlignment="Right" />
|
||||
</BoxContainer>
|
||||
<!-- Show clothing -->
|
||||
<BoxContainer HorizontalExpand="True">
|
||||
<Label Text="{Loc 'humanoid-profile-editor-clothing'}" />
|
||||
|
||||
@@ -69,6 +69,11 @@ namespace Content.Client.Preferences.UI
|
||||
private Button _saveButton => CSaveButton;
|
||||
private OptionButton _sexButton => CSexButton;
|
||||
private OptionButton _genderButton => CPronounsButton;
|
||||
|
||||
//WD-EDIT
|
||||
private OptionButton _voiceButton => CVoiceButton;
|
||||
//WD-EDIT
|
||||
|
||||
private Slider _skinColor => CSkin;
|
||||
private OptionButton _clothingButton => CClothingButton;
|
||||
private OptionButton _backpackButton => CBackpackButton;
|
||||
@@ -172,6 +177,14 @@ namespace Content.Client.Preferences.UI
|
||||
|
||||
#endregion Gender
|
||||
|
||||
//TTS-Start
|
||||
#region Voice
|
||||
|
||||
InitializeVoice();
|
||||
|
||||
#endregion
|
||||
//TTS-End
|
||||
|
||||
#region Species
|
||||
|
||||
_speciesList = prototypeManager.EnumeratePrototypes<SpeciesPrototype>().Where(o => o.RoundStart).ToList();
|
||||
@@ -748,9 +761,18 @@ namespace Content.Client.Preferences.UI
|
||||
}
|
||||
UpdateGenderControls();
|
||||
CMarkings.SetSex(newSex);
|
||||
UpdateTTSVoicesControls(); //WD-EDIT
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
//WD-EDIT
|
||||
private void SetVoice(string newVoice)
|
||||
{
|
||||
Profile = Profile?.WithVoice(newVoice);
|
||||
IsDirty = true;
|
||||
}
|
||||
//WD-EDIT
|
||||
|
||||
private void SetGender(Gender newGender)
|
||||
{
|
||||
Profile = Profile?.WithGender(newGender);
|
||||
@@ -1112,6 +1134,10 @@ namespace Content.Client.Preferences.UI
|
||||
UpdateCMarkingsHair();
|
||||
UpdateCMarkingsFacialHair();
|
||||
|
||||
//WD-EDIT
|
||||
UpdateTTSVoicesControls();
|
||||
//WD-EDIT
|
||||
|
||||
_preferenceUnavailableButton.SelectId((int) Profile.PreferenceUnavailable);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user