Trigger Refactor (#39034)

This commit is contained in:
slarticodefast
2025-08-03 21:20:37 +02:00
committed by GitHub
parent 777e89ab3e
commit 2c40a950f7
256 changed files with 3987 additions and 2892 deletions

View File

@@ -0,0 +1,31 @@
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>
[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;
}