Files
Delta-v/Content.Shared/Projectiles/EmbedEvents.cs
T
5e7105e355 TriggerOn(Un)Embed (#41720)
* feat: TriggerOn(Un)Embed

* feat: StopEmbedEvent

* fix: forgot initialize

* chore: better naming

* chore: oops

* Update Content.Shared/Trigger/Components/Triggers/TriggerOnUnembedComponent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Projectiles/EmbedEvents.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* review

im lazy

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Trigger/Components/Triggers/TriggerOnEmbedComponent.cs

* chore: docs

* comment change

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: iaada <iaada@users.noreply.github.com>
2026-04-04 16:56:51 +02:00

36 lines
984 B
C#

namespace Content.Shared.Projectiles;
/// <summary>
/// Raised directed on an entity when it embeds in another entity.
/// </summary>
[ByRefEvent]
public readonly record struct EmbedEvent(EntityUid? Shooter, EntityUid Embedded)
{
/// <summary>
/// The entity that threw/shot the embed, if any.
/// </summary>
public readonly EntityUid? Shooter = Shooter;
/// <summary>
/// Entity that is embedded in.
/// </summary>
public readonly EntityUid Embedded = Embedded;
}
/// <summary>
/// Raised directed on an entity when it stops being embedded in another entity.
/// </summary>
[ByRefEvent]
public readonly record struct EmbedDetachEvent(EntityUid? Detacher, EntityUid Embedded)
{
/// <summary>
/// The entity that detached the embed, if any.
/// </summary>
public readonly EntityUid? Detacher = Detacher;
/// <summary>
/// Entity that it is embedded in.
/// </summary>
public readonly EntityUid Embedded = Embedded;
}