2022-04-15 18:53:52 -04:00
|
|
|
using Content.Shared.Bed;
|
|
|
|
|
using Robust.Client.GameObjects;
|
|
|
|
|
|
2023-02-02 17:34:53 +01:00
|
|
|
namespace Content.Client.Bed;
|
|
|
|
|
|
|
|
|
|
public sealed class StasisBedSystem : VisualizerSystem<StasisBedVisualsComponent>
|
2022-04-15 18:53:52 -04:00
|
|
|
{
|
2023-02-02 17:34:53 +01:00
|
|
|
protected override void OnAppearanceChange(EntityUid uid, StasisBedVisualsComponent component, ref AppearanceChangeEvent args)
|
2022-04-15 18:53:52 -04:00
|
|
|
{
|
2023-02-02 17:34:53 +01:00
|
|
|
if (args.Sprite != null
|
|
|
|
|
&& AppearanceSystem.TryGetData<bool>(uid, StasisBedVisuals.IsOn, out var isOn, args.Component))
|
2022-04-15 18:53:52 -04:00
|
|
|
{
|
2023-02-02 17:34:53 +01:00
|
|
|
args.Sprite.LayerSetVisible(StasisBedVisualLayers.IsOn, isOn);
|
2022-04-15 18:53:52 -04:00
|
|
|
}
|
|
|
|
|
}
|
2023-02-02 17:34:53 +01:00
|
|
|
}
|
2022-04-15 18:53:52 -04:00
|
|
|
|
2023-02-02 17:34:53 +01:00
|
|
|
public enum StasisBedVisualLayers : byte
|
|
|
|
|
{
|
|
|
|
|
IsOn,
|
2022-04-15 18:53:52 -04:00
|
|
|
}
|