From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:45:13 +0000 (+0000) Subject: hide icons for invisible entities (#34825) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=e675ea42735a842fa8d9d1145f37eeb12ccc167c;p=space-station-14.git hide icons for invisible entities (#34825) Co-authored-by: deltanedas <@deltanedas:kde.org> --- 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;