TechAnomalyComponent.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Content.Server.Anomaly.Effects;
  2. using Content.Shared.Destructible.Thresholds;
  3. using Content.Shared.DeviceLinking;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Server.Anomaly.Components;
  6. [RegisterComponent, AutoGenerateComponentPause, Access(typeof(TechAnomalySystem))]
  7. public sealed partial class TechAnomalyComponent : Component
  8. {
  9. /// <summary>
  10. /// the distance at which random ports will bind to the anomaly. Scales with severity.
  11. /// </summary>
  12. [DataField]
  13. public MinMax LinkRadius = new(5, 10);
  14. /// <summary>
  15. /// the maximum number of entities with which an anomaly is associated during pulsing. Scales with severity
  16. /// </summary>
  17. [DataField]
  18. public MinMax LinkCountPerPulse = new(2, 8);
  19. /// <summary>
  20. /// Number of linkable pairs. when supercrit, the anomaly will link random devices in the radius to each other in pairs.
  21. /// </summary>
  22. [DataField]
  23. public int LinkCountSupercritical = 30;
  24. /// <summary>
  25. /// port activated by pulsation of the anomaly
  26. /// </summary>
  27. [DataField]
  28. public ProtoId<SourcePortPrototype> PulsePort = "Pulse";
  29. /// <summary>
  30. /// A port that activates every few seconds of an anomaly's lifetime
  31. /// </summary>
  32. [DataField]
  33. public ProtoId<SourcePortPrototype> TimerPort = "Timer";
  34. /// <summary>
  35. /// Chance of emag the device, when supercrit
  36. /// </summary>
  37. [DataField]
  38. public float EmagSupercritProbability = 0.4f;
  39. /// <summary>
  40. /// A prototype beam shot into devices when pulsed
  41. /// </summary>
  42. [DataField]
  43. public EntProtoId LinkBeamProto = "AnomalyTechBeam";
  44. /// <summary>
  45. /// time until the next activation of the timer ports
  46. /// </summary>
  47. [DataField, AutoPausedField]
  48. public TimeSpan NextTimer = TimeSpan.Zero;
  49. [DataField]
  50. public float TimerFrequency = 3f;
  51. }