Fix Pacified Damage Dealing Thrown Objects (#31183)

This commit is contained in:
Cojoke
2024-08-19 06:56:40 -05:00
committed by GitHub
parent 055dfe6f0b
commit 6c3dad4330
2 changed files with 11 additions and 9 deletions

View File

@@ -38,7 +38,6 @@ public abstract partial class SharedProjectileSystem : EntitySystem
SubscribeLocalEvent<EmbeddableProjectileComponent, ThrowDoHitEvent>(OnEmbedThrowDoHit);
SubscribeLocalEvent<EmbeddableProjectileComponent, ActivateInWorldEvent>(OnEmbedActivate);
SubscribeLocalEvent<EmbeddableProjectileComponent, RemoveEmbeddedProjectileEvent>(OnEmbedRemove);
SubscribeLocalEvent<EmbeddableProjectileComponent, AttemptPacifiedThrowEvent>(OnAttemptPacifiedThrow);
}
private void OnEmbedActivate(EntityUid uid, EmbeddableProjectileComponent component, ActivateInWorldEvent args)
@@ -154,14 +153,6 @@ public abstract partial class SharedProjectileSystem : EntitySystem
{
public override DoAfterEvent Clone() => this;
}
/// <summary>
/// Prevent players with the Pacified status effect from throwing embeddable projectiles.
/// </summary>
private void OnAttemptPacifiedThrow(Entity<EmbeddableProjectileComponent> ent, ref AttemptPacifiedThrowEvent args)
{
args.Cancel("pacified-cannot-throw-embed");
}
}
[Serializable, NetSerializable]