]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix sprite exceptions for cuffs (#14912)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Tue, 28 Mar 2023 05:06:25 +0000 (01:06 -0400)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2023 05:06:25 +0000 (22:06 -0700)
Content.Client/Cuffs/CuffableSystem.cs

index 76d9ce163982591b190b353f89c960f194ec3f52..42d0ae03fe67bf09c75d7ad7eb2a7cdd80981558 100644 (file)
@@ -26,15 +26,7 @@ public sealed class CuffableSystem : SharedCuffableSystem
             return;
 
         component.Cuffing = state.Cuffing;
-
-        if (state.IconState == string.Empty)
-            return;
-
-        if (TryComp<SpriteComponent>(uid, out var sprite))
-        {
-            // If you think this should be an explicit layer look at the YML and see https://github.com/space-wizards/space-station-14/issues/14771
-            sprite.LayerSetState(0, state.IconState);
-        }
+        component.OverlayIconState = state.IconState;
     }
 
     private void OnCuffableShutdown(EntityUid uid, CuffableComponent component, ComponentShutdown args)