Example #1
0
 public static bool Prefix(AnswerSelected __instance, ref bool __result)
 {
     if (!settings.toggleShowAnswersForEachConditionalResponse)
     {
         return(true);
     }
     if (!__instance.CurrentDialog)
     {
         __result = Game.Instance.Player.Dialog.SelectedAnswers.Where(a => a.AssetGuid == __instance.Answer.AssetGuid).Any();
     }
     else
     {
         __result = Game.Instance.DialogController.LocalSelectedAnswers.Where(a => a.AssetGuid == __instance.Answer.AssetGuid).Any();
     }
     return(false);
 }
Example #2
0
        private void GenerateOptionsDescriptions(IEnumerable <SurveyOption> surveysOptions, AnswerSelected answerSelected)
        {
            var exist = surveysOptions.ToList().Find(x => x.Id == answerSelected.IdOption);

            if (exist == null)
            {
                throw new EntityNotFoundException <SurveyOption>(answerSelected.IdOption);
            }

            answerSelected.OptionDescription = exist.Option;
        }