Files
tbd-station-14/Content.Shared/Trigger/Components/Effects/SpawnOnTriggerComponent.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

33 lines
996 B
C#

using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Trigger.Components.Effects;
/// <summary>
/// Spawns a protoype when triggered.
/// If TargetUser is true it will be spawned at their location.
/// </summary>
/// <seealso cref="SpawnEntityTableOnTriggerComponent"/>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class SpawnOnTriggerComponent : BaseXOnTriggerComponent
{
/// <summary>
/// The prototype to spawn.
/// </summary>
[DataField(required: true), AutoNetworkedField]
public EntProtoId Proto = string.Empty;
/// <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 or not to use predicted spawning.
/// </summary>
[DataField, AutoNetworkedField]
public bool Predicted;
}