Replace obsolete EntityWhitelist IsValid usages part 2 (#28506)
This commit is contained in:
@@ -8,6 +8,7 @@ using Content.Shared.Mobs;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Sound.Components;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Whitelist;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
@@ -34,6 +35,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
|
||||
[Dependency] private readonly SharedAmbientSoundSystem _ambient = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
|
||||
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -123,7 +125,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
|
||||
|
||||
private void OnEmitSoundOnInteractUsing(Entity<EmitSoundOnInteractUsingComponent> ent, ref InteractUsingEvent args)
|
||||
{
|
||||
if (ent.Comp.Whitelist.IsValid(args.Used, EntityManager))
|
||||
if (_whitelistSystem.IsWhitelistPass(ent.Comp.Whitelist, args.Used))
|
||||
{
|
||||
TryEmitSound(ent, ent.Comp, args.User);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user