2021-03-10 14:48:29 +01:00
|
|
|
|
using Content.Shared.GameObjects.Components.Morgue;
|
2020-12-08 11:56:10 +01:00
|
|
|
|
using JetBrains.Annotations;
|
2020-10-28 22:51:43 +00:00
|
|
|
|
using Robust.Client.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.GameObjects.Components.Morgue
|
|
|
|
|
|
{
|
2020-12-08 11:56:10 +01:00
|
|
|
|
[UsedImplicitly]
|
2020-10-28 22:51:43 +00:00
|
|
|
|
public sealed class BodyBagVisualizer : AppearanceVisualizer
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void OnChangeData(AppearanceComponent component)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnChangeData(component);
|
|
|
|
|
|
|
|
|
|
|
|
if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite))
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (component.TryGetData(BodyBagVisuals.Label, out bool labelVal))
|
|
|
|
|
|
{
|
|
|
|
|
|
sprite.LayerSetVisible(BodyBagVisualLayers.Label, labelVal);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-04 11:57:33 +01:00
|
|
|
|
public enum BodyBagVisualLayers : byte
|
2020-10-28 22:51:43 +00:00
|
|
|
|
{
|
|
|
|
|
|
Label,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|