using Content.Shared.Mech;
using Robust.Client.GameObjects;
namespace Content.Client.Mech;
///
/// Handles the sprite state changes while
/// constructing mech assemblies.
///
public sealed partial class MechAssemblyVisualizerSystem : VisualizerSystem
{
protected override void OnAppearanceChange(EntityUid uid, MechAssemblyVisualsComponent component,
ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
return;
if (!args.TryGetData(MechAssemblyVisuals.State, out var stage))
return;
var state = component.StatePrefix + stage;
SpriteSystem.LayerSetRsiState((uid, args.Sprite), 0, state);
}
}