Replace obsolete EntityWhitelist IsValid usages part 2 (#28506)
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Sticky;
|
||||
using Content.Shared.Sticky.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -20,6 +21,7 @@ public sealed class StickySystem : EntitySystem
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
private const string StickerSlotId = "stickers_container";
|
||||
|
||||
@@ -67,9 +69,8 @@ public sealed class StickySystem : EntitySystem
|
||||
return false;
|
||||
|
||||
// check whitelist and blacklist
|
||||
if (component.Whitelist != null && !component.Whitelist.IsValid(target))
|
||||
return false;
|
||||
if (component.Blacklist != null && component.Blacklist.IsValid(target))
|
||||
if (_whitelistSystem.IsWhitelistFail(component.Whitelist, target) ||
|
||||
_whitelistSystem.IsBlacklistPass(component.Blacklist, target))
|
||||
return false;
|
||||
|
||||
var attemptEv = new AttemptEntityStickEvent(target, user);
|
||||
|
||||
Reference in New Issue
Block a user