Files
tbd-station-14/Content.Client/Morgue/Visualizers/BodyBagVisualizer.cs
Leon Friedrich 88df3d8b10 Cargo: pizza & bureaucracy (#5123)
* add paper label component

* git mv

* rename namespace

* add cargo printouts

* more crates

* directly attach paper

* comment typo
2021-11-11 00:15:23 +11:00

31 lines
768 B
C#

using Content.Shared.Labels;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
namespace Content.Client.Morgue.Visualizers
{
[UsedImplicitly]
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(PaperLabelVisuals.HasLabel, out bool labelVal))
{
sprite.LayerSetVisible(BodyBagVisualLayers.Label, labelVal);
}
}
}
public enum BodyBagVisualLayers : byte
{
Label,
}
}