EventHorizonAttemptConsumeEntityEvent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Shared.Singularity.Components;
  2. namespace Content.Server.Singularity.Events;
  3. /// <summary>
  4. /// Event raised on the target entity whenever an event horizon attempts to consume an entity.
  5. /// Can be cancelled to prevent the target entity from being consumed.
  6. /// </summary>
  7. [ByRefEvent]
  8. public record struct EventHorizonAttemptConsumeEntityEvent
  9. (EntityUid entity, EntityUid eventHorizonUid, EventHorizonComponent eventHorizon)
  10. {
  11. /// <summary>
  12. /// The entity that the event horizon is attempting to consume.
  13. /// </summary>
  14. public readonly EntityUid Entity = entity;
  15. /// <summary>
  16. /// The uid of the event horizon consuming the entity.
  17. /// </summary>
  18. public readonly EntityUid EventHorizonUid = eventHorizonUid;
  19. /// <summary>
  20. /// The event horizon consuming the target entity.
  21. /// </summary>
  22. public readonly EventHorizonComponent EventHorizon = eventHorizon;
  23. /// <summary>
  24. /// Whether the event horizon has been prevented from consuming the target entity.
  25. /// </summary>
  26. public bool Cancelled = false;
  27. }