2021-06-09 22:19:39 +02:00
|
|
|
|
using Content.Shared.Morgue;
|
2020-12-08 11:56:10 +01:00
|
|
|
|
using JetBrains.Annotations;
|
2020-10-28 22:51:43 +00:00
|
|
|
|
using Robust.Client.GameObjects;
|
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Client.Morgue.Visualizers
|
2020-10-28 22:51:43 +00:00
|
|
|
|
{
|
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,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|