Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Apr 7, 2024
1 parent ca50ffa commit d44180c
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ public sealed class ChangeTTSCommand : ToolshedCommand
[CommandArgument] Prototype<TTSVoicePrototype> prototype
)
{
if (!EntityManager.TryGetComponent<HumanoidAppearanceComponent>(input, out var humanoidAppearanceComponent))
if (EntityManager.TryGetComponent<HumanoidAppearanceComponent>(input, out var humanoidAppearanceComponent))
{
ctx.ReportError(new NotHumanoidError());
return null;
_appearanceSystem ??= GetSys<HumanoidAppearanceSystem>();

_appearanceSystem.SetTTSVoice(input, prototype.Id, humanoid: humanoidAppearanceComponent);
return input;
}

_appearanceSystem ??= GetSys<HumanoidAppearanceSystem>();
var tts = EnsureComp<TTSComponent>(input);
tts.VoicePrototypeId = prototype.Id;

_appearanceSystem.SetTTSVoice(input, prototype.Id, humanoid: humanoidAppearanceComponent);
return input;
}

Expand Down

0 comments on commit d44180c

Please sign in to comment.