6
StarHorizon_Public/Content.Server/_Horizon/Bark/VoiceOverrideSystem.Barks.cs
2026-01-18 12:53:36 +03:00

21 lines
562 B
C#

using Content.Server.Speech.Components;
using Content.Shared._Horizon.Bark;
namespace Content.Server.Speech.EntitySystems;
public sealed partial class VoiceOverrideSystem
{
private void InitializeBarks()
{
SubscribeLocalEvent<VoiceOverrideComponent, TransformSpeakerBarkEvent>(OnTransformSpeakerBark);
}
private void OnTransformSpeakerBark(Entity<VoiceOverrideComponent> entity, ref TransformSpeakerBarkEvent args)
{
if (!entity.Comp.Enabled)
return;
args.Data = entity.Comp.Bark ?? args.Data;
}
}