From 49c159d271a393ff5a8fbd5fa7eacdb65ba977a8 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Sun, 24 Nov 2024 02:59:57 +0200 Subject: [PATCH] DeltaV #2263 (#2442) https://github.com/DeltaV-Station/Delta-v/pull/2263/files --- .../Whitelist/EntityWhitelistSystem.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Whitelist/EntityWhitelistSystem.cs b/Content.Shared/Whitelist/EntityWhitelistSystem.cs index 1a3290a4713..5e47241c444 100644 --- a/Content.Shared/Whitelist/EntityWhitelistSystem.cs +++ b/Content.Shared/Whitelist/EntityWhitelistSystem.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using System.Linq; // DeltaV using Content.Shared.Item; using Content.Shared.Roles; using Content.Shared.Tag; @@ -280,7 +281,20 @@ public bool IsWhitelistPass(EntityWhitelist? whitelist, EntityUid uid) if (whitelist == null) return false; - return IsValid(whitelist, uid); + // Begin DeltaV + var isValid = IsValid(whitelist, uid); + Log.Debug($"Whitelist validation result for entity {ToPrettyString(uid)}: {isValid}"); + + if (whitelist.RequireAll) + { + Log.Debug($"Whitelist requires all conditions - Components: {string.Join(", ", whitelist.Components ?? Array.Empty())}, " + + $"Tags: {(whitelist.Tags != null ? string.Join(", ", whitelist.Tags.Select(t => t.ToString())) : "none")}"); + } + + return isValid; + // EndDeltaV + + //return IsValid(whitelist, uid); // DeltaV } ///