mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-06-09 10:06:49 +02:00
24 lines
803 B
C#
24 lines
803 B
C#
using Content.Shared.Modular.Suit;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.Modular.Suit;
|
|
|
|
/// <summary>
|
|
/// Handles the sprite state changes while
|
|
/// constructing mech assemblies.
|
|
/// </summary>
|
|
public sealed partial class ModularSuitAssemblyVisualizerSystem : VisualizerSystem<ModularSuitAssemblyVisualsComponent>
|
|
{
|
|
protected override void OnAppearanceChange(EntityUid uid, ModularSuitAssemblyVisualsComponent component,
|
|
ref AppearanceChangeEvent args)
|
|
{
|
|
base.OnAppearanceChange(uid, component, ref args);
|
|
|
|
if (!AppearanceSystem.TryGetData<int>(uid, ModilarSuitAssemblyVisuals.State, out var stage, args.Component))
|
|
return;
|
|
|
|
var state = component.StatePrefix + stage;
|
|
SpriteSystem.LayerSetRsiState(uid, 0, state);
|
|
}
|
|
}
|