Replace obsolete EntityWhitelist IsValid usages (#28465)
* Replace obsolete whitelist is valid with whitelist system * Consistency * Fix logic * Bork * I figured out how to get whitelists on the client lol * test fail * woops * HELP ME FUNCTIONS * Fix errors * simplify --------- Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.DragDrop;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Events;
|
||||
@@ -25,6 +26,7 @@ public abstract class SharedDisposalUnitSystem : EntitySystem
|
||||
[Dependency] protected readonly IGameTiming GameTiming = default!;
|
||||
[Dependency] protected readonly MetaDataSystem Metadata = default!;
|
||||
[Dependency] protected readonly SharedJointSystem Joints = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
protected static TimeSpan ExitAttemptDelay = TimeSpan.FromSeconds(0.5);
|
||||
|
||||
@@ -113,10 +115,8 @@ public abstract class SharedDisposalUnitSystem : EntitySystem
|
||||
if (!storable && !HasComp<BodyComponent>(entity))
|
||||
return false;
|
||||
|
||||
if (component.Blacklist?.IsValid(entity, EntityManager) == true)
|
||||
return false;
|
||||
|
||||
if (component.Whitelist != null && component.Whitelist?.IsValid(entity, EntityManager) != true)
|
||||
if (_whitelistSystem.IsBlacklistPass(component.Blacklist, entity) ||
|
||||
_whitelistSystem.IsWhitelistFail(component.Whitelist, entity))
|
||||
return false;
|
||||
|
||||
if (TryComp<PhysicsComponent>(entity, out var physics) && (physics.CanCollide) || storable)
|
||||
|
||||
Reference in New Issue
Block a user