Replace obsolete EntityWhitelist IsValid usages part 2 (#28506)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Examine;
|
||||
@@ -7,6 +7,7 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
@@ -21,6 +22,7 @@ public sealed class BinSystem : EntitySystem
|
||||
[Dependency] private readonly ISharedAdminLogManager _admin = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
public const string BinContainerId = "bin-container";
|
||||
|
||||
@@ -130,7 +132,7 @@ public sealed class BinSystem : EntitySystem
|
||||
if (component.Items.Count >= component.MaxItems)
|
||||
return false;
|
||||
|
||||
if (component.Whitelist != null && !component.Whitelist.IsValid(toInsert))
|
||||
if (_whitelistSystem.IsWhitelistFail(component.Whitelist, toInsert))
|
||||
return false;
|
||||
|
||||
_container.Insert(toInsert, component.ItemContainer);
|
||||
|
||||
Reference in New Issue
Block a user