1
0

GracewallComponent.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Content.Shared.Physics;
  2. using Robust.Shared.Physics.Collision.Shapes;
  3. using Robust.Shared.Physics.Components;
  4. using Robust.Shared.Physics.Systems;
  5. namespace Content.Server.GameTicking.Rules.Components;
  6. [RegisterComponent, Access(typeof(GracewallRuleSystem))]
  7. public sealed partial class GracewallRuleComponent : Component
  8. {
  9. /// <summary>
  10. /// How long the grace wall lasts since the round started
  11. /// </summary>
  12. [DataField("gracewallDuration")]
  13. public TimeSpan GracewallDuration { get; set; } = TimeSpan.FromMinutes(5);
  14. /// <summary>
  15. /// Is the grace wall currently active?
  16. /// </summary>
  17. [DataField("gracewallActive")]
  18. public bool GracewallActive { get; set; } = true;
  19. /// <summary>
  20. /// How much time is remaining until the grace wall drops.
  21. /// </summary>
  22. public float Timer;
  23. }
  24. [RegisterComponent]
  25. public sealed partial class GracewallAreaComponent : Component
  26. {
  27. /// <summary>
  28. /// How long the grace wall lasts since the round started
  29. /// </summary>
  30. [DataField("gracewallRadius")]
  31. public float GracewallRadius { get; set; } = 1.5f;
  32. /// <summary>
  33. /// Is the grace wall currently active?
  34. /// </summary>
  35. [DataField("gracewallActive")]
  36. public bool GracewallActive { get; set; } = true;
  37. /// <summary>
  38. /// Which factions are blocked by the wall? If 'All', it applies to all
  39. /// </summary>
  40. [DataField("blockingFactions")]
  41. public List<string> BlockingFactions { get; set; } = ["All"];
  42. }