Beds, Medical Beds, Stasis Beds (#6695)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
namespace Content.Client.Bed;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class StasisBedVisualsComponent : Component
|
||||
{}
|
||||
22
Content.Client/Bed/StasisBedSystem.cs
Normal file
22
Content.Client/Bed/StasisBedSystem.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Content.Shared.Bed;
|
||||
using Robust.Client.GameObjects;
|
||||
|
||||
namespace Content.Client.Bed
|
||||
{
|
||||
public sealed class StasisBedSystem : VisualizerSystem<StasisBedVisualsComponent>
|
||||
{
|
||||
protected override void OnAppearanceChange(EntityUid uid, StasisBedVisualsComponent component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
if (TryComp(uid, out SpriteComponent? sprite)
|
||||
&& args.Component.TryGetData(StasisBedVisuals.IsOn, out bool isOn))
|
||||
{
|
||||
sprite.LayerSetVisible(StasisBedVisualLayers.IsOn, isOn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum StasisBedVisualLayers : byte
|
||||
{
|
||||
IsOn,
|
||||
}
|
||||
}
|
||||
@@ -272,6 +272,8 @@ namespace Content.Client.Entry
|
||||
"BeingCloned",
|
||||
"Advertise",
|
||||
"Bible",
|
||||
"HealOnBuckle",
|
||||
"StasisBed",
|
||||
"PowerNetworkBattery",
|
||||
"BatteryCharger",
|
||||
"UnpoweredFlashlight",
|
||||
|
||||
Reference in New Issue
Block a user