Make item rsis overwrite sprite rsis for inhandvisuals (#16714)
This commit is contained in:
@@ -348,9 +348,11 @@ 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.
|
// 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
|
if (layerData.RsiPath == null
|
||||||
&& layerData.TexturePath == null
|
&& layerData.TexturePath == null
|
||||||
&& sprite[index].Rsi == null
|
&& sprite[index].Rsi == null)
|
||||||
&& TryComp(held, out SpriteComponent? clothingSprite))
|
|
||||||
{
|
{
|
||||||
|
if (TryComp<ItemComponent>(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.LayerSetRSI(index, clothingSprite.BaseRSI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user