[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:
@@ -1,9 +1,11 @@
|
||||
using Content.Shared.Humanoid.Markings;
|
||||
using Content.Shared.Humanoid.Prototypes;
|
||||
using Content.Shared.White.TTS;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Humanoid;
|
||||
@@ -71,6 +73,9 @@ public sealed partial class HumanoidAppearanceComponent : Component
|
||||
[DataField, AutoNetworkedField]
|
||||
public Color EyeColor = Color.Brown;
|
||||
|
||||
[DataField("voice", customTypeSerializer: typeof(PrototypeIdSerializer<TTSVoicePrototype>))]
|
||||
public string Voice { get; set; } = SharedHumanoidAppearanceSystem.DefaultVoice;
|
||||
|
||||
/// <summary>
|
||||
/// Hair color of this humanoid. Used to avoid looping through all markings
|
||||
/// </summary>
|
||||
|
||||
@@ -25,6 +25,13 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
||||
|
||||
[ValidatePrototypeId<SpeciesPrototype>]
|
||||
public const string DefaultSpecies = "Human";
|
||||
public const string DefaultVoice = "Eugene";
|
||||
public static readonly Dictionary<Sex, string> DefaultSexVoice = new()
|
||||
{
|
||||
{Sex.Male, "Eugene"},
|
||||
{Sex.Female, "Kseniya"},
|
||||
{Sex.Unsexed, "Xenia"},
|
||||
};
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user