SpawnArtifactComponent.cs 732 B

1234567891011121314151617181920212223242526
  1. using Content.Shared.Storage;
  2. namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
  3. /// <summary>
  4. /// When activated artifact will spawn an entity from prototype.
  5. /// It could be an angry mob or some random item.
  6. /// </summary>
  7. [RegisterComponent]
  8. public sealed partial class SpawnArtifactComponent : Component
  9. {
  10. [DataField("spawns")]
  11. public List<EntitySpawnEntry>? Spawns;
  12. /// <summary>
  13. /// The range around the artifact that it will spawn the entity
  14. /// </summary>
  15. [DataField("range")]
  16. public float Range = 0.5f;
  17. /// <summary>
  18. /// The maximum number of times the spawn will occur
  19. /// </summary>
  20. [DataField("maxSpawns")]
  21. public int MaxSpawns = 10;
  22. }