mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 08:37:26 +00:00
* Give 'em something to talk about
* Wire panel visuals
* Wire graphics tweak
* More ads and thanks
* More ads for a noisy arcade
* New screen for space villain machines
* Implement EmitSoundIntervalComponent and a bunch of arcade noises
* Require power for sounds
* Allow earlier startup intervals
* Orange glow
* Audio attributions
* Include the PR link
* Replace EmitSoundInterval with expanded SpamEmitSound
* Remove pacman-themed arcade sounds
* Documentation good.
* Updated methods to use Entity<T>
* Refactored SpamEmitSound to get rid of accumulator and chance.
* Fixed prewarm logic
* Moved stuff to Shared
* Fix outdated YAML
* Better prediction, auto pause handling
* Make enable/disable reset the timer instead of trying to save it.
(cherry picked from commit b1ba6b5bb6)
32 lines
978 B
C#
32 lines
978 B
C#
using Robust.Shared.Audio;
|
|
|
|
namespace Content.Shared.Bed.Sleep;
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class SleepEmitSoundComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Sound to play when sleeping
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public SoundSpecifier Snore = new SoundCollectionSpecifier("Snores", AudioParams.Default.WithVariation(0.2f));
|
|
|
|
/// <summary>
|
|
/// Minimum interval between snore attempts in seconds
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public TimeSpan Interval = TimeSpan.FromSeconds(5);
|
|
|
|
/// <summary>
|
|
/// Maximum interval between snore attempts in seconds
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public TimeSpan MaxInterval = TimeSpan.FromSeconds(15);
|
|
|
|
/// <summary>
|
|
/// Popup for snore (e.g. Zzz...)
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public LocId PopUp = "sleep-onomatopoeia";
|
|
}
|