ActionBlocker CanAttack uses EntityUid exclusively

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 13:40:27 +01:00
parent 51e785c0fd
commit d4ded87448
4 changed files with 10 additions and 16 deletions

View File

@@ -66,7 +66,7 @@ namespace Content.Shared.ActionBlocker
return !ev.Cancelled;
}
public bool CanDrop(EntityUid uid)
{
var ev = new DropAttemptEvent(uid);
@@ -103,18 +103,12 @@ namespace Content.Shared.ActionBlocker
return CanEmote(EntityManager.GetEntity(uid));
}
public bool CanAttack(IEntity entity)
{
var ev = new AttackAttemptEvent(entity);
RaiseLocalEvent(entity.Uid, ev);
return !ev.Cancelled;
}
public bool CanAttack(EntityUid uid)
{
return CanAttack(EntityManager.GetEntity(uid));
var ev = new AttackAttemptEvent(uid);
RaiseLocalEvent(uid, ev);
return !ev.Cancelled;
}
public bool CanEquip(IEntity entity)