mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-15 03:31:44 +01:00
* 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>
36 lines
984 B
C#
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;
|
|
}
|