ElectricityAnomalyComponent.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  2. namespace Content.Shared.Anomaly.Effects.Components;
  3. [RegisterComponent]
  4. public sealed partial class ElectricityAnomalyComponent : Component
  5. {
  6. /// <summary>
  7. /// the minimum number of lightning strikes
  8. /// </summary>
  9. [DataField, ViewVariables(VVAccess.ReadWrite)]
  10. public int MinBoltCount = 2;
  11. /// <summary>
  12. /// the number of lightning strikes, at the maximum severity of the anomaly
  13. /// </summary>
  14. [DataField, ViewVariables(VVAccess.ReadWrite)]
  15. public int MaxBoltCount = 5;
  16. /// <summary>
  17. /// The maximum radius of the passive electrocution effect
  18. /// scales with stability
  19. /// </summary>
  20. [DataField, ViewVariables(VVAccess.ReadWrite)]
  21. public float MaxElectrocuteRange = 7f;
  22. /// <summary>
  23. /// The maximum amount of damage the electrocution can do
  24. /// scales with severity
  25. /// </summary>
  26. [DataField, ViewVariables(VVAccess.ReadWrite)]
  27. public float MaxElectrocuteDamage = 20f;
  28. /// <summary>
  29. /// The maximum amount of time the electrocution lasts
  30. /// scales with severity
  31. /// </summary>
  32. [DataField, ViewVariables(VVAccess.ReadWrite)]
  33. public TimeSpan MaxElectrocuteDuration = TimeSpan.FromSeconds(8);
  34. /// <summary>
  35. /// The maximum chance that each second, when in range of the anomaly, you will be electrocuted.
  36. /// scales with stability
  37. /// </summary>
  38. [DataField, ViewVariables(VVAccess.ReadWrite)]
  39. public float PassiveElectrocutionChance = 0.05f;
  40. /// <summary>
  41. /// Used for tracking seconds, so that we can shock people in a non-tick-dependent way.
  42. /// </summary>
  43. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
  44. public TimeSpan NextSecond = TimeSpan.Zero;
  45. /// <summary>
  46. /// Energy consumed from devices by the emp pulse upon going supercritical.
  47. /// <summary>
  48. [DataField, ViewVariables(VVAccess.ReadWrite)]
  49. public float EmpEnergyConsumption = 100000f;
  50. /// <summary>
  51. /// Duration of devices being disabled by the emp pulse upon going supercritical.
  52. /// <summary>
  53. [DataField, ViewVariables(VVAccess.ReadWrite)]
  54. public float EmpDisabledDuration = 60f;
  55. }