2022-05-13 00:59:03 -07:00
|
|
|
|
namespace Content.Shared.Interaction.Events
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2022-02-15 17:06:52 +13:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Event raised directed at a user to see if they can perform a generic interaction.
|
|
|
|
|
|
/// </summary>
|
2024-06-19 02:30:41 +12:00
|
|
|
|
[ByRefEvent]
|
|
|
|
|
|
public struct InteractionAttemptEvent(EntityUid uid, EntityUid? target)
|
2021-06-19 10:03:24 +02:00
|
|
|
|
{
|
2024-06-19 02:30:41 +12:00
|
|
|
|
public bool Cancelled;
|
|
|
|
|
|
public readonly EntityUid Uid = uid;
|
|
|
|
|
|
public readonly EntityUid? Target = target;
|
2022-02-15 17:06:52 +13:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-19 00:35:46 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Raised to determine whether an entity is conscious to perform an action.
|
|
|
|
|
|
/// </summary>
|
2024-06-19 02:30:41 +12:00
|
|
|
|
[ByRefEvent]
|
|
|
|
|
|
public struct ConsciousAttemptEvent(EntityUid uid)
|
2024-03-19 00:35:46 +02:00
|
|
|
|
{
|
2024-06-19 02:30:41 +12:00
|
|
|
|
public bool Cancelled;
|
|
|
|
|
|
public readonly EntityUid Uid = uid;
|
2024-03-19 00:35:46 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-02-15 17:06:52 +13:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Event raised directed at the target entity of an interaction to see if the user is allowed to perform some
|
|
|
|
|
|
/// generic interaction.
|
|
|
|
|
|
/// </summary>
|
2024-06-19 02:30:41 +12:00
|
|
|
|
[ByRefEvent]
|
|
|
|
|
|
public struct GettingInteractedWithAttemptEvent(EntityUid uid, EntityUid? target)
|
2022-02-15 17:06:52 +13:00
|
|
|
|
{
|
2024-06-19 02:30:41 +12:00
|
|
|
|
public bool Cancelled;
|
|
|
|
|
|
public readonly EntityUid Uid = uid;
|
|
|
|
|
|
public readonly EntityUid? Target = target;
|
2021-06-19 10:03:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|