public RightClickableResult GenerateRightClickOptions()
        {
            var rightClickResult = new RightClickableResult();

            if (isPrepared)
            {
                return(rightClickResult);
            }
            rightClickResult.AddElement($"{openingVerb}", Open);
            return(rightClickResult);
        }
    // This region (Interaction-RightClick) shouldn't exist once TODO in class summary is done.
    #region Interaction-RightClick

    public RightClickableResult GenerateRightClickOptions()
    {
        RightClickableResult result = RightClickableResult.Create();

        if (drawerState == DrawerState.Open)
        {
            return(result);
        }
        if (!accessRestrictions.CheckAccess(PlayerManager.LocalPlayer))
        {
            return(result);
        }

        return(result.AddElement("Activate Ignition", RightClickInteract));
    }
Exemple #3
0
        // This region (Interaction-RightClick) shouldn't exist once TODO in class summary is done.
        #region Interaction-RightClick

        public RightClickableResult GenerateRightClickOptions()
        {
            RightClickableResult result = RightClickableResult.Create();

            if (drawerState == DrawerState.Open)
            {
                return(result);
            }
            if (!accessRestrictions.CheckAccess(PlayerManager.LocalPlayer))
            {
                return(result);
            }
            var cremateInteraction = ContextMenuApply.ByLocalPlayer(gameObject, null);

            if (!WillInteract(cremateInteraction, NetworkSide.Client))
            {
                return(result);
            }

            return(result.AddElement("Activate", () => OnCremateClicked(cremateInteraction)));
        }
Exemple #4
0
        // This region (Interaction-RightClick) shouldn't exist once TODO in class summary is done.
        #region Interaction-RightClick

        public RightClickableResult GenerateRightClickOptions()
        {
            RightClickableResult result = RightClickableResult.Create();

            if (drawerState == DrawerState.Open)
            {
                return(result);
            }

            /* --ACCESS REWORK--
             *  TODO Remove the AccessRestriction check when we finish migrating!
             *
             */

            if (accessRestrictions)
            {
                if (accessRestrictions.CheckAccess(PlayerManager.LocalPlayer) == false)
                {
                    return(result);
                }
            }
            else if (clearanceCheckable)
            {
                if (clearanceCheckable.HasClearance(PlayerManager.LocalPlayer) == false)
                {
                    return(result);
                }
            }

            var cremateInteraction = ContextMenuApply.ByLocalPlayer(gameObject, null);

            if (!WillInteract(cremateInteraction, NetworkSide.Client))
            {
                return(result);
            }

            return(result.AddElement("Activate", () => OnCremateClicked(cremateInteraction)));
        }