TilesConsumedByEventHorizonEvent.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Robust.Shared.Map;
  2. using Robust.Shared.Map.Components;
  3. using Content.Shared.Singularity.Components;
  4. namespace Content.Server.Singularity.Events;
  5. /// <summary>
  6. /// Event raised on the event horizon entity whenever an event horizon consumes an entity.
  7. /// </summary>
  8. [ByRefEvent]
  9. public readonly record struct TilesConsumedByEventHorizonEvent
  10. (IReadOnlyList<(Vector2i, Tile)> tiles, EntityUid mapGridUid, MapGridComponent mapGrid, EntityUid eventHorizonUid, EventHorizonComponent eventHorizon)
  11. {
  12. /// <summary>
  13. /// The tiles that the event horizon is consuming.
  14. /// Ripped directly from the relevant proc so the second element of each element will be what the tiles are going to be after the grid is updated; usually <see cref="Tile.Empty"/>.
  15. /// </summary>
  16. public readonly IReadOnlyList<(Vector2i, Tile)> Tiles = tiles;
  17. /// <summary>
  18. /// The uid of the map grid the event horizon is consuming part of.
  19. /// </summary>
  20. public readonly EntityUid MapGridUid = mapGridUid;
  21. /// <summary>
  22. /// The mapgrid that the event horizon is consuming tiles of.
  23. /// </summary>
  24. public readonly MapGridComponent MapGrid = mapGrid;
  25. /// <summary>
  26. /// The uid of the event horizon consuming the entity.
  27. /// </summary>
  28. public readonly EntityUid EventHorizonUid = eventHorizonUid;
  29. /// <summary>
  30. /// The event horizon consuming the tiles.
  31. /// </summary>
  32. public readonly EventHorizonComponent EventHorizon = eventHorizon;
  33. }