mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* init * hmmmm * huh * final * hmmm * test * test2 * huhhuh * minor cleanup --------- Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
35 lines
974 B
C#
35 lines
974 B
C#
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Storage.Components;
|
|
|
|
/// <summary>
|
|
/// This component enables the spawn of a specific entity upon being interacted with.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed partial class SpawnAfterInteractComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The prototype id of the entity to be spawned in.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntProtoId Prototype;
|
|
|
|
/// <summary>
|
|
/// Stops the spawn if the target space is no longer in reach, unless true.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool IgnoreDistance;
|
|
|
|
/// <summary>
|
|
/// The length of the interact action.
|
|
/// </summary>
|
|
[DataField("doAfter")]
|
|
public float DoAfterTime;
|
|
|
|
/// <summary>
|
|
/// If the entity with this component should be deleted upon a successful spawn.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool RemoveOnInteract;
|
|
}
|