public void OnClickAttack(EntityUid uid, HyposprayComponent comp, ClickAttackEvent args)
        {
            var target = args.TargetEntity;
            var user   = args.User;

            comp.TryDoInject(target, user);
        }
Exemplo n.º 2
0
        public void OnClickAttack(EntityUid uid, HyposprayComponent comp, ClickAttackEvent args)
        {
            if (args.Target == null)
            {
                return;
            }

            comp.TryDoInject(args.Target.Value, args.User);
        }
Exemplo n.º 3
0
        private void OnUseInHand(EntityUid uid, HyposprayComponent component, UseInHandEvent args)
        {
            if (args.Handled)
            {
                return;
            }

            component.TryDoInject(args.User, args.User);
            args.Handled = true;
        }
        public void OnAfterInteract(EntityUid uid, HyposprayComponent comp, AfterInteractEvent args)
        {
            if (!args.CanReach)
            {
                return;
            }
            var target = args.Target;
            var user   = args.User;

            comp.TryDoInject(target, user);
        }