SpawnOnTriggerComponent.cs 674 B

123456789101112131415161718192021222324
  1. using Content.Server.Explosion.EntitySystems;
  2. using Robust.Shared.Prototypes;
  3. namespace Content.Server.Explosion.Components;
  4. /// <summary>
  5. /// Spawns a protoype when triggered.
  6. /// </summary>
  7. [RegisterComponent, Access(typeof(TriggerSystem))]
  8. public sealed partial class SpawnOnTriggerComponent : Component
  9. {
  10. /// <summary>
  11. /// The prototype to spawn.
  12. /// </summary>
  13. [DataField(required: true)]
  14. public EntProtoId Proto = string.Empty;
  15. /// <summary>
  16. /// Use MapCoordinates for spawning?
  17. /// Set to true if you don't want the new entity parented to the spawner.
  18. /// </summary>
  19. [DataField]
  20. public bool mapCoords;
  21. }