using Robust.Shared.Prototypes; namespace Content.Server.Spawners.Components; /// /// An extended with optional rare prototypes and more configurable spawn behavior. /// /// /// For non-trivial lists of prototypes, consider using and an instead. /// [RegisterComponent, EntityCategory("Spawner")] public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent { /// /// A list of rare entities to spawn. /// /// /// On a successful spawn roll, with probability, /// an entity from this list is spawned (vs. the normal Prototypes list). /// [DataField] public List RarePrototypes { get; set; } = new(); /// /// The chance that a rare prototype may spawn instead of a common prototype. /// [DataField] public float RareChance { get; set; } = 0.05f; /// /// Maximum distance in meters to scatter spawned entities from the spawner. /// /// /// Spawned entities are created in a disk this size around the spawner. /// [DataField] public float Offset { get; set; } = 0.2f; /// /// If true, the spawner is deleted on . /// [DataField] public bool DeleteSpawnerAfterSpawn = true; }