6
StarHorizon_Public/Content.Server/Power/Components/SiliconEmitSoundOnDrainedComponent.cs
2026-01-24 12:49:55 +03:00

27 lines
673 B
C#

using Content.Shared.Sound.Components;
using Robust.Shared.Audio;
namespace Content.Server.Power.Components;
/// <summary>
/// Applies a <see cref="SpamEmitSoundComponent"/> to a Silicon when its battery is drained, and removes it when it's not.
/// </summary>
[RegisterComponent]
public sealed partial class SiliconEmitSoundOnDrainedComponent : Component
{
[DataField]
public SoundSpecifier Sound = default!;
[DataField]
public TimeSpan MinInterval = TimeSpan.FromSeconds(8);
[DataField]
public TimeSpan MaxInterval = TimeSpan.FromSeconds(15);
[DataField]
public float PlayChance = 1f;
[DataField]
public string? PopUp;
}