SalvageMagnetDataComponent.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  2. namespace Content.Server.Salvage.Magnet;
  3. /// <summary>
  4. /// Added to the station to hold salvage magnet data.
  5. /// </summary>
  6. [RegisterComponent]
  7. public sealed partial class SalvageMagnetDataComponent : Component
  8. {
  9. // May be multiple due to splitting.
  10. /// <summary>
  11. /// Entities currently magnetised.
  12. /// </summary>
  13. [DataField]
  14. public List<EntityUid>? ActiveEntities;
  15. /// <summary>
  16. /// If the magnet is currently active when does it end.
  17. /// </summary>
  18. [DataField(customTypeSerializer:typeof(TimeOffsetSerializer))]
  19. public TimeSpan? EndTime;
  20. [DataField(customTypeSerializer:typeof(TimeOffsetSerializer))]
  21. public TimeSpan NextOffer;
  22. /// <summary>
  23. /// How long salvage will be active for before despawning.
  24. /// </summary>
  25. [DataField]
  26. public TimeSpan ActiveTime = TimeSpan.FromMinutes(6);
  27. /// <summary>
  28. /// Cooldown between offerings after one ends.
  29. /// </summary>
  30. [DataField]
  31. public TimeSpan OfferCooldown = TimeSpan.FromMinutes(3);
  32. /// <summary>
  33. /// Seeds currently offered
  34. /// </summary>
  35. [DataField]
  36. public List<int> Offered = new();
  37. [DataField]
  38. public int OfferCount = 5;
  39. [DataField]
  40. public int ActiveSeed;
  41. /// <summary>
  42. /// Final countdown announcement.
  43. /// </summary>
  44. [DataField]
  45. public bool Announced;
  46. }