Deprecate a bunch of IActionBlocker (#4852)

* Deprecate IActionBlocker ChangeDirectionAttempt

* Woops

* Throw and interact

* Deperacte speech

* ActionBlocker in fucking shambles

* CanEmote go byebye

* CanAttack is GONE

* IActionBlocker finally ded

* DRY
This commit is contained in:
metalgearsloth
2021-10-21 13:03:14 +11:00
committed by GitHub
parent 339982d05b
commit 7beb363285
20 changed files with 196 additions and 437 deletions

View File

@@ -8,15 +8,13 @@ namespace Content.Shared.Speech
{
base.Initialize();
SubscribeLocalEvent<SpeakAttemptEvent>(OnSpeakAttempt);
SubscribeLocalEvent<SharedSpeechComponent, SpeakAttemptEvent>(OnSpeakAttempt);
}
private void OnSpeakAttempt(SpeakAttemptEvent ev)
private void OnSpeakAttempt(EntityUid uid, SharedSpeechComponent component, SpeakAttemptEvent args)
{
if (!ev.Entity.HasComponent<SharedSpeechComponent>())
{
ev.Cancel();
}
if (!component.Enabled)
args.Cancel();
}
}
}