using System.Threading;
using Content.Server.StationEvents.Events;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(PowerGridCheckRule))]
public sealed partial class PowerGridCheckRuleComponent : Component
{
///
/// Default sound of the announcement when power is back on.
///
private static readonly ProtoId DefaultPowerOn = new("PowerOn");
///
/// Sound of the announcement to play when power is back on.
///
[DataField]
public SoundSpecifier PowerOnSound = new SoundCollectionSpecifier(DefaultPowerOn, AudioParams.Default.WithVolume(-4f));
public CancellationTokenSource? AnnounceCancelToken;
public EntityUid AffectedStation;
public readonly List Powered = new();
public readonly List Unpowered = new();
public float SecondsUntilOff = 30.0f;
public int NumberPerSecond = 0;
public float UpdateRate => 1.0f / NumberPerSecond;
public float FrameTimeAccumulator = 0.0f;
}