Raised on the user after they do any sort of interaction with an item, useful for when you want a component on the user to do something to the item. E.g. forensics, disease, etc.
Inheritance: EntityEventArgs
        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);
        }
示例#2
0
 private void OnInteract(EntityUid uid, FingerprintComponent component, UserInteractedWithItemEvent args)
 {
     ApplyEvidence(args.User, args.Item);
 }