21 lines
562 B
C#
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;
|
|
}
|
|
}
|