2021-06-19 10:03:24 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Speech
|
|
|
|
|
|
{
|
|
|
|
|
|
public class SpeechSystem : EntitySystem
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
2021-10-21 13:03:14 +11:00
|
|
|
|
SubscribeLocalEvent<SharedSpeechComponent, SpeakAttemptEvent>(OnSpeakAttempt);
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-10-21 13:03:14 +11:00
|
|
|
|
private void OnSpeakAttempt(EntityUid uid, SharedSpeechComponent component, SpeakAttemptEvent args)
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2021-10-21 13:03:14 +11:00
|
|
|
|
if (!component.Enabled)
|
|
|
|
|
|
args.Cancel();
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|