DroppedEvent uses EntityUid exclusively
This commit is contained in:
@@ -60,7 +60,7 @@ namespace Content.Server.Hands.Systems
|
||||
|
||||
private void HandleItemDropped(EntityUid uid, HandVirtualItemComponent component, DroppedEvent args)
|
||||
{
|
||||
Delete(component, args.User.Uid);
|
||||
Delete(component, args.UserUid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -37,32 +37,22 @@ namespace Content.Shared.Interaction
|
||||
/// <summary>
|
||||
/// Entity that dropped the item.
|
||||
/// </summary>
|
||||
public IEntity User { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that dropped the item.
|
||||
/// </summary>
|
||||
public EntityUid UserUid => User.Uid;
|
||||
public EntityUid UserUid { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Item that was dropped.
|
||||
/// </summary>
|
||||
public IEntity Dropped { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Item that was dropped.
|
||||
/// </summary>
|
||||
public EntityUid DroppedUid => Dropped.Uid;
|
||||
public EntityUid DroppedUid { get; }
|
||||
|
||||
/// <summary>
|
||||
/// If the item was dropped intentionally.
|
||||
/// </summary>
|
||||
public bool Intentional { get; }
|
||||
|
||||
public DroppedEvent(IEntity user, IEntity dropped, bool intentional)
|
||||
public DroppedEvent(EntityUid user, EntityUid dropped, bool intentional)
|
||||
{
|
||||
User = user;
|
||||
Dropped = dropped;
|
||||
UserUid = user;
|
||||
DroppedUid = dropped;
|
||||
Intentional = intentional;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ namespace Content.Shared.Interaction
|
||||
/// </summary>
|
||||
public void DroppedInteraction(IEntity user, IEntity item, bool intentional)
|
||||
{
|
||||
var dropMsg = new DroppedEvent(user, item, intentional);
|
||||
var dropMsg = new DroppedEvent(user.Uid, item.Uid, intentional);
|
||||
RaiseLocalEvent(item.Uid, dropMsg);
|
||||
if (dropMsg.Handled)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user