ExpendableLightComponent.cs 679 B

12345678910111213141516171819
  1. using Content.Shared.Light.Components;
  2. namespace Content.Server.Light.Components
  3. {
  4. /// <summary>
  5. /// Component that represents a handheld expendable light which can be activated and eventually dies over time.
  6. /// </summary>
  7. [RegisterComponent]
  8. public sealed partial class ExpendableLightComponent : SharedExpendableLightComponent
  9. {
  10. /// <summary>
  11. /// Status of light, whether or not it is emitting light.
  12. /// </summary>
  13. [ViewVariables]
  14. public bool Activated => CurrentState is ExpendableLightState.Lit or ExpendableLightState.Fading;
  15. [ViewVariables] public float StateExpiryTime = default;
  16. }
  17. }