EventHorizonConsumedEntityEvent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. using Content.Shared.Singularity.Components;
  2. using Robust.Shared.Containers;
  3. namespace Content.Server.Singularity.Events;
  4. /// <summary>
  5. /// Event raised on the entity being consumed whenever an event horizon consumes an entity.
  6. /// </summary>
  7. [ByRefEvent]
  8. public readonly record struct EventHorizonConsumedEntityEvent
  9. (EntityUid entity, EntityUid eventHorizonUid, EventHorizonComponent eventHorizon, BaseContainer? container)
  10. {
  11. /// <summary>
  12. /// The entity being consumed by the event horizon.
  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. /// The innermost container of the entity being consumed by the event horizon that is not also in the process of being consumed by the event horizon.
  25. /// Used to correctly dump out the contents containers that are consumed by the event horizon.
  26. /// </summary>
  27. public readonly BaseContainer? Container = container;
  28. }