2023-07-19 11:55:50 +03:00
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Bed.Sleep;
|
|
|
|
|
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class SleepEmitSoundComponent : Component
|
2023-07-19 11:55:50 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound to play when sleeping
|
|
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-07-19 11:55:50 +03:00
|
|
|
public SoundSpecifier Snore = new SoundCollectionSpecifier("Snores", AudioParams.Default.WithVariation(0.2f));
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-03-28 02:28:45 -04:00
|
|
|
/// Minimum interval between snore attempts in seconds
|
2023-07-19 11:55:50 +03:00
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2024-03-28 02:28:45 -04:00
|
|
|
public TimeSpan Interval = TimeSpan.FromSeconds(5);
|
2023-07-19 11:55:50 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
2024-03-28 02:28:45 -04:00
|
|
|
/// Maximum interval between snore attempts in seconds
|
2023-07-19 11:55:50 +03:00
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-07-19 11:55:50 +03:00
|
|
|
public float Chance = 0.33f;
|
2024-03-28 02:28:45 -04:00
|
|
|
public TimeSpan MaxInterval = TimeSpan.FromSeconds(15);
|
2023-07-19 11:55:50 +03:00
|
|
|
}
|