Fixes singularity collision and consume range (#13424)

Co-authored-by: keronshb <keronshb@live.com>
This commit is contained in:
TemporalOroboros
2023-07-19 01:01:27 -07:00
committed by GitHub
parent afef518fc5
commit 6313164368
13 changed files with 290 additions and 277 deletions

View File

@@ -6,21 +6,27 @@ namespace Content.Server.Singularity.Events;
/// Event raised on the target entity whenever an event horizon attempts to consume an entity.
/// Can be cancelled to prevent the target entity from being consumed.
/// </summary>
public sealed class EventHorizonAttemptConsumeEntityEvent : CancellableEntityEventArgs
[ByRefEvent]
public record struct EventHorizonAttemptConsumeEntityEvent
(EntityUid entity, EntityUid eventHorizonUid, EventHorizonComponent eventHorizon)
{
/// <summary>
/// The entity that the event horizon is attempting to consume.
/// </summary>
public readonly EntityUid Entity;
public readonly EntityUid Entity = entity;
/// <summary>
/// The uid of the event horizon consuming the entity.
/// </summary>
public readonly EntityUid EventHorizonUid = eventHorizonUid;
/// <summary>
/// The event horizon consuming the target entity.
/// </summary>
public readonly EventHorizonComponent EventHorizon;
public readonly EventHorizonComponent EventHorizon = eventHorizon;
public EventHorizonAttemptConsumeEntityEvent(EntityUid entity, EventHorizonComponent eventHorizon)
{
Entity = entity;
EventHorizon = eventHorizon;
}
/// <summary>
/// Whether the event horizon has been prevented from consuming the target entity.
/// </summary>
public bool Cancelled = false;
}