2022-07-14 22:29:29 +12:00
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Interaction;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Raised when an entity is activated in the world.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[PublicAPI]
|
|
|
|
|
public sealed class ActivateInWorldEvent : HandledEntityEventArgs, ITargetedInteractEventArgs
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Entity that activated the target world entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EntityUid User { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Entity that was activated in the world.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EntityUid Target { get; }
|
|
|
|
|
|
2024-05-31 16:26:19 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether or not <see cref="User"/> can perform complex interactions or only basic ones.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Complex;
|
|
|
|
|
|
2023-01-20 10:05:05 -06:00
|
|
|
/// <summary>
|
|
|
|
|
/// Set to true when the activation is logged by a specific logger.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool WasLogged { get; set; }
|
|
|
|
|
|
2024-05-31 16:26:19 -04:00
|
|
|
public ActivateInWorldEvent(EntityUid user, EntityUid target, bool complex)
|
|
|
|
|
{
|
|
|
|
|
User = user;
|
|
|
|
|
Target = target;
|
|
|
|
|
Complex = complex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event raised on the user when it activates something in the world
|
|
|
|
|
/// </summary>
|
|
|
|
|
[PublicAPI]
|
|
|
|
|
public sealed class UserActivateInWorldEvent : HandledEntityEventArgs, ITargetedInteractEventArgs
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Entity that activated the target world entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EntityUid User { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Entity that was activated in the world.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EntityUid Target { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether or not <see cref="User"/> can perform complex interactions or only basic ones.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Complex;
|
|
|
|
|
|
|
|
|
|
public UserActivateInWorldEvent(EntityUid user, EntityUid target, bool complex)
|
2022-07-14 22:29:29 +12:00
|
|
|
{
|
|
|
|
|
User = user;
|
|
|
|
|
Target = target;
|
2024-05-31 16:26:19 -04:00
|
|
|
Complex = complex;
|
2022-07-14 22:29:29 +12:00
|
|
|
}
|
|
|
|
|
}
|