RespawnableSpawnerComponent.cs 689 B

123456789101112131415161718192021
  1. using Robust.Shared.GameObjects;
  2. using Robust.Shared.Serialization.Manager.Attributes;
  3. using Robust.Shared.ViewVariables;
  4. namespace Content.Server.Spawners;
  5. [RegisterComponent]
  6. public sealed partial class RespawnableSpawnerComponent : Component
  7. {
  8. [DataField("prototypes")]
  9. public List<string> Prototypes = new(); //Enities proto to be spawned
  10. [DataField("minDelay"), ViewVariables(VVAccess.ReadWrite)]
  11. public float MinDelay = 60f; // Minimum delay in seconds
  12. [DataField("maxDelay"), ViewVariables(VVAccess.ReadWrite)]
  13. public float MaxDelay = 300f; // Maximum delay in seconds
  14. [ViewVariables]
  15. public Dictionary<EntityUid, float> RespawnTimers = new();
  16. }