Example #1
0
        /// <summary>
        /// Register a new answer which can be used in dialogs
        /// </summary>
        /// <param name="question">Question that this answer will be an answer to</param>
        /// <param name="answer">Information about this answer</param>
        public static void RegisterNewAnswer(string question, DialogueAnswerInformation answer)
        {
            if (answerInjectors.ContainsKey(question))
            {
                answerInjectors[question].Add(answer);
            }
            else
            {
                List <DialogueAnswerInformation> answerList = new List <DialogueAnswerInformation>();
                answerList.Add(answer);
                answerInjectors.Add(question, answerList);

                // Make sure the result of our answer is injected
                RegisterNewResult(question, answer.ModUniqueKey(), answer.Result);
            }
        }
Example #2
0
 /// <summary>
 /// Register a new answer which can be used in dialogs
 /// </summary>
 /// <param name="question">Question that this answer will be an answer to</param>
 /// <param name="answer">Information about this answer</param>
 public static void RegisterNewAnswer(Questions question, DialogueAnswerInformation answer)
 {
     RegisterNewAnswer(QuestionsKey(question), answer);
 }