Remove InteractedWithEvent and friends. (#11939)
This commit is contained in:
@@ -78,9 +78,6 @@ namespace Content.Shared.ActionBlocker
|
||||
var targetEv = new GettingInteractedWithAttemptEvent(user, target);
|
||||
RaiseLocalEvent(target.Value, targetEv);
|
||||
|
||||
if (!targetEv.Cancelled)
|
||||
InteractWithItem(user, target.Value);
|
||||
|
||||
return !targetEv.Cancelled;
|
||||
}
|
||||
|
||||
@@ -136,11 +133,7 @@ namespace Content.Shared.ActionBlocker
|
||||
var itemEv = new GettingPickedUpAttemptEvent(user, item);
|
||||
RaiseLocalEvent(item, itemEv);
|
||||
|
||||
if (!itemEv.Cancelled)
|
||||
InteractWithItem(user, item);
|
||||
|
||||
return !itemEv.Cancelled;
|
||||
|
||||
}
|
||||
|
||||
public bool CanEmote(EntityUid uid)
|
||||
@@ -186,13 +179,5 @@ namespace Content.Shared.ActionBlocker
|
||||
|
||||
return !ev.Cancelled;
|
||||
}
|
||||
|
||||
private void InteractWithItem(EntityUid user, EntityUid item)
|
||||
{
|
||||
var userEvent = new UserInteractedWithItemEvent(user, item);
|
||||
RaiseLocalEvent(user, userEvent);
|
||||
var itemEvent = new ItemInteractedWithEvent(user, item);
|
||||
RaiseLocalEvent(item, itemEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user