mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* Restore the rare drops * what newlines there were never newlines you're crazy go home * Comment spawner components, system, tableselector * known to cause cancer in the state of california
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using Content.Server.Spawners.EntitySystems;
|
|
using Content.Shared.EntityTable.EntitySelectors;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Spawners.Components;
|
|
|
|
/// <summary>
|
|
/// A spawner that randomly spawns entities according to an <see cref="EntityTableSelector"/>.
|
|
/// </summary>
|
|
[RegisterComponent, EntityCategory("Spawner"), Access(typeof(ConditionalSpawnerSystem))]
|
|
public sealed partial class EntityTableSpawnerComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Table that determines what gets spawned.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntityTableSelector Table = default!;
|
|
|
|
/// <summary>
|
|
/// Maximum distance in meters to scatter spawned entities from the spawner.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Spawned entities are created in a disk this size around the spawner.
|
|
/// </remarks>
|
|
[DataField]
|
|
public float Offset = 0.2f;
|
|
|
|
/// <summary>
|
|
/// A variable meaning whether the spawn will
|
|
/// be able to be used again or whether
|
|
/// it will be destroyed after the first use
|
|
/// </summary>
|
|
[DataField]
|
|
public bool DeleteSpawnerAfterSpawn = true;
|
|
|
|
/// <summary>
|
|
/// Marker, if produced entities should be spawned stacked if they could be.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool AutoStack = false;
|
|
}
|
|
|