Esempio n. 1
0
        /**
         * <summary>Converts the Action's references from a given local variable to a given global variable</summary>
         * <param name = "oldLocalID">The ID number of the old local variable</param>
         * <param name = "newGlobalID">The ID number of the new global variable</param>
         * <returns>True if the Action was amended</returns>
         */
        public virtual bool ConvertLocalVariableToGlobal(int oldLocalID, int newGlobalID)
        {
            string newComment = AdvGame.ConvertLocalVariableTokenToGlobal(comment, oldLocalID, newGlobalID);
            bool   wasAmended = (comment != newComment);

            comment = newComment;
            return(wasAmended);
        }
Esempio n. 2
0
        public override bool ConvertLocalVariableToGlobal(int oldLocalID, int newGlobalID)
        {
            bool wasAmended = base.ConvertLocalVariableToGlobal(oldLocalID, newGlobalID);

            string updatedLabel = AdvGame.ConvertLocalVariableTokenToGlobal(newLabel, oldLocalID, newGlobalID);

            if (newLabel != updatedLabel)
            {
                wasAmended = true;
                newLabel   = updatedLabel;
            }
            return(wasAmended);
        }
Esempio n. 3
0
        public override bool ConvertLocalVariableToGlobal(int oldLocalID, int newGlobalID)
        {
            bool wasAmended = base.ConvertLocalVariableToGlobal(oldLocalID, newGlobalID);

            string newMessageText = AdvGame.ConvertLocalVariableTokenToGlobal(messageText, oldLocalID, newGlobalID);

            if (messageText != newMessageText && messageParameterID < 0)
            {
                wasAmended  = true;
                messageText = newMessageText;
            }
            return(wasAmended);
        }
        public override bool ConvertLocalVariableToGlobal(int oldLocalID, int newGlobalID)
        {
            bool wasAmended = base.ConvertLocalVariableToGlobal(oldLocalID, newGlobalID);

            string updatedCommentText = AdvGame.ConvertLocalVariableTokenToGlobal(commentText, oldLocalID, newGlobalID);

            if (commentText != updatedCommentText)
            {
                wasAmended  = true;
                commentText = updatedCommentText;
            }
            return(wasAmended);
        }
Esempio n. 5
0
        /**
         * <summary>Converts the Conversations's references from a given local variable to a given global variable</summary>
         * <param name = "oldLocalID">The ID number of the old local variable</param>
         * <param name = "newGlobalID">The ID number of the new global variable</param>
         * <returns>True if the Action was amended</returns>
         */
        public bool ConvertLocalVariableToGlobal(int oldLocalID, int newGlobalID)
        {
            bool wasAmened = false;

            if (options != null)
            {
                foreach (ButtonDialog option in options)
                {
                    string newLabel = AdvGame.ConvertLocalVariableTokenToGlobal(option.label, oldLocalID, newGlobalID);
                    if (newLabel != option.label)
                    {
                        option.label = newLabel;
                        wasAmened    = true;
                    }
                }
            }

            return(wasAmened);
        }