Re-do InteractionSystem IEntity -> EntityUid conversion (#5767)

This commit is contained in:
Vera Aguilera Puerto
2021-12-14 06:17:18 +01:00
committed by GitHub
parent fe1836c99d
commit e3478f894e
5 changed files with 76 additions and 82 deletions

View File

@@ -27,21 +27,14 @@ namespace Content.Shared.Weapons.Melee
/// <summary>
/// UID of the entity that was attacked.
/// </summary>
public EntityUid Target { get; }
public EntityUid? Target { get; }
/// <summary>
/// Entity that was attacked.
/// </summary>
public EntityUid? TargetEntity { get; }
public ClickAttackEvent(EntityUid used, EntityUid user, EntityCoordinates clickLocation, EntityUid target = default)
public ClickAttackEvent(EntityUid used, EntityUid user, EntityCoordinates clickLocation, EntityUid? target = null)
{
Used = used;
User = user;
ClickLocation = clickLocation;
Target = target;
TargetEntity = IoCManager.Resolve<IEntityManager>().EntityExists(Target) ? Target : default(EntityUid?);
}
}