From e675ea42735a842fa8d9d1145f37eeb12ccc167c Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:45:13 +0000 Subject: [PATCH] hide icons for invisible entities (#34825) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Client/StatusIcon/StatusIconSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Client/StatusIcon/StatusIconSystem.cs b/Content.Client/StatusIcon/StatusIconSystem.cs index 63f5776769..50128baf5f 100644 --- a/Content.Client/StatusIcon/StatusIconSystem.cs +++ b/Content.Client/StatusIcon/StatusIconSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.StatusIcon; using Content.Shared.StatusIcon.Components; using Content.Shared.Stealth.Components; using Content.Shared.Whitelist; +using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; using Robust.Shared.Configuration; @@ -85,6 +86,9 @@ public sealed class StatusIconSystem : SharedStatusIconSystem if (data.HideOnStealth && TryComp(ent, out var stealth) && stealth.Enabled) return false; + if (TryComp(ent, out var sprite) && !sprite.Visible) + return false; + if (data.ShowTo != null && !_entityWhitelist.IsValid(data.ShowTo, viewer)) return false; -- 2.51.2