Prevent Holoparasites from attacking their host (#6019)

This commit is contained in:
ShadowCommander
2022-01-04 01:22:28 -08:00
committed by GitHub
parent 5249ea057a
commit b335ef5e7f
5 changed files with 21 additions and 6 deletions

View File

@@ -82,9 +82,9 @@ namespace Content.Shared.ActionBlocker
return !ev.Cancelled;
}
public bool CanAttack(EntityUid uid)
public bool CanAttack(EntityUid uid, EntityUid? target = null)
{
var ev = new AttackAttemptEvent(uid);
var ev = new AttackAttemptEvent(uid, target);
RaiseLocalEvent(uid, ev);
return !ev.Cancelled;