diff --git a/Content.Client/GameObjects/Components/StackVisualizer.cs b/Content.Client/GameObjects/Components/StackVisualizer.cs index 8b791cb2aa..d72685c0d7 100644 --- a/Content.Client/GameObjects/Components/StackVisualizer.cs +++ b/Content.Client/GameObjects/Components/StackVisualizer.cs @@ -152,8 +152,8 @@ namespace Content.Client.GameObjects.Components private void ProcessCompositeSprites(AppearanceComponent component, ISpriteComponent spriteComponent) { // If hidden, don't render any sprites - if (!component.TryGetData(StackVisuals.Hide, out var hide) - || hide) + if (component.TryGetData(StackVisuals.Hide, out var hide) + && hide) { foreach (var transparentSprite in _spriteLayers) { diff --git a/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs b/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs index d66758f9a5..103e21d0bb 100644 --- a/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs +++ b/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs @@ -63,6 +63,7 @@ namespace Content.Client.GameObjects.Components.Storage spriteComponent.LayerSetVisible(OpenIcon, false); break; } + component.SetData(StackVisuals.Hide, bagState == SharedBagState.Close); } } } diff --git a/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs b/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs index 334b983c59..894f9f9801 100644 --- a/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs +++ b/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs @@ -39,7 +39,7 @@ namespace Content.Client.GameObjects.Components.Storage base.Initialize(); // Hide stackVisualizer on start - _bagState = SharedBagState.Close; + ChangeStorageVisualization(SharedBagState.Close); } public override void OnAdd() @@ -149,7 +149,6 @@ namespace Content.Client.GameObjects.Components.Storage if (Owner.TryGetComponent(out var appearanceComponent)) { appearanceComponent.SetData(SharedBagOpenVisuals.BagState, state); - appearanceComponent.SetData(StackVisuals.Hide, state == SharedBagState.Close); } }