Pacifism rework (#23037)

* Pacifism rework

* grammar
This commit is contained in:
Kara
2023-12-27 02:55:48 -07:00
committed by GitHub
parent 0366d27586
commit faca1d7043
12 changed files with 223 additions and 51 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.Bed.Sleep;
using Content.Shared.CombatMode.Pacification;
using Content.Shared.Damage.ForceSay;
using Content.Shared.Emoting;
using Content.Shared.Hands;
@@ -39,6 +40,7 @@ public partial class MobStateSystem
SubscribeLocalEvent<MobStateComponent, StandAttemptEvent>(CheckAct);
SubscribeLocalEvent<MobStateComponent, TryingToSleepEvent>(OnSleepAttempt);
SubscribeLocalEvent<MobStateComponent, CombatModeShouldHandInteractEvent>(OnCombatModeShouldHandInteract);
SubscribeLocalEvent<MobStateComponent, AttemptPacifiedAttackEvent>(OnAttemptPacifiedAttack);
}
private void OnStateExitSubscribers(EntityUid target, MobStateComponent component, MobState state)
@@ -166,5 +168,10 @@ public partial class MobStateSystem
args.Cancelled = true;
}
private void OnAttemptPacifiedAttack(Entity<MobStateComponent> ent, ref AttemptPacifiedAttackEvent args)
{
args.Cancelled = true;
}
#endregion
}