1
0

PendingZombieComponent.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using Content.Shared.Damage;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  4. namespace Content.Shared.Zombies;
  5. /// <summary>
  6. /// Temporary because diseases suck.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent]
  9. public sealed partial class PendingZombieComponent : Component
  10. {
  11. /// <summary>
  12. /// Damage dealt every second to infected individuals.
  13. /// </summary>
  14. [DataField("damage")] public DamageSpecifier Damage = new()
  15. {
  16. DamageDict = new ()
  17. {
  18. { "Poison", 0.2 },
  19. }
  20. };
  21. /// <summary>
  22. /// A multiplier for <see cref="Damage"/> applied when the entity is in critical condition.
  23. /// </summary>
  24. [DataField("critDamageMultiplier")]
  25. public float CritDamageMultiplier = 10f;
  26. [DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
  27. public TimeSpan NextTick;
  28. /// <summary>
  29. /// The amount of time left before the infected begins to take damage.
  30. /// </summary>
  31. [DataField("gracePeriod"), ViewVariables(VVAccess.ReadWrite)]
  32. public TimeSpan GracePeriod = TimeSpan.Zero;
  33. /// <summary>
  34. /// The minimum amount of time initial infected have before they start taking infection damage.
  35. /// </summary>
  36. [DataField]
  37. public TimeSpan MinInitialInfectedGrace = TimeSpan.FromMinutes(12.5f);
  38. /// <summary>
  39. /// The maximum amount of time initial infected have before they start taking damage.
  40. /// </summary>
  41. [DataField]
  42. public TimeSpan MaxInitialInfectedGrace = TimeSpan.FromMinutes(15f);
  43. /// <summary>
  44. /// The chance each second that a warning will be shown.
  45. /// </summary>
  46. [DataField("infectionWarningChance")]
  47. public float InfectionWarningChance = 0.0166f;
  48. /// <summary>
  49. /// Infection warnings shown as popups
  50. /// </summary>
  51. [DataField("infectionWarnings")]
  52. public List<string> InfectionWarnings = new()
  53. {
  54. "zombie-infection-warning",
  55. "zombie-infection-underway"
  56. };
  57. }