mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
* adj explosions * yuuup * next release * cleanup and EMP changes * minibomb revert, wait until gib experiment --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
35 lines
1.5 KiB
C#
35 lines
1.5 KiB
C#
namespace Content.Shared.Trigger;
|
|
|
|
/// <summary>
|
|
/// Raised whenever something is Triggered on the entity.
|
|
/// </summary>
|
|
/// <param name="User">The entity that activated the trigger.</param>
|
|
/// <param name="Key">
|
|
/// Allows to have multiple independent triggers on the same entity.
|
|
/// Setting this to null will activate all triggers.
|
|
/// </param>
|
|
/// <param name="Handled">Marks the event as handled if at least one trigger effect was activated.</param>
|
|
/// <param name="Predicted">Marks that this trigger is being replicated on the client.</param>
|
|
[ByRefEvent]
|
|
public record struct TriggerEvent(EntityUid? User = null, string? Key = null, bool Predicted = true, bool Handled = false);
|
|
|
|
/// <summary>
|
|
/// Raised before a trigger is activated.
|
|
/// Cancelling prevents it from triggering.
|
|
/// </summary>
|
|
/// <param name="User">The entity that activated the trigger.</param>
|
|
/// <param name="Key">
|
|
/// Allows to have multiple independent triggers on the same entity.
|
|
/// Setting this to null will activate all triggers.
|
|
/// </param>
|
|
/// <param name="Handled">Marks the event as handled if at least one trigger effect was activated.</param>
|
|
[ByRefEvent]
|
|
public record struct AttemptTriggerEvent(EntityUid? User, string? Key = null, bool Cancelled = false);
|
|
|
|
/// <summary>
|
|
/// Raised when a timer trigger becomes active.
|
|
/// </summary>
|
|
/// <param name="User">The entity that activated the trigger.</param>
|
|
[ByRefEvent]
|
|
public readonly record struct ActiveTimerTriggerEvent(EntityUid? User);
|