Fix visualizer issues (#3440)
This commit is contained in:
@@ -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<bool>(StackVisuals.Hide, out var hide)
|
||||
|| hide)
|
||||
if (component.TryGetData<bool>(StackVisuals.Hide, out var hide)
|
||||
&& hide)
|
||||
{
|
||||
foreach (var transparentSprite in _spriteLayers)
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
||||
spriteComponent.LayerSetVisible(OpenIcon, false);
|
||||
break;
|
||||
}
|
||||
component.SetData(StackVisuals.Hide, bagState == SharedBagState.Close);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<AppearanceComponent>(out var appearanceComponent))
|
||||
{
|
||||
appearanceComponent.SetData(SharedBagOpenVisuals.BagState, state);
|
||||
appearanceComponent.SetData(StackVisuals.Hide, state == SharedBagState.Close);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user