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); }
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; }