Files
tbd-station-14/Content.Shared/Bed/Sleep/SleepingComponent.cs
Coolsurf6 012c835559 Added Pain Numbness Trait (#34538)
* added pain-numbness component and system

* added numb as a trait that pulls the pain numbness component

* removed new event as mob threshold event as already being fired

* checked for MobThresholdsComponent first before running VerifyThresholds

* refacted force say to using LocalizedDatasetPrototype and added numb messages

* added severity check alert

* added comment for BeforeForceSayEvent

* removed space formatting

* changed Cancelled to CancelUpdate, fixed spacing and added two more damage-force-say-numb

* changed prefix damage-force-say-numb to 5 (whoops)
2025-01-27 11:34:20 +01:00

52 lines
1.5 KiB
C#

using Content.Shared.Dataset;
using Content.Shared.FixedPoint;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Bed.Sleep;
/// <summary>
/// Added to entities when they go to sleep.
/// </summary>
[NetworkedComponent, RegisterComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause(Dirty = true)]
public sealed partial class SleepingComponent : Component
{
/// <summary>
/// How much damage of any type it takes to wake this entity.
/// </summary>
[DataField]
public FixedPoint2 WakeThreshold = FixedPoint2.New(2);
/// <summary>
/// Cooldown time between users hand interaction.
/// </summary>
[DataField]
public TimeSpan Cooldown = TimeSpan.FromSeconds(1f);
[DataField]
[AutoNetworkedField, AutoPausedField]
public TimeSpan CooldownEnd;
[DataField]
[AutoNetworkedField]
public EntityUid? WakeAction;
/// <summary>
/// Sound to play when another player attempts to wake this entity.
/// </summary>
[DataField]
public SoundSpecifier WakeAttemptSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg")
{
Params = AudioParams.Default.WithVariation(0.05f)
};
/// <summary>
/// The fluent string prefix to use when picking a random suffix
/// This is only active for those who have the sleeping component
/// </summary>
[DataField]
public ProtoId<LocalizedDatasetPrototype> ForceSaySleepDataset = "ForceSaySleepDataset";
}