using Content.Shared.Projectiles; using Content.Shared.Whitelist; namespace Content.Shared._DV.Projectiles; public sealed partial class SharedEmbedImmuneSystem : EntitySystem { [Dependency] private readonly EntityWhitelistSystem _whitelist = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnProjectileReflectAttempt); } private void OnProjectileReflectAttempt(Entity entity, ref ProjectileReflectAttemptEvent args) { if (!TryComp(args.ProjUid, out var embeddable)) return; // If we're blacklisted, bounce the projectile. if (_whitelist.IsWhitelistFail(entity.Comp.ImmuneTo, args.ProjUid)) return; args.Cancelled = true; } }