Give some of the most common interaction events EntityUid properties
This commit is contained in:
@@ -15,16 +15,31 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that triggered the interaction.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that the user used to interact.
|
/// Entity that the user used to interact.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public IEntity Used { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that the user used to interact.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UsedUid => Used.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was interacted on. This can be null if the attack did not click on an entity.
|
/// Entity that was interacted on. This can be null if the attack did not click on an entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity? Target { get; }
|
public IEntity? Target { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that was interacted on. This can be null if the attack did not click on an entity.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid? TargetUid => Target?.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Location that the user clicked outside of their interaction range.
|
/// Location that the user clicked outside of their interaction range.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -45,11 +45,21 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that activated the target world entity.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was activated in the world.
|
/// Entity that was activated in the world.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Target { get; }
|
public IEntity Target { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that was activated in the world.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid TargetUid => Target.Uid;
|
||||||
|
|
||||||
public ActivateInWorldEvent(IEntity user, IEntity target)
|
public ActivateInWorldEvent(IEntity user, IEntity target)
|
||||||
{
|
{
|
||||||
User = user;
|
User = user;
|
||||||
|
|||||||
@@ -56,16 +56,31 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that triggered the interaction.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that the user used to interact.
|
/// Entity that the user used to interact.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public IEntity Used { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that the user used to interact.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UsedUid => Used.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was interacted on. This can be null if the attack did not click on an entity.
|
/// Entity that was interacted on. This can be null if the attack did not click on an entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity? Target { get; }
|
public IEntity? Target { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that was interacted on. This can be null if the attack did not click on an entity.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid? TargetUid => Target?.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Location that the user clicked outside of their interaction range.
|
/// Location that the user clicked outside of their interaction range.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -39,11 +39,21 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that dropped the item.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Item that was dropped.
|
/// Item that was dropped.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Dropped { get; }
|
public IEntity Dropped { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Item that was dropped.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid DroppedUid => Dropped.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the item was dropped intentionally.
|
/// If the item was dropped intentionally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -42,11 +42,21 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that triggered the interaction.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was interacted on.
|
/// Entity that was interacted on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Target { get; }
|
public IEntity Target { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that was interacted on.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid TargetUid => Target.Uid;
|
||||||
|
|
||||||
public InteractHandEvent(IEntity user, IEntity target)
|
public InteractHandEvent(IEntity user, IEntity target)
|
||||||
{
|
{
|
||||||
User = user;
|
User = user;
|
||||||
|
|||||||
@@ -55,16 +55,31 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that triggered the interaction.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that the user used to interact.
|
/// Entity that the user used to interact.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public IEntity Used { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that the user used to interact.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UsedUid => Used.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was interacted on.
|
/// Entity that was interacted on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Target { get; }
|
public IEntity Target { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that was interacted on.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid TargetUid => Target.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original location that was clicked by the user.
|
/// The original location that was clicked by the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -46,16 +46,31 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that triggered the interaction.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that the user used to interact.
|
/// Entity that the user used to interact.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public IEntity Used { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that the user used to interact.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UsedUid => Used.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was interacted on.
|
/// Entity that was interacted on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Target { get; }
|
public IEntity Target { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity that was interacted on.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid TargetUid => Target.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Location that the user clicked outside of their interaction range.
|
/// Location that the user clicked outside of their interaction range.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -41,11 +41,21 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public IEntity User { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entity holding the item in their hand.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UserUid => User.Uid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Item that was used.
|
/// Item that was used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public IEntity Used { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Item that was used.
|
||||||
|
/// </summary>
|
||||||
|
public EntityUid UsedUid => Used.Uid;
|
||||||
|
|
||||||
public UseInHandEvent(IEntity user, IEntity used)
|
public UseInHandEvent(IEntity user, IEntity used)
|
||||||
{
|
{
|
||||||
User = user;
|
User = user;
|
||||||
|
|||||||
Reference in New Issue
Block a user