2022-07-27 00:46:24 -04:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Bed.Sleep;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Added to entities when they go to sleep.
|
|
|
|
|
/// </summary>
|
2022-10-15 06:13:24 +02:00
|
|
|
[NetworkedComponent, RegisterComponent]
|
2022-07-27 00:46:24 -04:00
|
|
|
public sealed class SleepingComponent : Component
|
|
|
|
|
{
|
|
|
|
|
// How much damage of any type it takes to wake this entity.
|
|
|
|
|
[DataField("wakeThreshold")]
|
|
|
|
|
public float WakeThreshold = 2;
|
2022-10-15 06:13:24 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Cooldown time between users hand interaction.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("cooldown")]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public TimeSpan Cooldown = TimeSpan.FromSeconds(1f);
|
|
|
|
|
|
|
|
|
|
public TimeSpan CoolDownEnd;
|
2022-07-27 00:46:24 -04:00
|
|
|
}
|