Replace obsolete EntityWhitelist IsValid usages part 2 (#28506)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Numerics;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
@@ -14,7 +15,7 @@ public sealed class RulesSystem : EntitySystem
|
||||
[Dependency] private readonly AccessReaderSystem _reader = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
public bool IsTrue(EntityUid uid, RulesPrototype rules)
|
||||
{
|
||||
var inRange = new HashSet<Entity<IComponent>>();
|
||||
@@ -158,7 +159,7 @@ public sealed class RulesSystem : EntitySystem
|
||||
|
||||
foreach (var ent in _lookup.GetEntitiesInRange(xform.MapID, worldPos, entity.Range))
|
||||
{
|
||||
if (!entity.Whitelist.IsValid(ent, EntityManager))
|
||||
if (_whitelistSystem.IsWhitelistFail(entity.Whitelist, ent))
|
||||
continue;
|
||||
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user