using Content.Shared.Damage; using Robust.Shared.Audio; using Robust.Shared.GameStates; namespace Content.Shared._DV.Body; /// /// Component that allows a body to have health that is affected by light levels. /// Either damaged or healed by certain light levels. /// This is used for the Skia, which is a creature that is harmed by light. /// [RegisterComponent, NetworkedComponent] public sealed partial class LightLevelHealthComponent : Component { /// /// Level of light that, when below, we are considered in darkness. /// [DataField] public float DarkThreshold = 0.2f; /// /// Level of light that, when above, we are considered in light. /// [DataField] public float LightThreshold = 0.8f; /// /// Amount of health or damage per second when in darkness. Positive values harm, negative values heal. /// [DataField(required: true)] public DamageSpecifier DarkDamage = default!; /// /// Amount of health or damage per second when in light. Positive values harm, negative values heal. /// [DataField(required: true)] public DamageSpecifier LightDamage = default!; /// /// If true, the entity will heal when dead if in the appropriate light level /// [DataField] public bool HealWhenDead = false; /// /// Movement speed multiplier when in darkness. /// [DataField] public float DarkMovementSpeedMultiplier = 1.0f; /// /// Movement speed multiplier when in light. /// [DataField] public float LightMovementSpeedMultiplier = 1.0f; /// /// Sound to play when the entity is damaged by light or darkness. /// [DataField] public SoundSpecifier SizzleSoundPath = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg"); /// /// The current light threshhold for this component. /// -1 for darkness, 1 for light. /// 0 for neither. /// [DataField] public int CurrentThreshold = 0; }