fix: Adds a cooldown when attempting to wake up someone else (#11847)

This commit is contained in:
Francesco
2022-10-15 06:13:24 +02:00
committed by GitHub
parent fd63375cdb
commit 635057fb7a
2 changed files with 18 additions and 1 deletions

View File

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