From 40c6c1c3aeb60425fa78433f66a5afd9ae630d7a Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Tue, 23 May 2023 06:02:13 -0400 Subject: [PATCH] Make item rsis overwrite sprite rsis for inhandvisuals (#16714) --- Content.Client/Hands/Systems/HandsSystem.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 83465dea6f..ba4bbb728b 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -348,10 +348,12 @@ namespace Content.Client.Hands.Systems // In case no RSI is given, use the item's base RSI as a default. This cuts down on a lot of unnecessary yaml entries. if (layerData.RsiPath == null && layerData.TexturePath == null - && sprite[index].Rsi == null - && TryComp(held, out SpriteComponent? clothingSprite)) + && sprite[index].Rsi == null) { - sprite.LayerSetRSI(index, clothingSprite.BaseRSI); + if (TryComp(held, out var itemComponent) && itemComponent.RsiPath != null) + sprite.LayerSetRSI(index, itemComponent.RsiPath); + else if (TryComp(held, out SpriteComponent? clothingSprite)) + sprite.LayerSetRSI(index, clothingSprite.BaseRSI); } sprite.LayerSetData(index, layerData);