Files
OldThink/Content.Shared/Bed/Sleep/SleepingComponent.cs

32 lines
1010 B
C#
Raw Permalink 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, AutoGenerateComponentPause(Dirty = true)]
public sealed partial class SleepingComponent : Component
2022-07-27 00:46:24 -04:00
{
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))]
[AutoPausedField]
public TimeSpan CoolDownEnd;
[DataField("wakeAction")] public EntityUid? WakeAction;
2022-07-27 00:46:24 -04:00
}