using Content.Shared.Light; using Robust.Shared.Audio; namespace Content.Client.Light.Visualizers; [RegisterComponent] [Access(typeof(PoweredLightVisualizerSystem))] public sealed partial class PoweredLightVisualsComponent : Component { /// /// A map of the sprite states used by this visualizer indexed by the light state they correspond to. /// [DataField("spriteStateMap")] [ViewVariables(VVAccess.ReadOnly)] public Dictionary SpriteStateMap = new() { [PoweredLightState.Empty] = "empty", [PoweredLightState.Off] = "off", [PoweredLightState.On] = "on", [PoweredLightState.Broken] = "broken", [PoweredLightState.Burned] = "burn", }; #region Blinking /// /// The id used to track the blinking animation for lights. /// [ViewVariables(VVAccess.ReadOnly)] public const string BlinkingAnimationKey = "poweredlight_blinking"; /// /// The minimum length of the base blinking animation (one on-off-on cycle) in seconds. /// [DataField("minBlinkingTime")] [ViewVariables(VVAccess.ReadWrite)] public float MinBlinkingAnimationCycleTime = 0.5f; /// /// The maximum length of the base blinking animation (one on-off-on cycle) in seconds. /// [DataField("maxBlinkingTime")] [ViewVariables(VVAccess.ReadWrite)] public float MaxBlinkingAnimationCycleTime = 2; /// /// The sound that plays when the blinking animation cycles. /// [DataField("blinkingSound")] [ViewVariables(VVAccess.ReadWrite)] public SoundSpecifier? BlinkingSound = default; /// /// Whether or not this light is currently blinking. /// [ViewVariables(VVAccess.ReadWrite)] public bool IsBlinking; #endregion Blinking }