RangedInteractEvent uses EntityUid exclusively
Did anyone else know this event was a thing?
This commit is contained in:
@@ -403,7 +403,7 @@ namespace Content.Server.Interaction
|
|||||||
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
var rangedMsg = new RangedInteractEvent(user, used, target, clickLocation);
|
var rangedMsg = new RangedInteractEvent(user.Uid, used.Uid, target.Uid, clickLocation);
|
||||||
RaiseLocalEvent(target.Uid, rangedMsg);
|
RaiseLocalEvent(target.Uid, rangedMsg);
|
||||||
if (rangedMsg.Handled)
|
if (rangedMsg.Handled)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -44,43 +44,28 @@ namespace Content.Shared.Interaction
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that triggered the interaction.
|
/// Entity that triggered the interaction.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public EntityUid UserUid { 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 EntityUid UsedUid { 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 EntityUid TargetUid { 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>
|
||||||
public EntityCoordinates ClickLocation { get; }
|
public EntityCoordinates ClickLocation { get; }
|
||||||
|
|
||||||
public RangedInteractEvent(IEntity user, IEntity used, IEntity target, EntityCoordinates clickLocation)
|
public RangedInteractEvent(EntityUid user, EntityUid used, EntityUid target, EntityCoordinates clickLocation)
|
||||||
{
|
{
|
||||||
User = user;
|
UserUid = user;
|
||||||
Used = used;
|
UsedUid = used;
|
||||||
Target = target;
|
TargetUid = target;
|
||||||
ClickLocation = clickLocation;
|
ClickLocation = clickLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user