Glorfcode (force say on damage/stun/crit) (#20562)

This commit is contained in:
Kara
2023-09-28 18:05:36 -07:00
committed by GitHub
parent 6c8e79adfa
commit 80f36ea6d4
10 changed files with 321 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Actions;
using Content.Shared.Bed.Sleep;
using Content.Shared.Damage.ForceSay;
using Content.Shared.Eye.Blinding.Systems;
using Content.Shared.Speech;
using Robust.Shared.Network;
@@ -54,6 +55,13 @@ namespace Content.Server.Bed.Sleep
private void OnSpeakAttempt(EntityUid uid, SleepingComponent component, SpeakAttemptEvent args)
{
// TODO reduce duplication of this behavior with MobStateSystem somehow
if (HasComp<AllowNextCritSpeechComponent>(uid))
{
RemCompDeferred<AllowNextCritSpeechComponent>(uid);
return;
}
args.Cancel();
}