fix sprite exceptions for cuffs (#14912)

This commit is contained in:
Nemanja 2023-03-28 01:06:25 -04:00 committed by GitHub
parent 25c89539ba
commit 0ed70b4f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View 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)