* Body bags! * Morgue Trays and the Crematorium! Reorganised body bags to be under Morgue, not Medical * Fix. Things outside of EntityStorageComponents now use the Try*Storage() not just *Storage() methods - Allows mobs to be trapped in a morgue/crematorium whose tray can't open. * Fix tests. Modernise component dependency and nullability. * Update Content.Server/GameObjects/Components/Morgue/MorgueTrayComponent.cs Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
31 lines
814 B
C#
31 lines
814 B
C#
#nullable enable
|
|
using Content.Shared.GameObjects.Components.Morgue;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.Interfaces.GameObjects.Components;
|
|
|
|
namespace Content.Client.GameObjects.Components.Morgue
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
public enum BodyBagVisualLayers
|
|
{
|
|
Label,
|
|
}
|
|
}
|