Files
ss14-wega/Content.Shared/Projectiles/EmbedEvents.cs
sleepyyapril f1443f0cd7 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>
2025-12-08 04:20:42 +00: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;
}