Files
crystall-punk-14/Content.Shared/Bed/Sleep/SleepingComponent.cs

29 lines
877 B
C#
Raw Normal View History

2023-01-10 22:46:58 +11:00
using Content.Shared.FixedPoint;
2022-07-27 00:46:24 -04:00
using Robust.Shared.GameStates;
2023-01-10 22:46:58 +11:00
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
2022-07-27 00:46:24 -04:00
namespace Content.Shared.Bed.Sleep;
/// <summary>
/// Added to entities when they go to sleep.
/// </summary>
[NetworkedComponent, RegisterComponent]
2022-07-27 00:46:24 -04:00
public sealed class SleepingComponent : Component
{
2023-01-10 22:46:58 +11:00
/// <summary>
/// How much damage of any type it takes to wake this entity.
/// </summary>
2022-07-27 00:46:24 -04:00
[DataField("wakeThreshold")]
2023-01-10 22:46:58 +11:00
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);
2023-01-10 22:46:58 +11:00
[DataField("cooldownEnd", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan CoolDownEnd;
2022-07-27 00:46:24 -04:00
}