AnomalousParticleComponent.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using Content.Shared.Anomaly;
  2. using Content.Shared.Anomaly.Components;
  3. namespace Content.Server.Anomaly.Components;
  4. /// <summary>
  5. /// This is used for projectiles which affect anomalies through colliding with them.
  6. /// </summary>
  7. [RegisterComponent, Access(typeof(SharedAnomalySystem))]
  8. public sealed partial class AnomalousParticleComponent : Component
  9. {
  10. /// <summary>
  11. /// The type of particle that the projectile
  12. /// imbues onto the anomaly on contact.
  13. /// </summary>
  14. [DataField(required: true)]
  15. public AnomalousParticleType ParticleType;
  16. /// <summary>
  17. /// The fixture that's checked on collision.
  18. /// </summary>
  19. [DataField]
  20. public string FixtureId = "projectile";
  21. /// <summary>
  22. /// The amount that the <see cref="AnomalyComponent.Severity"/> increases by when hit
  23. /// of an anomalous particle of <seealso cref="AnomalyComponent.SeverityParticleType"/>.
  24. /// </summary>
  25. [DataField]
  26. public float SeverityPerSeverityHit = 0.025f;
  27. /// <summary>
  28. /// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
  29. /// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
  30. /// </summary>
  31. [DataField]
  32. public float StabilityPerDestabilizingHit = 0.04f;
  33. /// <summary>
  34. /// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
  35. /// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
  36. /// </summary>
  37. [DataField]
  38. public float HealthPerWeakeningeHit = -0.05f;
  39. /// <summary>
  40. /// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
  41. /// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
  42. /// </summary>
  43. [DataField]
  44. public float StabilityPerWeakeningeHit = -0.1f;
  45. /// <summary>
  46. /// If this is true then the particle will always affect the stability of the anomaly.
  47. /// </summary>
  48. [DataField]
  49. public bool DestabilzingOverride = false;
  50. /// <summary>
  51. /// If this is true then the particle will always affect the weakeness of the anomaly.
  52. /// </summary>
  53. [DataField]
  54. public bool WeakeningOverride = false;
  55. /// <summary>
  56. /// If this is true then the particle will always affect the severity of the anomaly.
  57. /// </summary>
  58. [DataField]
  59. public bool SeverityOverride = false;
  60. /// <summary>
  61. /// If this is true then the particle will always affect the behaviour.
  62. /// </summary>
  63. [DataField]
  64. public bool TransmutationOverride = false;
  65. }