Files
crystall-punk-14/Content.Client/GameObjects/Components/Wires/WiresVisualizer.cs

29 lines
912 B
C#
Raw Normal View History

using Robust.Client.GameObjects;
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
namespace Content.Client.GameObjects.Components.Wires
{
public class WiresVisualizer : AppearanceVisualizer
{
public override void OnChangeData(AppearanceComponent component)
{
base.OnChangeData(component);
var sprite = component.Owner.GetComponent<ISpriteComponent>();
if (component.TryGetData<bool>(WiresVisuals.MaintenancePanelState, out var state))
{
sprite.LayerSetVisible(WiresVisualLayers.MaintenancePanel, state);
}
// Mainly for spawn window
else
{
sprite.LayerSetVisible(WiresVisualLayers.MaintenancePanel, false);
}
}
2020-12-04 11:57:33 +01:00
public enum WiresVisualLayers : byte
{
MaintenancePanel,
}
}
}