Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debug logging to entitywhitelist #2263

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Content.Shared/Whitelist/EntityWhitelistSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq; // DeltaV
using Content.Shared.Item;
using Content.Shared.Roles;
using Content.Shared.Tag;
Expand Down Expand Up @@ -113,6 +114,20 @@ public bool IsWhitelistPass(EntityWhitelist? whitelist, EntityUid uid)
if (whitelist == null)
return false;

// Begin DeltaV
Log.Debug($"Checking whitelist pass for entity {ToPrettyString(uid)}");
MilonPL marked this conversation as resolved.
Show resolved Hide resolved
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<string>())}, " +
$"Tags: {(whitelist.Tags != null ? string.Join(", ", whitelist.Tags.Select(t => t.ToString())) : "none")}");
}

return isValid;
// EndDeltaV

return IsValid(whitelist, uid);
}

Expand Down
Loading