29 lines
877 B
C#
29 lines
877 B
C#
using Content.Shared.FixedPoint;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.Bed.Sleep;
|
|
|
|
/// <summary>
|
|
/// Added to entities when they go to sleep.
|
|
/// </summary>
|
|
[NetworkedComponent, RegisterComponent]
|
|
public sealed class SleepingComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// How much damage of any type it takes to wake this entity.
|
|
/// </summary>
|
|
[DataField("wakeThreshold")]
|
|
public FixedPoint2 WakeThreshold = FixedPoint2.New(2);
|
|
|
|
/// <summary>
|
|
/// Cooldown time between users hand interaction.
|
|
/// </summary>
|
|
[DataField("cooldown")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public TimeSpan Cooldown = TimeSpan.FromSeconds(1f);
|
|
|
|
[DataField("cooldownEnd", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
|
public TimeSpan CoolDownEnd;
|
|
}
|