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:
@@ -22,6 +22,7 @@ using Content.Shared.Roles;
|
||||
using Content.Shared.Silicons.Borgs;
|
||||
using Content.Shared.Silicons.Borgs.Components;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Whitelist;
|
||||
using Content.Shared.Wires;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -53,6 +54,8 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
|
||||
|
||||
[ValidatePrototypeId<JobPrototype>]
|
||||
public const string BorgJobId = "Borg";
|
||||
@@ -104,9 +107,8 @@ public sealed partial class BorgSystem : SharedBorgSystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.BrainEntity == null &&
|
||||
brain != null &&
|
||||
component.BrainWhitelist?.IsValid(used) != false)
|
||||
if (component.BrainEntity == null && brain != null &&
|
||||
_whitelistSystem.IsWhitelistPassOrNull(component.BrainWhitelist, used))
|
||||
{
|
||||
if (_mind.TryGetMind(used, out _, out var mind) && mind.Session != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user