Files
tbd-station-14/Content.Shared/Trigger/Components/Effects/SpawnEntityTableOnTriggerComponent.cs
āda f7e3a2f881 SpawnEntityTableOnTrigger (#39909)
* commit

* comment

* empty

* better xform

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
2025-09-10 19:59:42 +03:00

34 lines
1.1 KiB
C#

using Content.Shared.EntityTable.EntitySelectors;
using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Effects;
/// <summary>
/// Spawns an entity table at this entity when triggered.
/// If TargetUser is true it will be spawned at their location.
/// </summary>
/// <seealso cref="SpawnOnTriggerComponent"/>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class SpawnEntityTableOnTriggerComponent : BaseXOnTriggerComponent
{
/// <summary>
/// The table to spawn.
/// </summary>
[DataField(required: true), AutoNetworkedField]
public EntityTableSelector Table;
/// <summary>
/// Use MapCoordinates for spawning?
/// Set to true if you don't want the new entity parented to the spawner.
/// </summary>
[DataField, AutoNetworkedField]
public bool UseMapCoords;
/// <summary>
/// Whether to use predicted spawning.
/// </summary>
/// <remarks>Randomization in EntityTables is not currently predicted! Use with caution.</remarks>
[DataField, AutoNetworkedField]
public bool Predicted;
}