PoweredLightVariationPassComponent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Content.Shared.Light.Components;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Server.GameTicking.Rules.VariationPass.Components;
  4. /// <summary>
  5. /// This handle randomly destroying lights, causing them to flicker endlessly, or replacing their tube/bulb with different variants.
  6. /// </summary>
  7. [RegisterComponent]
  8. public sealed partial class PoweredLightVariationPassComponent : Component
  9. {
  10. /// <summary>
  11. /// Chance that a light will be replaced with a broken variant.
  12. /// </summary>
  13. [DataField]
  14. public float LightBreakChance = 0.15f;
  15. /// <summary>
  16. /// Chance that a light will be replaced with an aged variant.
  17. /// </summary>
  18. [DataField]
  19. public float LightAgingChance = 0.05f;
  20. [DataField]
  21. public float AgedLightTubeFlickerChance = 0.03f;
  22. [DataField]
  23. public EntProtoId BrokenLightBulbPrototype = "LightBulbBroken";
  24. [DataField]
  25. public EntProtoId BrokenLightTubePrototype = "LightTubeBroken";
  26. [DataField]
  27. public EntProtoId AgedLightBulbPrototype = "LightBulbOld";
  28. [DataField]
  29. public EntProtoId AgedLightTubePrototype = "LightTubeOld";
  30. }