]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
hide icons for invisible entities (#34825)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Thu, 6 Feb 2025 13:45:13 +0000 (13:45 +0000)
committerGitHub <noreply@github.com>
Thu, 6 Feb 2025 13:45:13 +0000 (14:45 +0100)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Client/StatusIcon/StatusIconSystem.cs

index 63f57767695edcb2a66ab1874e9cdc6ea74b4520..50128baf5f364d1cc1ad95730004221e9ecd89ce 100644 (file)
@@ -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<StealthComponent>(ent, out var stealth) && stealth.Enabled)
             return false;
 
+        if (TryComp<SpriteComponent>(ent, out var sprite) && !sprite.Visible)
+            return false;
+
         if (data.ShowTo != null && !_entityWhitelist.IsValid(data.ShowTo, viewer))
             return false;