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)
|
private void ProcessCompositeSprites(AppearanceComponent component, ISpriteComponent spriteComponent)
|
||||||
{
|
{
|
||||||
// If hidden, don't render any sprites
|
// If hidden, don't render any sprites
|
||||||
if (!component.TryGetData<bool>(StackVisuals.Hide, out var hide)
|
if (component.TryGetData<bool>(StackVisuals.Hide, out var hide)
|
||||||
|| hide)
|
&& hide)
|
||||||
{
|
{
|
||||||
foreach (var transparentSprite in _spriteLayers)
|
foreach (var transparentSprite in _spriteLayers)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
spriteComponent.LayerSetVisible(OpenIcon, false);
|
spriteComponent.LayerSetVisible(OpenIcon, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
component.SetData(StackVisuals.Hide, bagState == SharedBagState.Close);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
// Hide stackVisualizer on start
|
// Hide stackVisualizer on start
|
||||||
_bagState = SharedBagState.Close;
|
ChangeStorageVisualization(SharedBagState.Close);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAdd()
|
public override void OnAdd()
|
||||||
@@ -149,7 +149,6 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
if (Owner.TryGetComponent<AppearanceComponent>(out var appearanceComponent))
|
if (Owner.TryGetComponent<AppearanceComponent>(out var appearanceComponent))
|
||||||
{
|
{
|
||||||
appearanceComponent.SetData(SharedBagOpenVisuals.BagState, state);
|
appearanceComponent.SetData(SharedBagOpenVisuals.BagState, state);
|
||||||
appearanceComponent.SetData(StackVisuals.Hide, state == SharedBagState.Close);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user