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)
|
private void HandleItemDropped(EntityUid uid, HandVirtualItemComponent component, DroppedEvent args)
|
||||||
{
|
{
|
||||||
Delete(component, args.User.Uid);
|
Delete(component, args.UserUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -37,32 +37,22 @@ namespace Content.Shared.Interaction
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that dropped the item.
|
/// Entity that dropped the item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public EntityUid UserUid { 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 EntityUid DroppedUid { 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>
|
||||||
public bool Intentional { get; }
|
public bool Intentional { get; }
|
||||||
|
|
||||||
public DroppedEvent(IEntity user, IEntity dropped, bool intentional)
|
public DroppedEvent(EntityUid user, EntityUid dropped, bool intentional)
|
||||||
{
|
{
|
||||||
User = user;
|
UserUid = user;
|
||||||
Dropped = dropped;
|
DroppedUid = dropped;
|
||||||
Intentional = intentional;
|
Intentional = intentional;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ namespace Content.Shared.Interaction
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void DroppedInteraction(IEntity user, IEntity item, bool intentional)
|
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);
|
RaiseLocalEvent(item.Uid, dropMsg);
|
||||||
if (dropMsg.Handled)
|
if (dropMsg.Handled)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user