mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
18 lines
467 B
C#
18 lines
467 B
C#
namespace Content.Shared.Speech
|
|
{
|
|
public sealed class SpeechSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<SpeakAttemptEvent>(OnSpeakAttempt);
|
|
}
|
|
|
|
private void OnSpeakAttempt(SpeakAttemptEvent args)
|
|
{
|
|
if (!TryComp(args.Uid, out SharedSpeechComponent? speech) || !speech.Enabled)
|
|
args.Cancel();
|
|
}
|
|
}
|
|
}
|