protected bool ValidateInteractAndFace(EntityUid user, EntityCoordinates coordinates)
        {
            // Verify user is on the same map as the entity they clicked on
            if (coordinates.GetMapId(EntityManager) != Transform(user).MapID)
            {
                return(false);
            }

            _rotateToFaceSystem.TryFaceCoordinates(user, coordinates.ToMapPos(EntityManager));

            return(true);
        }
Exemplo n.º 2
0
        private bool ValidateInteractAndFace(EntityUid user, EntityCoordinates coordinates)
        {
            // Verify user is on the same map as the entity they clicked on
            if (coordinates.GetMapId(_entityManager) != EntityManager.GetComponent <TransformComponent>(user).MapID)
            {
                Logger.WarningS("system.interaction",
                                $"User entity named {EntityManager.GetComponent<MetaDataComponent>(user).EntityName} clicked on a map they aren't located on");
                return(false);
            }

            _rotateToFaceSystem.TryFaceCoordinates(user, coordinates.ToMapPos(EntityManager));

            return(true);
        }
        private bool ValidateInteractAndFace(IEntity user, EntityCoordinates coordinates)
        {
            // Verify user is on the same map as the entity he clicked on
            if (coordinates.GetMapId(_entityManager) != user.Transform.MapID)
            {
                Logger.WarningS("system.interaction",
                                $"User entity named {user.Name} clicked on a map he isn't located on");
                return(false);
            }

            FaceClickCoordinates(user, coordinates);

            return(true);
        }
Exemplo n.º 4
0
        private bool ValidateInteractAndFace(EntityUid user, EntityCoordinates coordinates)
        {
            // Verify user is on the same map as the entity they clicked on
            if (coordinates.GetMapId(EntityManager) != Transform(user).MapID)
            {
                Logger.WarningS("system.interaction",
                                $"User entity {ToPrettyString(user):user} clicked on a map they aren't located on");
                return(false);
            }

            _rotateToFaceSystem.TryFaceCoordinates(user, coordinates.ToMapPos(EntityManager));

            return(true);
        }