Files
tbd-station-14/Content.Client/PneumaticCannon/PneumaticCannonVisualizer.cs
2021-11-23 18:22:59 +11:00

23 lines
665 B
C#

using Content.Shared.PneumaticCannon;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.PneumaticCannon
{
public class PneumaticCannonVisualizer : AppearanceVisualizer
{
public override void OnChangeData(AppearanceComponent component)
{
base.OnChangeData(component);
if (!component.Owner.TryGetComponent<SpriteComponent>(out var sprite))
return;
if (component.TryGetData(PneumaticCannonVisuals.Tank, out bool tank))
{
sprite.LayerSetVisible(PneumaticCannonVisualLayers.Tank, tank);
}
}
}
}