Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Content.Shared/Corvax/TTS/TTSComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared.Humanoid;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

Expand All @@ -15,5 +16,5 @@ public sealed partial class TTSComponent : Component
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("voice", customTypeSerializer: typeof(PrototypeIdSerializer<TTSVoicePrototype>))]
public string? VoicePrototypeId { get; set; } = "Geralt";
public string? VoicePrototypeId { get; set; } = HumanoidProfileSystem.DefaultVoice;
}
6 changes: 2 additions & 4 deletions Content.Shared/Humanoid/HumanoidProfileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ public void ApplyProfileTo(Entity<HumanoidProfileComponent?> ent, HumanoidCharac
ent.Comp.Sex = profile.Sex;
// Corvax-TTS-start
ent.Comp.Voice = profile.Voice;
if (TryComp<TTSComponent>(ent, out var _TTSComponent) && _TTSComponent.VoicePrototypeId == "Taskmaster")
{
_TTSComponent.VoicePrototypeId = profile.Voice;
}
if (TryComp<TTSComponent>(ent, out var tts))
tts.VoicePrototypeId = profile.Voice;
// Corvax-TTS-end
Dirty(ent);

Expand Down
Loading